{"id":2229040,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229040/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-um/patch/9e8e43d4f81d8f8b6f68311f1c6f859d718d36e4.1777306795.git.chleroy@kernel.org/","project":{"id":60,"url":"http://patchwork.ozlabs.org/api/1.1/projects/60/?format=json","name":"User-mode Linux Development","link_name":"linux-um","list_id":"linux-um.lists.infradead.org","list_email":"linux-um@lists.infradead.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<9e8e43d4f81d8f8b6f68311f1c6f859d718d36e4.1777306795.git.chleroy@kernel.org>","date":"2026-04-27T17:13:44","name":"[RFC,v1,3/9] x86/umip: Be stricter in fixup_umip_exception()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"2170f17908afe3120d1f532ff1c485d2f2e5d3cc","submitter":{"id":92089,"url":"http://patchwork.ozlabs.org/api/1.1/people/92089/?format=json","name":"Christophe Leroy (CS GROUP)","email":"chleroy@kernel.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-um/patch/9e8e43d4f81d8f8b6f68311f1c6f859d718d36e4.1777306795.git.chleroy@kernel.org/mbox/","series":[{"id":501693,"url":"http://patchwork.ozlabs.org/api/1.1/series/501693/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-um/list/?series=501693","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/501693/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2229040/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2229040/checks/","tags":{},"headers":{"Return-Path":"\n <linux-um-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=LYPwDITy;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=dWIdgH61;\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-um-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 4g49Hr6nMFz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 03:18:00 +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 1wHPap-0000000HQsG-0jni;\n\tMon, 27 Apr 2026 17:17:59 +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 1wHPam-0000000HQpR-3m2B;\n\tMon, 27 Apr 2026 17:17:57 +0000","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id D6C426024D;\n\tMon, 27 Apr 2026 17:17:55 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 5B91DC2BCB9;\n\tMon, 27 Apr 2026 17:17:32 +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:List-Subscribe:List-Help\n\t:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:\n\tMIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:\n\tReply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=aMiFQ9YDeWWeAvKmml+uHoGAC+wRXXMneJLs8f7ea2c=; b=LYPwDITyBpEw/CrdghSqKbPSI0\n\teyy1WLWLs3vB55HdrJD0Rico0Gfs5Mod2OuB3fHcjswb23Z8OGZC0XSamkWk+5eAUrNhq2U8yxE28\n\tPtGq3MxsR8ouOAl+uSdFupvsIkZKQqxM/jKQO6YgNwEcAbfqc1S83HlbFPPtOTXSTUzspxiPsYeka\n\td1gI9bbYirGmAkTZxRBhFcTkSYTJ3dGwpLMRFi75+ngs09QKPPAo+lp4+BzBJzaak8kmk28CH3NUv\n\tgsYKXgGTYldw8uSmNBbDd00Y0NhIzSHykvbwsFlyiIED+19N+JhYp4aYw41/FZeWa6YDVxNXU1m/J\n\tTqjyS4SA==;","v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777310275;\n\tbh=W5kkD2qOaf9p6y+JEmiY6YQ2keZoelr0Bif5djAA9uo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=dWIdgH61f3FZjJK5/4M8qA2Z3PdTv2PxzuZWcauBhk9DdVxbBkauIdrH8T66hguCp\n\t RKByLYUodinjcBlbYhttuH2LGK1CACi5Chox46drqrLCValqYMs6iS6hvWfa8xjP86\n\t SRX8mzMn7HjzzZ5PMWVnIWvrJFLR/iyEIDn4Oi2BFSrDeboqSnIrX7WfhL6Ub+tY2g\n\t I0hH+wNzy6c//f0TkDzcuax+fX8WXY8rTh4FJ51XM25PFd/tzjClOdpIOdXk4NjGqA\n\t oBIlgUIOAdKFgg5RvdKRR4Lqk1Q+lbng1I1sXXDqtORIX/zFE6g7Yv8vrz97KbzGDV\n\t XrdmpG3tF9W3Q=="],"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 3/9] x86/umip: Be stricter in fixup_umip_exception()","Date":"Mon, 27 Apr 2026 19:13:44 +0200","Message-ID":"\n <9e8e43d4f81d8f8b6f68311f1c6f859d718d36e4.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=1000; i=chleroy@kernel.org;\n h=from:subject:message-id; bh=W5kkD2qOaf9p6y+JEmiY6YQ2keZoelr0Bif5djAA9uo=;\n b=owGbwMvMwCV2d0KB2p7V54MZT6slMWS+nxnda1Jdur5TX+RgO1P4hHufdruHR358Lz3BYPORx\n G8pRRuZOkpZGMS4GGTFFFmO/+feNaPrS2r+1F36MHNYmUCGMHBxCsBE9kkxMjTtX+zW2RH44ELN\n UZ/TjtH3Kj+Uzdh01e2y7qEZTgrchx8y/E9kjcpJ3dj/tNZwXUT0XHGmyS9k3dX75mj427u7JaY\n VMwMA","X-Developer-Key":"i=chleroy@kernel.org; a=openpgp;\n fpr=10FFE6F8B390DE17ACC2632368A92FEB01B8DD78","Content-Transfer-Encoding":"8bit","X-BeenThere":"linux-um@lists.infradead.org","X-Mailman-Version":"2.1.34","Precedence":"list","List-Id":"<linux-um.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-um/>","List-Post":"<mailto:linux-um@lists.infradead.org>","List-Help":"<mailto:linux-um-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=subscribe>","Sender":"\"linux-um\" <linux-um-bounces@lists.infradead.org>","Errors-To":"linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"fixup_umip_exception() calls copy_to_user() and checks whether\nthe returned value is strictly positive.\n\nA subsequent patch will change the return of copy_to_user() to\nreturn -EFAULT in case of error.\n\nChange the test to checking that the result is not 0.\n\nAt the time being copy_to_user() return an unsigned value so\n'strictly positive' is the same as 'not 0'.\n\nSigned-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>\n---\n arch/x86/kernel/umip.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/arch/x86/kernel/umip.c b/arch/x86/kernel/umip.c\nindex 3ce99cbcf187..dfff28ea1dea 100644\n--- a/arch/x86/kernel/umip.c\n+++ b/arch/x86/kernel/umip.c\n@@ -409,7 +409,7 @@ bool fixup_umip_exception(struct pt_regs *regs)\n \t\t\treturn false;\n \n \t\tnr_copied = copy_to_user(uaddr, dummy_data, dummy_data_size);\n-\t\tif (nr_copied  > 0) {\n+\t\tif (nr_copied) {\n \t\t\t/*\n \t\t\t * If copy fails, send a signal and tell caller that\n \t\t\t * fault was fixed up.\n","prefixes":["RFC","v1","3/9"]}