linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] uaccess: Add masked_user_read_access_begin
@ 2025-02-09 10:55 David Laight
  2025-02-09 10:55 ` [PATCH 1/2] uaccess: Simplify code pattern for masked user copies David Laight
  2025-02-09 10:56 ` [PATCH 2/2] fs: Use masked_user_read_access_begin() David Laight
  0 siblings, 2 replies; 12+ messages in thread
From: David Laight @ 2025-02-09 10:55 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, Linus Torvalds
  Cc: David Laight, Alexander Viro, Christian Brauner, Jan Kara,
	Arnd Bergmann, Kees Cook

The code pattern for masked user access is unwieldy.
Add a new wrapper masked_user_read_access_begin() to simplify it.
Add the equivalent write wrapper.

Change fs/select.c to use the new wrappers when reading the
sigset_argpack and when writing out the result of poll.

The futex code could also be changed.

Note that this might conflict with the patch to change
get_sigset_argpack to __always_inline.

David Laight (2):
  uaccess: Simplify code pattern for masked user copies
  fs: Use masked_user_read_access_begin()

 fs/select.c             |  8 +++-----
 include/linux/uaccess.h | 21 +++++++++++++++++++++
 2 files changed, 24 insertions(+), 5 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-02-09 21:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-09 10:55 [PATCH 0/2] uaccess: Add masked_user_read_access_begin David Laight
2025-02-09 10:55 ` [PATCH 1/2] uaccess: Simplify code pattern for masked user copies David Laight
2025-02-09 17:40   ` Linus Torvalds
2025-02-09 18:34     ` David Laight
2025-02-09 18:40       ` Linus Torvalds
2025-02-09 18:46         ` Linus Torvalds
2025-02-09 19:02           ` David Laight
2025-02-09 19:47     ` David Laight
2025-02-09 20:40       ` Linus Torvalds
2025-02-09 21:18         ` David Laight
2025-02-09 21:38           ` Linus Torvalds
2025-02-09 10:56 ` [PATCH 2/2] fs: Use masked_user_read_access_begin() David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).