Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229055/?format=api
{ "id": 2229055, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229055/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-arc/patch/5b09e58a84c9edcfe5724db5cd57e45d96a96bfa.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": "<5b09e58a84c9edcfe5724db5cd57e45d96a96bfa.1777306795.git.chleroy@kernel.org>", "date": "2026-04-27T17:13:49", "name": "[RFC,v1,8/9] arm64: Add unsafe_copy_from_user()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9b83fad888c09ba519a98157b628df551d07a21f", "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/5b09e58a84c9edcfe5724db5cd57e45d96a96bfa.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/2229055/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229055/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=Qt5e4Pbg;\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=lp9wELlr;\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 4g49KJ73J7z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 03:19:16 +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 1wHPc3-0000000HRua-37AB;\n\tMon, 27 Apr 2026 17:19:15 +0000", "from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHPc0-0000000HRrh-3fSu;\n\tMon, 27 Apr 2026 17:19:12 +0000", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id 5077960139;\n\tMon, 27 Apr 2026 17:19:12 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 1FAFFC2BCB4;\n\tMon, 27 Apr 2026 17:18:59 +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=l1fv1kqaBrKYnuxXK3OxNXczcAqQe8scp9z6XNPIzWc=; b=Qt5e4Pbgcq1byh\n\tBUECvso1qNnhZLg92R5b2FHchInwYBpj46k9KpkUOCu2A6YK7c1gft9xTH6F1mgWBRFj2Xsm50v/c\n\tGbbsnqSdnNRYgq7jGq42L6N/QETZRJwI82Hy5dp0vzxgEwln40Np3ypcz5a2OdSDAgVoHlQci857a\n\tYGLoLT5hP/QjJW2S8qCRJpCk75QRF5t7vXBQdCj7VvCs9DjpMvhoN/UPKhniRABSjkR+AYPP0YONb\n\tJkHAODqPU/ze2OV2MaRUJqFNMiupLSVTABut+bXFDiu/DrUTgK+1aEckQ+JAsvBzuBIRyOEYMeDLb\n\tf7VBYLSFeWrxirxuFjLA==;", "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777310352;\n\tbh=vbZIj5I8a11ig9c375SeIMkNInKGe+jckYb8HPag1tw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=lp9wELlrvJvoeuCK0/zMI5UANnrsQ+T4se/gBOunN8iQDrEi1RstW5G65/9vUEPmI\n\t U9UXqoktuU7EViGdT+8yzDZHjl2N0E5vd9veY8uQePuAD9x0oGHf4CotQwSmAD24go\n\t gSXTECesL9+kQmgNOk7myjSgr8UboLxcnh/OrEADTLSIqRqZRx4YwXDl6QWc3wVNsO\n\t sB/2ZwfKCyhos7Vj9aXXCgNggtmoXoIYLpWXmI9TjsLctEcOG8w3vDT/K6+fVh16nS\n\t /UcGgkCV5vp5qC1VRJeMqVPGsaV7+wscOAZaxlqKS8j4DsLjsIu1iQmtuFIX3tL+zm\n\t kvFBNXQR3j5iw==" ], "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 8/9] arm64: Add unsafe_copy_from_user()", "Date": "Mon, 27 Apr 2026 19:13:49 +0200", "Message-ID": "\n <5b09e58a84c9edcfe5724db5cd57e45d96a96bfa.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=2498; i=chleroy@kernel.org;\n h=from:subject:message-id; bh=vbZIj5I8a11ig9c375SeIMkNInKGe+jckYb8HPag1tw=;\n b=owGbwMvMwCV2d0KB2p7V54MZT6slMWS+nxmbKDOhb/vkF5+62Iv+nzi0lmWmkWf+tSO3HK9yP\n D89hV+LoaOUhUGMi0FWTJHl+H/uXTO6vqTmT92lDzOHlQlkCAMXpwBMJCKWkeGFnFP5dUbGE1cO\n pXr18eg3ndoc9ubDcl2tYxbdt9o1nmkyMvQuDCp+FV4TvfDP3c6+r/YFCyvUNTZlcrea/2SZ/OM\n dBwcA", "X-Developer-Key": "i=chleroy@kernel.org; a=openpgp;\n fpr=10FFE6F8B390DE17ACC2632368A92FEB01B8DD78", "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/arm64/include/asm/uaccess.h | 29 ++++++++++++++++++++++++-----\n 1 file changed, 24 insertions(+), 5 deletions(-)", "diff": "diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h\nindex 1e20ec91b56f..adfdb52cd82b 100644\n--- a/arch/arm64/include/asm/uaccess.h\n+++ b/arch/arm64/include/asm/uaccess.h\n@@ -437,7 +437,7 @@ static inline void user_access_restore(unsigned long enabled) { }\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@@ -450,10 +450,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 extern unsigned long __must_check __arch_clear_user(void __user *to, unsigned long n);\n", "prefixes": [ "RFC", "v1", "8/9" ] }