get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2170009/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2170009,
    "url": "http://patchwork.ozlabs.org/api/patches/2170009/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20251128163535.2301653-7-raymondmaoca@gmail.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20251128163535.2301653-7-raymondmaoca@gmail.com>",
    "list_archive_url": null,
    "date": "2025-11-28T16:35:23",
    "name": "[v5,6/6] smbios: print the properties only when they exist in a specified version of spec",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e9d971940c6438c69222d0e95cd65558b96e75f5",
    "submitter": {
        "id": 91989,
        "url": "http://patchwork.ozlabs.org/api/people/91989/?format=api",
        "name": "Raymond Mao",
        "email": "raymondmaoca@gmail.com"
    },
    "delegate": {
        "id": 96103,
        "url": "http://patchwork.ozlabs.org/api/users/96103/?format=api",
        "username": "apalos",
        "first_name": "Ilias",
        "last_name": "Apalodimas",
        "email": "apalos@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20251128163535.2301653-7-raymondmaoca@gmail.com/mbox/",
    "series": [
        {
            "id": 483864,
            "url": "http://patchwork.ozlabs.org/api/series/483864/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=483864",
            "date": "2025-11-28T16:35:17",
            "name": "Implement all missing SMBIOS types required by distro tooling",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/483864/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2170009/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2170009/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=RmJNVRoM;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"RmJNVRoM\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=raymondmaoca@gmail.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dHzTY4y15z1yDd\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 29 Nov 2025 03:36:49 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 3587583B71;\n\tFri, 28 Nov 2025 17:36:33 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id CA7AB83B7F; Fri, 28 Nov 2025 17:36:31 +0100 (CET)",
            "from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com\n [IPv6:2607:f8b0:4864:20::72d])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 7F54A838FA\n for <u-boot@lists.denx.de>; Fri, 28 Nov 2025 17:36:29 +0100 (CET)",
            "by mail-qk1-x72d.google.com with SMTP id\n af79cd13be357-8b2aa1ae006so266359485a.2\n for <u-boot@lists.denx.de>; Fri, 28 Nov 2025 08:36:29 -0800 (PST)",
            "from ubuntu.localdomain ([216.58.22.99])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8b52a1b75a9sm331227985a.25.2025.11.28.08.36.27\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 28 Nov 2025 08:36:27 -0800 (PST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1764347788; x=1764952588; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=lX+bcRs1hmYzw20ahsx4LOqTaP16ACjHDDSO7fJk7wo=;\n b=RmJNVRoMHi/k73HwHg0wMPjH+V/GPhvCswKlpRphfk0rEoByybCj7QH1BFmpIw/7KN\n 9pRvDKjN4q8OUW3P+elOFywzp6m8QCocaRBYGGjfpQT6OigDyFu4jhN9ut/QU+FBw/XC\n eLw7bZqWsZ0kOmcmHPclf3VGVI/foMjkV2n4RjEtijaeKvZx0WVdSHISDSoh0h+S811i\n Jlt3/QD79/mIh2EUxcr6E7Ng0GT2FZkwZbM8WTTfLTpRqacC5xRuVdZwJZtcWSLisJlO\n Gj8XO6kprfdwfyU3NHVb0AfZJyG6tgQPA4tF40LYmHwdfOYjShNHf3WkM5bBAAYbVKgI\n rqdA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1764347788; x=1764952588;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=lX+bcRs1hmYzw20ahsx4LOqTaP16ACjHDDSO7fJk7wo=;\n b=alQbcQFnCYL0RCvozlQ05jq3n9T2WXDbeRr8SqIhEtQVoRnHDu/oDC8fTx180CXmSl\n Yxr8nT+9aLgJ2Nwajr0rlJMMnBv0t5XCoAIUY3QySgk0+QufNgLMQKXolDKNnO1TRdng\n t8ipUe+PKojL8YJ5cEN9tG0CMxfkTwC3191uABSiYJN/SejHYZtxhLqhMVkDtgOOVsGT\n RDqnM+dYd+iuOgG+GYwohm32RkMS6V+aLHN2sa0K1AFz1I58p17kH+LwLw2w1kjuZ7zh\n sqV8sLdcGvmoD+LG0nluRzq0XIVl5xaGgPQU8Zss5RK5nAbKOzE9LwmqvYGTjJQx6nbC\n iBHw==",
        "X-Gm-Message-State": "AOJu0Yz4d3Bjmw8HvJ1jMpV4O+VuIMFl8XP7qv5kM0vFhnaxUn5vXeAe\n 6L0VC3w+Dmby1vI1z38KsEi8lPj3GDXhTYWcjVwFNL16QZREITTofAPwazUqgWt2g28=",
        "X-Gm-Gg": "ASbGncsOFLetvQygLFUjatklDPOXXaFhlg1UvplKMaggTZG8amUxpp7JFFlcxXePy6B\n QDG/dsQZoaUNSavgaoSxTxFVMq1onVT51bosxuuiL/3PO27EzJbFnwcrga7E6gmQmHAVsn+rD/v\n 6PC+pDvVFdk0OWZNijB7lswuM3h8O9CSA3+1Ml1p3PIXLEfzzhUF3KfTOA39OVMMM3HLSSPXWM9\n E2SntZik4zR0It9mYOwjUZ8CQ2AzhdGGBfI37gMc1IzulWpFx0PMR9usMCf14KFDQNeq37cSzC5\n 6+8Bkkm2HWXrM6xqYzIV1bHiHiOo2Rs5TAeQiY1QeLtvdAAGdTwtDAsLgVHlgRZESfAe8vCEn0c\n GWygURptkYEndd0R1RvHgaClCQvL6widU/dZI43cT9YbmX6aGcwZ9ytOi2o3UrYIi1g5K1Dhlxa\n Tc1kDZmKRaiBCxJQGxxLtHlmOie058LSvIpv39Y6ATDw==",
        "X-Google-Smtp-Source": "\n AGHT+IEC4Qg3uH502KMD4VsnOX8CbrfTDKi2TlWXW/SFlb6tg7DJlN3vcThFNbzWOMRUhyE1WmGfng==",
        "X-Received": "by 2002:a05:620a:2a14:b0:8b1:8082:aec5 with SMTP id\n af79cd13be357-8b33d47825bmr3401434685a.58.1764347788067;\n Fri, 28 Nov 2025 08:36:28 -0800 (PST)",
        "From": "Raymond Mao <raymondmaoca@gmail.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "Raymond Mao <raymondmaoca@gmail.com>, Tom Rini <trini@konsulko.com>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Mark Kettenis <kettenis@openbsd.org>,\n Baocheng Su <baocheng.su@siemens.com>,\n Li Hua Qian <huaqian.li@siemens.com>, Jan Kiszka <jan.kiszka@siemens.com>,\n Samuel Holland <samuel.holland@sifive.com>, Peng Fan <peng.fan@nxp.com>",
        "Subject": "[PATCH v5 6/6] smbios: print the properties only when they exist in a\n specified version of spec",
        "Date": "Fri, 28 Nov 2025 08:35:23 -0800",
        "Message-Id": "<20251128163535.2301653-7-raymondmaoca@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20251128163535.2301653-1-raymondmaoca@gmail.com>",
        "References": "<20251128163535.2301653-1-raymondmaoca@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "By checking the payload length, we can know the version of the spec and\nskip the ones which are not expected to exist.\n\nSigned-off-by: Raymond Mao <raymondmaoca@gmail.com>\n---\nChanges in v5:\n- Initial patch.\n\n cmd/smbios.c     | 65 ++++++++++++++++++++++++++++++++++++++++--------\n include/smbios.h | 32 ++++++++++++++++++++++++\n 2 files changed, 86 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/cmd/smbios.c b/cmd/smbios.c\nindex 671c14e05b5..3fafa46d0a5 100644\n--- a/cmd/smbios.c\n+++ b/cmd/smbios.c\n@@ -348,6 +348,8 @@ static void smbios_print_type0(struct smbios_type0 *table)\n \tprintf(\"\\tBIOS ROM Size: 0x%02x\\n\", table->bios_rom_size);\n \tprintf(\"\\tBIOS Characteristics: 0x%016llx\\n\",\n \t       table->bios_characteristics);\n+\tif (table->hdr.length < SMBIOS_TYPE0_LENGTH_V24)\n+\t\treturn;\n \tprintf(\"\\tBIOS Characteristics Extension Byte 1: 0x%02x\\n\",\n \t       table->bios_characteristics_ext1);\n \tprintf(\"\\tBIOS Characteristics Extension Byte 2: 0x%02x\\n\",\n@@ -360,6 +362,8 @@ static void smbios_print_type0(struct smbios_type0 *table)\n \t       table->ec_major_release);\n \tprintf(\"\\tEmbedded Controller Firmware Minor Release: 0x%02x\\n\",\n \t       table->ec_minor_release);\n+\tif (table->hdr.length < SMBIOS_TYPE0_LENGTH_V31)\n+\t\treturn;\n \tprintf(\"\\tExtended BIOS ROM Size: 0x%04x\\n\",\n \t       table->extended_bios_rom_size);\n }\n@@ -371,17 +375,16 @@ static void smbios_print_type1(struct smbios_type1 *table)\n \tsmbios_print_str(\"Product Name\", table, table->product_name);\n \tsmbios_print_str(\"Version\", table, table->version);\n \tsmbios_print_str(\"Serial Number\", table, table->serial_number);\n-\tif (table->hdr.length >= SMBIOS_TYPE1_LENGTH_V21) {\n-\t\tprintf(\"\\tUUID: %pUl\\n\", table->uuid);\n-\t\tsmbios_print_lookup_str(wakeup_type_strings,\n-\t\t\t\t\ttable->wakeup_type,\n-\t\t\t\t\tARRAY_SIZE(wakeup_type_strings),\n-\t\t\t\t\t\"Wake-up Type\");\n-\t}\n-\tif (table->hdr.length >= SMBIOS_TYPE1_LENGTH_V24) {\n-\t\tsmbios_print_str(\"SKU Number\", table, table->sku_number);\n-\t\tsmbios_print_str(\"Family\", table, table->family);\n-\t}\n+\tif (table->hdr.length < SMBIOS_TYPE1_LENGTH_V21)\n+\t\treturn;\n+\tprintf(\"\\tUUID: %pUl\\n\", table->uuid);\n+\tsmbios_print_lookup_str(wakeup_type_strings, table->wakeup_type,\n+\t\t\t\tARRAY_SIZE(wakeup_type_strings),\n+\t\t\t\t\"Wake-up Type\");\n+\tif (table->hdr.length < SMBIOS_TYPE1_LENGTH_V24)\n+\t\treturn;\n+\tsmbios_print_str(\"SKU Number\", table, table->sku_number);\n+\tsmbios_print_str(\"Family\", table, table->family);\n }\n \n static void smbios_print_type2(struct smbios_type2 *table)\n@@ -501,21 +504,31 @@ static void smbios_print_type4(struct smbios_type4 *table)\n \tprintf(\"\\tL1 Cache Handle: 0x%04x\\n\", table->l1_cache_handle);\n \tprintf(\"\\tL2 Cache Handle: 0x%04x\\n\", table->l2_cache_handle);\n \tprintf(\"\\tL3 Cache Handle: 0x%04x\\n\", table->l3_cache_handle);\n+\tif (table->hdr.length < SMBIOS_TYPE4_LENGTH_V23)\n+\t\treturn;\n \tsmbios_print_str(\"Serial Number\", table, table->serial_number);\n \tsmbios_print_str(\"Asset Tag\", table, table->asset_tag);\n \tsmbios_print_str(\"Part Number\", table, table->part_number);\n+\tif (table->hdr.length < SMBIOS_TYPE4_LENGTH_V25)\n+\t\treturn;\n \tprintf(\"\\tCore Count: 0x%02x\\n\", table->core_count);\n \tprintf(\"\\tCore Enabled: 0x%02x\\n\", table->core_enabled);\n \tprintf(\"\\tThread Count: 0x%02x\\n\", table->thread_count);\n \tprintf(\"\\tProcessor Characteristics: 0x%04x\\n\",\n \t       table->processor_characteristics);\n+\tif (table->hdr.length < SMBIOS_TYPE4_LENGTH_V26)\n+\t\treturn;\n \tsmbios_print_lookup_str(processor_family_strings,\n \t\t\t\ttable->processor_family2,\n \t\t\t\tARRAY_SIZE(processor_family_strings),\n \t\t\t\t\"Processor Family 2\");\n+\tif (table->hdr.length < SMBIOS_TYPE4_LENGTH_V30)\n+\t\treturn;\n \tprintf(\"\\tCore Count 2: 0x%04x\\n\", table->core_count2);\n \tprintf(\"\\tCore Enabled 2: 0x%04x\\n\", table->core_enabled2);\n \tprintf(\"\\tThread Count 2: 0x%04x\\n\", table->thread_count2);\n+\tif (table->hdr.length < SMBIOS_TYPE4_LENGTH_V36)\n+\t\treturn;\n \tprintf(\"\\tThread Enabled: 0x%04x\\n\", table->thread_enabled);\n }\n \n@@ -529,6 +542,8 @@ static void smbios_print_type7(struct smbios_type7 *table)\n \tprintf(\"\\tInstalled Size: 0x%04x\\n\", table->inst_size.data);\n \tprintf(\"\\tSupported SRAM Type: 0x%04x\\n\", table->supp_sram_type.data);\n \tprintf(\"\\tCurrent SRAM Type: 0x%04x\\n\", table->curr_sram_type.data);\n+\tif (table->hdr.length < SMBIOS_TYPE7_LENGTH_V21)\n+\t\treturn;\n \tprintf(\"\\tCache Speed: 0x%02x\\n\", table->speed);\n \tsmbios_print_lookup_str(err_corr_type_strings,\n \t\t\t\ttable->err_corr_type,\n@@ -542,6 +557,8 @@ static void smbios_print_type7(struct smbios_type7 *table)\n \t\t\t\ttable->associativity,\n \t\t\t\tARRAY_SIZE(associativity_strings),\n \t\t\t\t\"Associativity\");\n+\tif (table->hdr.length < SMBIOS_TYPE7_LENGTH_V31)\n+\t\treturn;\n \tprintf(\"\\tMaximum Cache Size 2: 0x%08x\\n\", table->max_size2.data);\n \tprintf(\"\\tInstalled Cache Size 2: 0x%08x\\n\", table->inst_size2.data);\n }\n@@ -574,8 +591,12 @@ static void smbios_print_type9(struct smbios_type9 *table)\n \tprintf(\"\\tSlot ID: 0x%04x\\n\", table->slot_id);\n \tprintf(\"\\tSlot Characteristics 1: 0x%04x\\n\",\n \t       table->slot_characteristics_1);\n+\tif (table->hdr.length < SMBIOS_TYPE9_LENGTH_V21)\n+\t\treturn;\n \tprintf(\"\\tSlot Characteristics 2: 0x%04x\\n\",\n \t       table->slot_characteristics_2);\n+\tif (table->hdr.length < SMBIOS_TYPE9_LENGTH_V26)\n+\t\treturn;\n \tprintf(\"\\tSegment Group Number (Base): 0x%04x\\n\",\n \t       table->segment_group_number);\n \tprintf(\"\\tBus Number (Base): 0x%04x\\n\", table->bus_number);\n@@ -611,6 +632,8 @@ static void smbios_print_type9(struct smbios_type9 *table)\n static void smbios_print_type16(struct smbios_type16 *table)\n {\n \tprintf(\"Physical Memory Array:\\n\");\n+\tif (table->hdr.length < SMBIOS_TYPE16_LENGTH_V21)\n+\t\treturn;\n \tsmbios_print_lookup_str(ma_location_strings, table->location,\n \t\t\t\tARRAY_SIZE(ma_location_strings), \"Location\");\n \tsmbios_print_lookup_str(ma_use_strings, table->use,\n@@ -622,12 +645,16 @@ static void smbios_print_type16(struct smbios_type16 *table)\n \tprintf(\"\\tMemory Error Information Handle: 0x%04x\\n\",\n \t       table->mem_err_info_hdl);\n \tprintf(\"\\tNumber of Memory Devices: 0x%04x\\n\", table->num_of_mem_dev);\n+\tif (table->hdr.length < SMBIOS_TYPE16_LENGTH_V27)\n+\t\treturn;\n \tprintf(\"\\tExtended Maximum Capacity: 0x%016llx\\n\", table->ext_max_cap);\n }\n \n static void smbios_print_type17(struct smbios_type17 *table)\n {\n \tprintf(\"Memory Device:\\n\");\n+\tif (table->hdr.length < SMBIOS_TYPE17_LENGTH_V21)\n+\t\treturn;\n \tprintf(\"\\tPhysical Memory Array Handle: 0x%04x\\n\",\n \t       table->phy_mem_array_hdl);\n \tprintf(\"\\tMemory Error Information Handle: 0x%04x\\n\",\n@@ -644,17 +671,27 @@ static void smbios_print_type17(struct smbios_type17 *table)\n \tsmbios_print_lookup_str(md_type_strings, table->mem_type,\n \t\t\t\tARRAY_SIZE(md_type_strings), \"Memory Type\");\n \tprintf(\"\\tType Detail: 0x%04x\\n\", table->type_detail);\n+\tif (table->hdr.length < SMBIOS_TYPE17_LENGTH_V23)\n+\t\treturn;\n \tprintf(\"\\tSpeed: 0x%04x\\n\", table->speed);\n \tsmbios_print_str(\"Manufacturer\", table, table->manufacturer);\n \tsmbios_print_str(\"Serial Number\", table, table->serial_number);\n \tsmbios_print_str(\"Asset Tag\", table, table->asset_tag);\n \tsmbios_print_str(\"Part Number\", table, table->part_number);\n+\tif (table->hdr.length < SMBIOS_TYPE17_LENGTH_V26)\n+\t\treturn;\n \tprintf(\"\\tAttributes: 0x%04x\\n\", table->attributes);\n+\tif (table->hdr.length < SMBIOS_TYPE17_LENGTH_V27)\n+\t\treturn;\n \tprintf(\"\\tExtended Size: 0x%08x\\n\", table->ext_size);\n \tprintf(\"\\tConfigured Memory Speed: 0x%04x\\n\", table->config_mem_speed);\n+\tif (table->hdr.length < SMBIOS_TYPE17_LENGTH_V28)\n+\t\treturn;\n \tprintf(\"\\tMinimum voltage: 0x%04x\\n\", table->min_voltage);\n \tprintf(\"\\tMaximum voltage: 0x%04x\\n\", table->max_voltage);\n \tprintf(\"\\tConfigured voltage: 0x%04x\\n\", table->config_voltage);\n+\tif (table->hdr.length < SMBIOS_TYPE17_LENGTH_V32)\n+\t\treturn;\n \tsmbios_print_lookup_str(md_tech_strings, table->mem_tech,\n \t\t\t\tARRAY_SIZE(md_tech_strings),\n \t\t\t\t\"Memory Technology\");\n@@ -671,6 +708,8 @@ static void smbios_print_type17(struct smbios_type17 *table)\n \tprintf(\"\\tVolatile Size: 0x%016llx\\n\", table->volatile_size);\n \tprintf(\"\\tCache Size: 0x%016llx\\n\", table->cache_size);\n \tprintf(\"\\tLogical Size: 0x%016llx\\n\", table->logical_size);\n+\tif (table->hdr.length < SMBIOS_TYPE17_LENGTH_V33)\n+\t\treturn;\n \tprintf(\"\\tExtended Speed: 0x%04x\\n\", table->ext_speed);\n \tprintf(\"\\tExtended Configured Memory Speed: 0x%04x\\n\",\n \t       table->ext_config_mem_speed);\n@@ -683,10 +722,14 @@ static void smbios_print_type17(struct smbios_type17 *table)\n static void smbios_print_type19(struct smbios_type19 *table)\n {\n \tprintf(\"Memory Array Mapped Address:\\n\");\n+\tif (table->hdr.length < SMBIOS_TYPE19_LENGTH_V21)\n+\t\treturn;\n \tprintf(\"\\tStarting Address: 0x%08x\\n\", table->start_addr);\n \tprintf(\"\\tEnding Address: 0x%08x\\n\", table->end_addr);\n \tprintf(\"\\tMemory Array Handle: 0x%04x\\n\", table->mem_array_hdl);\n \tprintf(\"\\tPartition Width: 0x%04x\\n\", table->partition_wid);\n+\tif (table->hdr.length < SMBIOS_TYPE19_LENGTH_V27)\n+\t\treturn;\n \tprintf(\"\\tExtended Starting Address: 0x%016llx\\n\", table->ext_start_addr);\n \tprintf(\"\\tExtended Ending Address: 0x%016llx\\n\", table->ext_end_addr);\n }\ndiff --git a/include/smbios.h b/include/smbios.h\nindex a0e47d51852..14a7d8e6c30 100644\n--- a/include/smbios.h\n+++ b/include/smbios.h\n@@ -110,10 +110,42 @@ struct __packed smbios_type0 {\n \tchar eos[SMBIOS_STRUCT_EOS_BYTES];\n };\n \n+#define SMBIOS_TYPE0_LENGTH_V24\t\t0x18\n+#define SMBIOS_TYPE0_LENGTH_V31\t\t0x1a\n+\n #define SMBIOS_TYPE1_LENGTH_V20\t\t0x08\n #define SMBIOS_TYPE1_LENGTH_V21\t\t0x19\n #define SMBIOS_TYPE1_LENGTH_V24\t\t0x1b\n \n+#define SMBIOS_TYPE4_LENGTH_V20\t\t0x1a\n+#define SMBIOS_TYPE4_LENGTH_V23\t\t0x23\n+#define SMBIOS_TYPE4_LENGTH_V25\t\t0x28\n+#define SMBIOS_TYPE4_LENGTH_V26\t\t0x2a\n+#define SMBIOS_TYPE4_LENGTH_V30\t\t0x30\n+#define SMBIOS_TYPE4_LENGTH_V36\t\t0x32\n+\n+#define SMBIOS_TYPE7_LENGTH_V20\t\t0x0f\n+#define SMBIOS_TYPE7_LENGTH_V21\t\t0x13\n+#define SMBIOS_TYPE7_LENGTH_V31\t\t0x1b\n+\n+#define SMBIOS_TYPE9_LENGTH_V20\t\t0x0c\n+#define SMBIOS_TYPE9_LENGTH_V21\t\t0x0d\n+#define SMBIOS_TYPE9_LENGTH_V26\t\t0x11\n+\n+#define SMBIOS_TYPE16_LENGTH_V21\t0x0f\n+#define SMBIOS_TYPE16_LENGTH_V27\t0x17\n+\n+#define SMBIOS_TYPE17_LENGTH_V21\t0x15\n+#define SMBIOS_TYPE17_LENGTH_V23\t0x1b\n+#define SMBIOS_TYPE17_LENGTH_V26\t0x1c\n+#define SMBIOS_TYPE17_LENGTH_V27\t0x22\n+#define SMBIOS_TYPE17_LENGTH_V28\t0x28\n+#define SMBIOS_TYPE17_LENGTH_V32\t0x54\n+#define SMBIOS_TYPE17_LENGTH_V33\t0x5c\n+\n+#define SMBIOS_TYPE19_LENGTH_V21\t0x0f\n+#define SMBIOS_TYPE19_LENGTH_V27\t0x1f\n+\n struct __packed smbios_type1 {\n \tstruct smbios_header hdr;\n \tu8 manufacturer;\n",
    "prefixes": [
        "v5",
        "6/6"
    ]
}