From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E934E28D8E8; Thu, 23 Oct 2025 18:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761245058; cv=none; b=FbVraLigPqXCyVV2mP+qDuOXQzPR4pwPPEHsOX7oBspfuybeCBXbP6VX/a6ED323Za4TmfuUvhlAmirTPSTzZ0mGRzBeUK/VotiIeghiiDMrVQr3v2Zx7T0LBusoVU82paWaVGnLfwUsfAteNmSgUvhX8FdmgUrehZi/TIEnak8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761245058; c=relaxed/simple; bh=ID+SpeZlrXXoHcTWUOnXULiwe1j+Sg0bew4QgPVBIVo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tP/jW7AsYCh2sFMSYANIcQLKRktH8Hc4It0j2gJV4jMn/Ovgxd1ee6Hf4XPeY1aUeKZuZmHkg5OGVx3HaRAPP7lDPyAVfbnqY8TblCXCK5uEadtjBRt3nDGixvoHuYJmkuTbi5n4PQL8BrsOJ8d+79fQ8iUrd11WMluEq2/31vs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Z6JyVVvX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=k2PqTysZ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Z6JyVVvX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="k2PqTysZ" From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1761245054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gr+iTa6I2/obiorgX/iYvIq85HArhg0aBMc30DEux0I=; b=Z6JyVVvXaWOYv4K7XWupHxBpzZlYpgf5Va2pTz0xKoekHimqy8m9kpzWJR67k8NTSge6Pu pj1eoQeYp8npSoNhcmRFl+wtklkvdSbntGU/+ZU+VkEYhATJ/2w67pfLl6NrKzFL8YkFBj tz+RIae+Vg6+/gA7ZwvSAx8jyyfFhHWoerQNsfsX8vZwG++ZSmVquE3u5d9Qky5u/pWhfe Z27mkNjesStYEnSIaLWsvH9GU2GdvVJ+/1wsaxCCyTnv7bk0dW7oyVKDPvU36ZH4tGdIz0 SAAZZgn3S2Kdp9w4d8AFHEvN5ZwXz+cPMrMK16HbkBELjB3xvZYnc/4yMJ00yA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1761245054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gr+iTa6I2/obiorgX/iYvIq85HArhg0aBMc30DEux0I=; b=k2PqTysZqIKK5wnAuNAF6YkOs1yYrSVeb86wNNECOCJRF4fnFtNx18Z5K79S+1+JpepjUk +w4iQ08K50QRq8Bg== To: Linus Torvalds Cc: LKML , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?utf-8?Q?Andr=C3=A9?= Almeida , kernel test robot , Russell King , linux-arm-kernel@lists.infradead.org, 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 , David Laight , Julia Lawall , Nicolas Palix , Alexander Viro , Christian Brauner , Jan Kara , linux-fsdevel@vger.kernel.org Subject: Re: [patch V4 10/12] futex: Convert to scoped user access In-Reply-To: References: <20251022102427.400699796@linutronix.de> <20251022103112.478876605@linutronix.de> Date: Thu, 23 Oct 2025 20:44:13 +0200 Message-ID: <873479xxtu.ffs@tglx> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, Oct 22 2025 at 05:16, Linus Torvalds wrote: > On Wed, 22 Oct 2025 at 02:49, Thomas Gleixner wrote: >> >> From: Thomas Gleixner >> >> Replace the open coded implementation with the new get/put_user_scoped() >> helpers. > > Well, "scoped" here makes no sense in the name, since it isn't scoped > in any way, it just uses the scoped helpers. I know. Did not come up with a sensible name so far. > I also wonder if we should just get rid of the futex_get/put_value() > macros entirely. I did those masked user access things them long ago > because that code used "__get_user()" and "__put_user()", and I was > removing those helpers and making it match the pattern elsewhere, but > I do wonder if there is any advantage left to them all. > > On x86, just using "get_user()" and "put_user()" should work fine now. > Yes, they check the address, but these days *those* helpers use that > masked user address trick too, so there is no real cost to it. > > The only cost would be the out-of-line function call, I think. Maybe > that is a sufficiently big cost here. I'll have a look at the usage sites. But as you said out-of-line function call it occured to me that these helpers might be just named get/put_user_inline(). Hmm? Thanks, tglx