From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48BB4CCD195 for ; Fri, 17 Oct 2025 10:38:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nWS8mbbAyKknksTkgFaSq1Uk5/fAQaz/isktn9K57hg=; b=Qs2HBnjjVI5IpyG2jWv3n/50M9 +2kLp9gy3Iza487DwQZcyfFCh8A806O5iUbXvhp5utQIz5T00i4ELu+Ln9MwFLfoHck5vo5LRfFX5 nNTdHHJ3IDjS4LLtWkErhhram9+v3iOJyuQJvceY50tXaclCr98DwtCdf8lQ7jH77vqTjAbuow4M+ mjG61PFQlY1jckc3t/FFMX4LdIdruNrTRcRxkr4ARhhBb7m+G9kX9dr5RP+W9Lb+Fd9vdtTlPbf92 qvaLctc6kTeJTweolJ8rAUPrQX+IvSzDhgNcv86bybgUv/+M9yzZ7H4YmJFxDsibK/YnTymC9v2Ro PrgDd+Tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9hqW-00000007YNT-4780; Fri, 17 Oct 2025 10:38:05 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9hqV-00000007YND-2y3l; Fri, 17 Oct 2025 10:38:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nWS8mbbAyKknksTkgFaSq1Uk5/fAQaz/isktn9K57hg=; b=rx05nYJAYN+RTwLB2lGfP1bKqX cPz5fqwLakGazsonqYKuradYhuAqs/nZNMp1UmMdmEfCx/0wwDD1Jo8DUW2lVPnJwIO6NufWGAA9r ZiUDqFrLMAam5RoKlt9adHo8b8Nkesw6GoiJ3pPrPHmQwBLTDcZDeMMDpoeIh/vzMVcK8i9VuHnvA GdtPmogaKpTQntPRIva/xPzJCazhbx9a7ZE/fV3ObzJngfuEGmNt4pPpmcf/oqbUye2TOgbB5JjbS DIiU97r47NbJ1u6sTo7huCPbrCOm4ElFLO5G2diIbCi3+DVFhpmeU5zExTsMiYzZevf9n4rETyW3X VfZs2JcA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9hqO-00000008mcj-0Bmj; Fri, 17 Oct 2025 10:37:57 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 8AB1130023C; Fri, 17 Oct 2025 12:37:55 +0200 (CEST) Date: Fri, 17 Oct 2025 12:37:55 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , kernel test robot , Russell King , linux-arm-kernel@lists.infradead.org, Linus Torvalds , x86@kernel.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Heiko Carstens , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org, Mathieu Desnoyers , Andrew Cooper , Julia Lawall , Nicolas Palix , Darren Hart , Davidlohr Bueso , =?iso-8859-1?Q?Andr=E9?= Almeida , Alexander Viro , Christian Brauner , Jan Kara , linux-fsdevel@vger.kernel.org Subject: Re: [patch V3 00/12] uaccess: Provide and use scopes for user masked access Message-ID: <20251017103755.GZ4067720@noisy.programming.kicks-ass.net> References: <20251017085938.150569636@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251017085938.150569636@linutronix.de> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 17, 2025 at 12:08:54PM +0200, Thomas Gleixner wrote: > After some back and forth discussion Linus suggested to put the local label > workaround into the user access functions themself. > Andrew thankfully pointed me to nested for() loops and after some head > scratching I managed to get all of it hidden in that construct. These two hacks are awesome and made my day; thanks! > Thomas Gleixner (12): > ARM: uaccess: Implement missing __get_user_asm_dword() > uaccess: Provide ASM GOTO safe wrappers for unsafe_*_user() > x86/uaccess: Use unsafe wrappers for ASM GOTO > powerpc/uaccess: Use unsafe wrappers for ASM GOTO > riscv/uaccess: Use unsafe wrappers for ASM GOTO > s390/uaccess: Use unsafe wrappers for ASM GOTO > uaccess: Provide scoped masked user access regions > uaccess: Provide put/get_user_masked() > futex: Convert to scoped masked user access > x86/futex: Convert to scoped masked user access Acked-by: Peter Zijlstra (Intel) > select: Convert to scoped masked user access Basically okay on this one too, except see the comment. > coccinelle: misc: Add scoped_masked_$MODE_access() checker script And that's just pure magic, I can't seem to get me head around coccinelle syntax.