From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL] vfs copy_struct_to_user()
Date: Fri, 15 Nov 2024 15:05:46 +0100 [thread overview]
Message-ID: <20241115-vfs-usercopy-82de2c4b92b7@brauner> (raw)
Hey Linus,
/* Summary */
This adds a copy_struct_to_user() helper which is a companion helper to
the already widely used copy_struct_from_user().
It copies a struct from kernel space to userspace, in a way that
guarantees backwards-compatibility for struct syscall arguments as long
as future struct extensions are made such that all new fields are
appended to the old struct, and zeroed-out new fields have the same
meaning as the old struct.
The first user is sched_getattr() system call but once the pidfs updates
for this cycle have landed the new extensible ioctl will be ported to it
as well.
/* Testing */
gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)
All patches are based on v6.12-rc3 and have been sitting in linux-next.
No build failures or warnings were observed.
/* Conflicts */
Merge conflicts with mainline
=============================
No known conflicts.
Merge conflicts with other trees
================================
No known conflicts.
The following changes since commit 8e929cb546ee42c9a61d24fae60605e9e3192354:
Linux 6.12-rc3 (2024-10-13 14:33:32 -0700)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.usercopy
for you to fetch changes up to 112cca098a7010c02a4d535a253af72e4e5bbd06:
sched_getattr: port to copy_struct_to_user (2024-10-21 16:51:31 +0200)
Please consider pulling these changes from the signed vfs-6.13.usercopy tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.13.usercopy
----------------------------------------------------------------
Aleksa Sarai (2):
uaccess: add copy_struct_to_user helper
sched_getattr: port to copy_struct_to_user
include/linux/uaccess.h | 97 +++++++++++++++++++++++++++++++++++++++++++++++++
kernel/sched/syscalls.c | 42 +--------------------
2 files changed, 99 insertions(+), 40 deletions(-)
next reply other threads:[~2024-11-15 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 14:05 Christian Brauner [this message]
2024-11-18 19:49 ` pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241115-vfs-usercopy-82de2c4b92b7@brauner \
--to=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®