get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2229051,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229051/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-arc/patch/0ee46bb228d97163fbdc14f2a7c52b93d8bc34ce.1777306795.git.chleroy@kernel.org/",
    "project": {
        "id": 48,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": ""
    },
    "msgid": "<0ee46bb228d97163fbdc14f2a7c52b93d8bc34ce.1777306795.git.chleroy@kernel.org>",
    "date": "2026-04-27T17:13:48",
    "name": "[RFC,v1,7/9] x86: Add unsafe_copy_from_user()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c8386877599f25dd852e3a6093a029b948f11fda",
    "submitter": {
        "id": 92089,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/92089/?format=api",
        "name": "Christophe Leroy (CS GROUP)",
        "email": "chleroy@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-arc/patch/0ee46bb228d97163fbdc14f2a7c52b93d8bc34ce.1777306795.git.chleroy@kernel.org/mbox/",
    "series": [
        {
            "id": 501692,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501692/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-arc/list/?series=501692",
            "date": "2026-04-27T17:13:41",
            "name": "uaccess: Convert small fixed size copy_{to/from}_user() to scoped user access",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501692/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229051/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229051/checks/",
    "tags": {},
    "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=m3mo3gFO;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=kdO2kRaq;\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 4g49K54rXRz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 03:19:05 +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 1wHPbr-0000000HRk2-4Bj5;\n\tMon, 27 Apr 2026 17:19:04 +0000",
            "from sea.source.kernel.org ([172.234.252.31])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHPbo-0000000HRg2-000Q;\n\tMon, 27 Apr 2026 17:19:01 +0000",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby sea.source.kernel.org (Postfix) with ESMTP id 9368940C54;\n\tMon, 27 Apr 2026 17:18:59 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 59C90C2BCB4;\n\tMon, 27 Apr 2026 17:18:46 +0000 (UTC)"
        ],
        "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:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=RB5Lr3V/PUyeF3y++hhrSscp31KgKVnk6wGjWvBVF3o=; b=m3mo3gFO/SSjeZ\n\toUwiQv/s3pFf14YtivSZMGJLcpY06RCHcGCCe0CF7voUgHGj4yPs8t/U3Oy/TV5XaCTtX05wQYxiV\n\tG/0q0xDA2y0W0f2DuPntudJyaV+qnvA0IgkJ9K3wmZa3gf6RtVkw6/EY1XFR6FlKOShtTZXw6EQPY\n\tobBTUUA4UO8Lf4gi4HvkyR1Xcmt6F+Wybm1tgC1ur9NfQiHWvBxiV59m2yBe9aJ8Qajlg2jtUI2T2\n\taCRKjNPzJvB7jdKzTXChY6g+jn6N9sGFu5Ppj6844hLB/4ZGlyAH1MM1S+ERh4EsyvrGiMqT4iodA\n\tcNXsLy10SOma84t/V/8Q==;",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777310339;\n\tbh=VVuQn2YnZFi2JH9uh9hmEqXb1BpygsXabSyFGnhBvmI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kdO2kRaqrKnrRzE/uOUoSc+QuIvBLF9bEcfUYb9jTJLWJk0AT883/0gLUkpYyvhxW\n\t JwKLSaa6O8znPG+ygzo4nQLM8J0f65SbAuU342P7t8CFNHOEuyufyC86uU6TKB6BuB\n\t gSew3oyOMPJ8ALphDrpzU/JPmVzf88NlkSTCpSsq0dGpC1oXnkppqU6so9I0ayHunG\n\t vmD6szQq9NnauXryTPXCD0GLKF95gnwZ47owOPgIM468cdafyYqaGorVn/T0ZUPF41\n\t utCUjd396YBehKkYMEmrRy4GP6QkmxuYFD7L2LBro+x9SzGKxh5BvzwrXlX1jpWNJG\n\t /RZq8/R9DjgcA=="
        ],
        "From": "\"Christophe Leroy (CS GROUP)\" <chleroy@kernel.org>",
        "To": "Yury Norov <ynorov@nvidia.com>,\n\tAndrew Morton <akpm@linux-foundation.org>,\n\tLinus Torvalds <torvalds@linux-foundation.org>,\n\tDavid Laight <david.laight.linux@gmail.com>,\n\tThomas Gleixner <tglx@linutronix.de>",
        "Cc": "\"Christophe Leroy (CS GROUP)\" <chleroy@kernel.org>,\n\tlinux-alpha@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-snps-arc@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-mips@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tkvm@vger.kernel.org,\n\tlinux-riscv@lists.infradead.org,\n\tlinux-s390@vger.kernel.org,\n\tsparclinux@vger.kernel.org,\n\tlinux-um@lists.infradead.org,\n\tdmaengine@vger.kernel.org,\n\tlinux-efi@vger.kernel.org,\n\tlinux-fsi@lists.ozlabs.org,\n\tamd-gfx@lists.freedesktop.org,\n\tdri-devel@lists.freedesktop.org,\n\tintel-gfx@lists.freedesktop.org,\n\tlinux-wpan@vger.kernel.org,\n\tnetdev@vger.kernel.org,\n\tlinux-wireless@vger.kernel.org,\n\tlinux-spi@vger.kernel.org,\n\tlinux-media@vger.kernel.org,\n\tlinux-staging@lists.linux.dev,\n\tlinux-serial@vger.kernel.org,\n\tlinux-usb@vger.kernel.org,\n\txen-devel@lists.xenproject.org,\n\tlinux-fsdevel@vger.kernel.org,\n\tocfs2-devel@lists.linux.dev,\n\tbpf@vger.kernel.org,\n\tkasan-dev@googlegroups.com,\n\tlinux-mm@kvack.org,\n\tlinux-x25@vger.kernel.org,\n\trust-for-linux@vger.kernel.org,\n\tlinux-sound@vger.kernel.org,\n\tsound-open-firmware@alsa-project.org,\n\tlinux-csky@vger.kernel.org,\n\tlinux-hexagon@vger.kernel.org,\n\tloongarch@lists.linux.dev,\n\tlinux-m68k@lists.linux-m68k.org,\n\tlinux-openrisc@vger.kernel.org,\n\tlinux-parisc@vger.kernel.org,\n\tlinux-sh@vger.kernel.org,\n\tlinux-arch@vger.kernel.org",
        "Subject": "[RFC PATCH v1 7/9] x86: Add unsafe_copy_from_user()",
        "Date": "Mon, 27 Apr 2026 19:13:48 +0200",
        "Message-ID": "\n <0ee46bb228d97163fbdc14f2a7c52b93d8bc34ce.1777306795.git.chleroy@kernel.org>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<cover.1777306795.git.chleroy@kernel.org>",
        "References": "<cover.1777306795.git.chleroy@kernel.org>",
        "MIME-Version": "1.0",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=2390; i=chleroy@kernel.org;\n h=from:subject:message-id; bh=VVuQn2YnZFi2JH9uh9hmEqXb1BpygsXabSyFGnhBvmI=;\n b=owGbwMvMwCV2d0KB2p7V54MZT6slMWS+nxljeGSBfXj99HCNy2WTVFXXC9z/Hmi+//aE1/MbC\n +50nw1Q6ChlYRDjYpAVU2Q5/p9714yuL6n5U3fpw8xhZQIZwsDFKQAT2djH8D+e3yYgNP/F6xtd\n z9QNXjIccVycwR574E38S3tWp2uq95Yy/M9xKJ2hYJCUJV9391rVwmlfl7x6GzD19bqwZeyVdgF\n fZ3MAAA==",
        "X-Developer-Key": "i=chleroy@kernel.org; a=openpgp;\n fpr=10FFE6F8B390DE17ACC2632368A92FEB01B8DD78",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260427_101900_093523_DC0CAFB2 ",
        "X-CRM114-Status": "UNSURE (   8.99  )",
        "X-CRM114-Notice": "Please train this message.",
        "X-Spam-Score": "-2.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:  At the time being,\n x86 and arm64 are missing unsafe_copy_from_user().\n    Add it. Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>\n ---\n    arch/x86/include/asm/uaccess.h | 29 ++++++++++++++++++++++++----- 1 file\n   changed, 24 insertions(+), 5 deletions(-)\n Content analysis details:   (-2.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender",
        "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>",
        "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": "At the time being, x86 and arm64 are missing unsafe_copy_from_user().\n\nAdd it.\n\nSigned-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>\n---\n arch/x86/include/asm/uaccess.h | 29 ++++++++++++++++++++++++-----\n 1 file changed, 24 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h\nindex 3a0dd3c2b233..10c458ffa399 100644\n--- a/arch/x86/include/asm/uaccess.h\n+++ b/arch/x86/include/asm/uaccess.h\n@@ -598,7 +598,7 @@ _label:\t\t\t\t\t\t\t\t\t\\\n  * We want the unsafe accessors to always be inlined and use\n  * the error labels - thus the macro games.\n  */\n-#define unsafe_copy_loop(dst, src, len, type, label)\t\t\t\t\\\n+#define unsafe_put_loop(dst, src, len, type, label)\t\t\t\t\\\n \twhile (len >= sizeof(type)) {\t\t\t\t\t\t\\\n \t\tunsafe_put_user(*(type *)(src),(type __user *)(dst),label);\t\\\n \t\tdst += sizeof(type);\t\t\t\t\t\t\\\n@@ -611,10 +611,29 @@ do {\t\t\t\t\t\t\t\t\t\\\n \tchar __user *__ucu_dst = (_dst);\t\t\t\t\\\n \tconst char *__ucu_src = (_src);\t\t\t\t\t\\\n \tsize_t __ucu_len = (_len);\t\t\t\t\t\\\n-\tunsafe_copy_loop(__ucu_dst, __ucu_src, __ucu_len, u64, label);\t\\\n-\tunsafe_copy_loop(__ucu_dst, __ucu_src, __ucu_len, u32, label);\t\\\n-\tunsafe_copy_loop(__ucu_dst, __ucu_src, __ucu_len, u16, label);\t\\\n-\tunsafe_copy_loop(__ucu_dst, __ucu_src, __ucu_len, u8, label);\t\\\n+\tunsafe_put_loop(__ucu_dst, __ucu_src, __ucu_len, u64, label);\t\\\n+\tunsafe_put_loop(__ucu_dst, __ucu_src, __ucu_len, u32, label);\t\\\n+\tunsafe_put_loop(__ucu_dst, __ucu_src, __ucu_len, u16, label);\t\\\n+\tunsafe_put_loop(__ucu_dst, __ucu_src, __ucu_len, u8, label);\t\\\n+} while (0)\n+\n+#define unsafe_get_loop(dst, src, len, type, label)\t\t\t\t\\\n+\twhile (len >= sizeof(type)) {\t\t\t\t\t\t\\\n+\t\tunsafe_get_user(*(type __user *)(src),(type *)(dst),label);\t\\\n+\t\tdst += sizeof(type);\t\t\t\t\t\t\\\n+\t\tsrc += sizeof(type);\t\t\t\t\t\t\\\n+\t\tlen -= sizeof(type);\t\t\t\t\t\t\\\n+\t}\n+\n+#define unsafe_copy_from_user(_dst,_src,_len,label)\t\t\t\\\n+do {\t\t\t\t\t\t\t\t\t\\\n+\tchar *__ucu_dst = (_dst);\t\t\t\t\t\\\n+\tconst char __user *__ucu_src = (_src);\t\t\t\t\\\n+\tsize_t __ucu_len = (_len);\t\t\t\t\t\\\n+\tunsafe_get_loop(__ucu_dst, __ucu_src, __ucu_len, u64, label);\t\\\n+\tunsafe_get_loop(__ucu_dst, __ucu_src, __ucu_len, u32, label);\t\\\n+\tunsafe_get_loop(__ucu_dst, __ucu_src, __ucu_len, u16, label);\t\\\n+\tunsafe_get_loop(__ucu_dst, __ucu_src, __ucu_len, u8, label);\t\\\n } while (0)\n \n #ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT\n",
    "prefixes": [
        "RFC",
        "v1",
        "7/9"
    ]
}