From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
Amir Goldstein <amir73il@gmail.com>,
Miklos Szeredi <miklos@szeredi.hu>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 00/26] cred: rework {override,revert}_creds()
Date: Sun, 24 Nov 2024 14:43:46 +0100 [thread overview]
Message-ID: <20241124-work-cred-v1-0-f352241c3970@kernel.org> (raw)
In-Reply-To: <CAHk-=whoEWma-c-ZTj=fpXtD+1EyYimW4TwqDV9FeUVVfzwang@mail.gmail.com>
For the v6.13 cycle we switched overlayfs to a variant of
override_creds() that doesn't take an extra reference. To this end I
suggested introducing {override,revert}_creds_light() which overlayfs
could use.
This seems to work rather well. As Linus correctly points out that we
should look into unifying both and simply make {override,revert}_creds()
do what {override,revert}_creds_light() currently does. Caller's that
really need the extra reference count can take it manually.
This series does all that. Afaict, most callers can be directly
converted over and can avoid the extra reference count completely.
Lightly tested.
---
Christian Brauner (26):
tree-wide: s/override_creds()/override_creds_light(get_new_cred())/g
cred: return old creds from revert_creds_light()
tree-wide: s/revert_creds()/put_cred(revert_creds_light())/g
cred: remove old {override,revert}_creds() helpers
tree-wide: s/override_creds_light()/override_creds()/g
tree-wide: s/revert_creds_light()/revert_creds()/g
firmware: avoid pointless reference count bump
sev-dev: avoid pointless cred reference count bump
target_core_configfs: avoid pointless cred reference count bump
aio: avoid pointless cred reference count bump
binfmt_misc: avoid pointless cred reference count bump
coredump: avoid pointless cred reference count bump
nfs/localio: avoid pointless cred reference count bumps
nfs/nfs4idmap: avoid pointless reference count bump
nfs/nfs4recover: avoid pointless cred reference count bump
nfsfh: avoid pointless cred reference count bump
open: avoid pointless cred reference count bump
ovl: avoid pointless cred reference count bump
cifs: avoid pointless cred reference count bump
cifs: avoid pointless cred reference count bump
smb: avoid pointless cred reference count bump
io_uring: avoid pointless cred reference count bump
acct: avoid pointless reference count bump
cgroup: avoid pointless cred reference count bump
trace: avoid pointless cred reference count bump
dns_resolver: avoid pointless cred reference count bump
drivers/base/firmware_loader/main.c | 3 +--
drivers/crypto/ccp/sev-dev.c | 2 +-
drivers/target/target_core_configfs.c | 3 +--
fs/aio.c | 3 +--
fs/backing-file.c | 20 +++++++-------
fs/cachefiles/internal.h | 4 +--
fs/nfsd/auth.c | 4 +--
fs/nfsd/filecache.c | 2 +-
fs/nfsd/nfs4recover.c | 3 +--
fs/nfsd/nfsfh.c | 1 -
fs/open.c | 10 ++-----
fs/overlayfs/copy_up.c | 6 ++---
fs/overlayfs/dir.c | 4 +--
fs/overlayfs/util.c | 4 +--
fs/smb/server/smb_common.c | 4 +--
include/linux/cred.h | 14 ++++------
kernel/cred.c | 50 -----------------------------------
kernel/trace/trace_events_user.c | 3 +--
18 files changed, 35 insertions(+), 105 deletions(-)
---
base-commit: 228a1157fb9fec47eb135b51c0202b574e079ebf
change-id: 20241124-work-cred-349b65450082
next prev parent reply other threads:[~2024-11-24 13:44 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 9:57 [GIT PULL] overlayfs updates for 6.13 Amir Goldstein
2024-11-23 5:21 ` Linus Torvalds
2024-11-23 5:22 ` Linus Torvalds
2024-11-23 6:09 ` Linus Torvalds
2024-11-23 6:14 ` Al Viro
2024-11-23 17:18 ` Linus Torvalds
2024-11-23 12:06 ` Christian Brauner
2024-11-23 17:29 ` Linus Torvalds
2024-11-24 13:43 ` Christian Brauner [this message]
2024-11-24 13:43 ` [PATCH 01/26] tree-wide: s/override_creds()/override_creds_light(get_new_cred())/g Christian Brauner
2024-11-24 13:43 ` [PATCH 02/26] cred: return old creds from revert_creds_light() Christian Brauner
2024-11-24 13:43 ` [PATCH 03/26] tree-wide: s/revert_creds()/put_cred(revert_creds_light())/g Christian Brauner
2024-11-24 13:43 ` [PATCH 04/26] cred: remove old {override,revert}_creds() helpers Christian Brauner
2024-11-24 13:43 ` [PATCH 05/26] tree-wide: s/override_creds_light()/override_creds()/g Christian Brauner
2024-11-24 13:43 ` [PATCH 06/26] tree-wide: s/revert_creds_light()/revert_creds()/g Christian Brauner
2024-11-24 13:43 ` [PATCH 07/26] firmware: avoid pointless reference count bump Christian Brauner
2024-11-24 14:56 ` Amir Goldstein
2024-11-24 13:43 ` [PATCH 08/26] sev-dev: avoid pointless cred " Christian Brauner
2024-11-24 18:19 ` Al Viro
2024-11-24 13:43 ` [PATCH 09/26] target_core_configfs: " Christian Brauner
2024-11-24 18:26 ` Al Viro
2024-11-25 11:31 ` Christian Brauner
2024-11-24 13:43 ` [PATCH 10/26] aio: " Christian Brauner
2024-11-24 13:43 ` [PATCH 11/26] binfmt_misc: " Christian Brauner
2024-11-24 13:43 ` [PATCH 12/26] coredump: " Christian Brauner
2024-11-24 13:43 ` [PATCH 13/26] nfs/localio: avoid pointless cred reference count bumps Christian Brauner
2024-11-24 13:44 ` [PATCH 14/26] nfs/nfs4idmap: avoid pointless reference count bump Christian Brauner
2024-11-24 13:44 ` [PATCH 15/26] nfs/nfs4recover: avoid pointless cred " Christian Brauner
2024-11-25 13:10 ` Chuck Lever
2024-11-24 13:44 ` [PATCH 16/26] nfsfh: " Christian Brauner
2024-11-25 13:11 ` Chuck Lever
2024-11-24 13:44 ` [PATCH 17/26] open: " Christian Brauner
2024-11-24 13:44 ` [PATCH 18/26] ovl: " Christian Brauner
2024-11-24 14:59 ` Amir Goldstein
2024-11-25 11:30 ` Christian Brauner
2024-11-24 13:44 ` [PATCH 19/26] cifs: " Christian Brauner
2024-11-24 13:44 ` [PATCH 20/26] " Christian Brauner
2024-11-24 13:44 ` [PATCH 21/26] smb: " Christian Brauner
2024-11-24 18:37 ` Al Viro
2024-11-25 11:22 ` Christian Brauner
2024-11-24 13:44 ` [PATCH 22/26] io_uring: " Christian Brauner
2024-11-24 13:44 ` [PATCH 23/26] acct: avoid pointless " Christian Brauner
2024-11-24 13:44 ` [PATCH 24/26] cgroup: avoid pointless cred " Christian Brauner
2024-11-24 13:44 ` [PATCH 25/26] trace: " Christian Brauner
2024-11-24 13:44 ` [PATCH 26/26] dns_resolver: " Christian Brauner
2024-11-24 17:00 ` [PATCH 00/26] cred: rework {override,revert}_creds() Amir Goldstein
2024-11-24 18:00 ` Linus Torvalds
2024-11-25 11:46 ` Christian Brauner
2024-11-25 12:55 ` Amir Goldstein
2024-11-25 14:13 ` Christian Brauner
2024-11-25 13:51 ` Jeff Layton
2024-11-23 18:47 ` [GIT PULL] overlayfs updates for 6.13 Christian Brauner
2024-11-23 5:57 ` 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=20241124-work-cred-v1-0-f352241c3970@kernel.org \
--to=brauner@kernel.org \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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®