|
|
Log in / Subscribe / Register

uaccess: Provide and use scopes for user access

From:  Thomas Gleixner <tglx-AT-linutronix.de>
To:  LKML <linux-kernel-AT-vger.kernel.org>
Subject:  [patch V5 00/12] uaccess: Provide and use scopes for user access
Date:  Mon, 27 Oct 2025 09:43:40 +0100
Message-ID:  <20251027083700.573016505@linutronix.de>
Cc:  kernel test robot <lkp-AT-intel.com>, Russell King <linux-AT-armlinux.org.uk>, linux-arm-kernel-AT-lists.infradead.org, Linus Torvalds <torvalds-AT-linux-foundation.org>, x86-AT-kernel.org, Madhavan Srinivasan <maddy-AT-linux.ibm.com>, Michael Ellerman <mpe-AT-ellerman.id.au>, Nicholas Piggin <npiggin-AT-gmail.com>, Christophe Leroy <christophe.leroy-AT-csgroup.eu>, linuxppc-dev-AT-lists.ozlabs.org, Paul Walmsley <pjw-AT-kernel.org>, Palmer Dabbelt <palmer-AT-dabbelt.com>, linux-riscv-AT-lists.infradead.org, Heiko Carstens <hca-AT-linux.ibm.com>, Christian Borntraeger <borntraeger-AT-linux.ibm.com>, Sven Schnelle <svens-AT-linux.ibm.com>, linux-s390-AT-vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers-AT-efficios.com>, Andrew Cooper <andrew.cooper3-AT-citrix.com>, David Laight <david.laight.linux-AT-gmail.com>, Julia Lawall <Julia.Lawall-AT-inria.fr>, Nicolas Palix <nicolas.palix-AT-imag.fr>, Peter Zijlstra <peterz-AT-infradead.org>, Darren Hart <dvhart-AT-infradead.org>, Davidlohr Bueso <dave-AT-stgolabs.net>, AndrĂ© Almeida <andrealmeid-AT-igalia.com>, Alexander Viro <viro-AT-zeniv.linux.org.uk>, Christian Brauner <brauner-AT-kernel.org>, Jan Kara <jack-AT-suse.cz>, linux-fsdevel-AT-vger.kernel.org
Archive-link:  Article

This is a follow up on the V4 feedback:

   https://lore.kernel.org/20251022102427.400699796@linutron...

Changes vs. V4:

  - Rename get/put_user_masked() to get/put_user_inline()

  - Remove the futex helpers. Keep the inline get/put for now as it needs
    more testing whether they are really valuable.

  - Picked up tags

The series is based on v6.18-rc1 and also available from git:

    git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git uaccess/scoped

Thanks,

	tglx
---
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 user access regions
      uaccess: Provide put/get_user_inline()
      coccinelle: misc: Add scoped_masked_$MODE_access() checker script
      futex: Convert to get/put_user_inline()
      x86/futex: Convert to scoped user access
      select: Convert to scoped user access

 arch/arm/include/asm/uaccess.h               |   26 ++
 arch/powerpc/include/asm/uaccess.h           |    8 
 arch/riscv/include/asm/uaccess.h             |    8 
 arch/s390/include/asm/uaccess.h              |    4 
 arch/x86/include/asm/futex.h                 |   75 ++----
 arch/x86/include/asm/uaccess.h               |   12 -
 fs/select.c                                  |   12 -
 include/linux/uaccess.h                      |  314 ++++++++++++++++++++++++++-
 kernel/futex/core.c                          |    4 
 kernel/futex/futex.h                         |   58 ----
 scripts/coccinelle/misc/scoped_uaccess.cocci |  108 +++++++++
 11 files changed, 501 insertions(+), 128 deletions(-)




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds