get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2220032,
    "url": "http://patchwork.ozlabs.org/api/patches/2220032/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-arc/patch/20260406152001.2-arc-dt-cpumap-v2-pengpeng@iscas.ac.cn/",
    "project": {
        "id": 48,
        "url": "http://patchwork.ozlabs.org/api/projects/48/?format=api",
        "name": "Linux ARC development",
        "link_name": "linux-arc",
        "list_id": "linux-snps-arc.lists.infradead.org",
        "list_email": "linux-snps-arc@lists.infradead.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260406152001.2-arc-dt-cpumap-v2-pengpeng@iscas.ac.cn>",
    "list_archive_url": null,
    "date": "2026-04-06T07:00:00",
    "name": "[v2] arc: validate DT CPU map strings before parsing them",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "aed2cb1ecb8b50976b5bed6a71165a10634bc2ac",
    "submitter": {
        "id": 93000,
        "url": "http://patchwork.ozlabs.org/api/people/93000/?format=api",
        "name": "Pengpeng Hou",
        "email": "pengpeng@iscas.ac.cn"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-arc/patch/20260406152001.2-arc-dt-cpumap-v2-pengpeng@iscas.ac.cn/mbox/",
    "series": [
        {
            "id": 498813,
            "url": "http://patchwork.ozlabs.org/api/series/498813/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-arc/list/?series=498813",
            "date": "2026-04-06T07:00:00",
            "name": "[v2] arc: validate DT CPU map strings before parsing them",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/498813/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2220032/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2220032/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "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 secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=j3J2b1hE;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fpsZT26xHz1yFt\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 11:44:28 +1000 (AEST)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w9Z0r-00000004giG-3Pot;\n\tMon, 06 Apr 2026 01:44:25 +0000",
            "from smtp25.cstnet.cn ([159.226.251.25] helo=cstnet.cn)\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w9Z0p-00000004gha-0IQi\n\tfor linux-snps-arc@lists.infradead.org;\n\tMon, 06 Apr 2026 01:44:24 +0000",
            "from 0001-arc-v2.eml (unknown [111.196.245.197])\n\tby APP-05 (Coremail) with SMTP id zQCowAC3Sg70D9NpD3imDA--.29086S2;\n\tMon, 06 Apr 2026 09:44:20 +0800 (CST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:\n\tList-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References:\n\tIn-Reply-To:Cc:To:Message-ID:Date:From:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=IdWk/kyCSAiF+a5CVHpIhwg/FvgdkNdAJ4Mnz8kFlpE=; b=j3J2b1hEE3rMSfdaXeFkXJfBMb\n\tTG8EL8AsF49G7LQWjDnqCzFEDvfBr2WqmcYTG9iJvfl261+wZttZt5jR/CN6CmnTOAl9ipxdiXvAb\n\tkuYOjhQ2klf2VpXvgYSlKbwaITBE8Vciknxzd9Ton6WVLBOEY0pnBM44wlfLgrdgVoGWucWOHXvDn\n\tEI1R7Cxz04G2Un5m1Xxx7/GMhqiQY/Yj0Gk65J7IyHccrWdNzVP7i8jXFPtdEM7DX4toGUABjRfAB\n\tuSMUvjn5hZ8CZ3ItodIdAjYQ6CBCLNwM/ih64PtZJIPL3QKGoz89IxNFZGSpcThV35IisLNDxB4w1\n\t+T7Z6qKQ==;",
        "From": "Pengpeng Hou <pengpeng@iscas.ac.cn>",
        "Date": "Mon, 6 Apr 2026 15:00:00 +0800",
        "Message-ID": "<20260406152001.2-arc-dt-cpumap-v2-pengpeng@iscas.ac.cn>",
        "To": "Vineet Gupta <vgupta@kernel.org>",
        "Cc": "linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,\n pengpeng@iscas.ac.cn",
        "In-Reply-To": "<20260403161002.2-arc-dt-cpumap-pengpeng@iscas.ac.cn>",
        "References": "<20260403161002.2-arc-dt-cpumap-pengpeng@iscas.ac.cn>",
        "Subject": "[PATCH v2] arc: validate DT CPU map strings before parsing them",
        "X-CM-TRANSID": "zQCowAC3Sg70D9NpD3imDA--.29086S2",
        "X-Coremail-Antispam": "1UD129KBjvJXoW7AFy3uryUtF1xWF47CrWkCrg_yoW8Gw4fpF\n\tZ09FyqgrWqvwn7Ja4qyr1xua4Ygwn7Jr129FW5Kw47Za17try8XrZI9F1v9r1xAr409a4a\n\tkFZ8uF4qyr4UAaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUkK14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\n\trVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUWVWUZwA2ocxC64kIII\n\t0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xv\n\twVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4\n\tx0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8C\n\trVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxV\n\tWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lF7I21c0EjII2zVCS5cI2\n\t0VAGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrV\n\tAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCI\n\tc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267\n\tAKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_\n\tGr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7sREbAwU\n\tUUUUU==",
        "X-Originating-IP": "[111.196.245.197]",
        "X-CM-SenderInfo": "pshqw1xhqjqxpvfd2hldfou0/",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260405_184423_484818_45EB2999 ",
        "X-CRM114-Status": "UNSURE (   7.78  )",
        "X-CRM114-Notice": "Please train this message.",
        "X-Spam-Score": "1.1 (+)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  arc_get_cpu_map() fetches the possible-cpus or present-cpus\n    property from the flat DT and immediately passes the raw pointer to\n cpulist_parse().\n    That parser expects a NUL-terminated text buffer, but t [...]\n Content analysis details:   (1.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n                             query to Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                         [159.226.251.25 listed in\n sa-trusted.bondedsender.org]\n  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [159.226.251.25 listed in sa-accredit.habeas.com]\n  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                            [159.226.251.25 listed in\n bl.score.senderscore.com]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  3.0 DATE_IN_FUTURE_03_06   Date: is 3 to 6 hours after Received: date\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [159.226.251.25 listed in list.dnswl.org]\n  0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)\n                             [159.226.251.25 listed in wl.mailspike.net]",
        "X-BeenThere": "linux-snps-arc@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "Linux on Synopsys ARC Processors <linux-snps-arc.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-snps-arc>,\n <mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-snps-arc/>",
        "List-Post": "<mailto:linux-snps-arc@lists.infradead.org>",
        "List-Help": "<mailto:linux-snps-arc-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-snps-arc>,\n <mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-snps-arc\" <linux-snps-arc-bounces@lists.infradead.org>",
        "Errors-To": "\n linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "arc_get_cpu_map() fetches the possible-cpus or present-cpus property\nfrom the flat DT and immediately passes the raw pointer to\ncpulist_parse(). That parser expects a NUL-terminated text buffer, but\nthis path does not prove that the DT property is terminated within its\ndeclared bounds.\n\nReject unterminated CPU-map properties before handing them to\ncpulist_parse().\n\nChanges since v1:\n- fold the NUL-termination check into the initial lookup test, as\n  suggested by Vineet Gupta\n\nSigned-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>\n---\n arch/arc/kernel/smp.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\n \t\treturn -EINVAL;\n \n \treturn 0;\n }",
    "diff": "diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c\nindex b2f2c59279a6..632976c22107 100644\n--- a/arch/arc/kernel/smp.c\n+++ b/arch/arc/kernel/smp.c\n@@ -22,6 +22,7 @@\n #include <linux/irqdomain.h>\n #include <linux/export.h>\n #include <linux/of_fdt.h>\n+#include <linux/string.h>\n \n #include <asm/mach_desc.h>\n #include <asm/setup.h>\n@@ -43,9 +44,10 @@ static int __init arc_get_cpu_map(const char *name, struct cpumask *cpumask)\n {\n \tunsigned long dt_root = of_get_flat_dt_root();\n \tconst char *buf;\n+\tint len;\n \n-\tbuf = of_get_flat_dt_prop(dt_root, name, NULL);\n-\tif (!buf)\n+\tbuf = of_get_flat_dt_prop(dt_root, name, &len);\n+\tif (!buf || !memchr(buf, '\\0', len))\n \t\treturn -EINVAL;\n \n \tif (cpulist_parse(buf, cpumask))\n",
    "prefixes": [
        "v2"
    ]
}