linux-next/fs/overlayfs
Vinicius Costa Gomes c5b28fc161 ovl: Optimize override/revert creds
Use override_creds_light() in ovl_override_creds() and
revert_creds_light() in ovl_revert_creds().

The _light() functions do not change the 'usage' of the credentials in
question, as they refer to the credentials associated with the
mounter, which have a longer lifetime.

In ovl_setup_cred_for_create(), do not need to modify the mounter
credentials (returned by override_creds_light()) 'usage' counter.
Add a warning to verify that we are indeed working with the mounter
credentials (stored in the superblock). Failure in this assumption
means that creds may leak.

Suggested-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2024-11-15 08:55:39 +01:00
..
copy_up.c ovl: use wrapper ovl_revert_creds() 2024-11-11 10:45:04 +01:00
dir.c ovl: Optimize override/revert creds 2024-11-15 08:55:39 +01:00
export.c ovl: fix encoding fid for lower only root 2024-06-14 10:30:40 +02:00
file.c ovl: use wrapper ovl_revert_creds() 2024-11-11 10:45:04 +01:00
inode.c ovl: use wrapper ovl_revert_creds() 2024-11-11 10:45:04 +01:00
Kconfig fs: prepare for stackable filesystems backing file helpers 2023-12-23 16:35:08 +02:00
Makefile ovl: Move xattr support to new xattrs.c file 2023-10-31 00:12:59 +02:00
namei.c ovl: use wrapper ovl_revert_creds() 2024-11-11 10:45:04 +01:00
overlayfs.h ovl: use wrapper ovl_revert_creds() 2024-11-11 10:45:04 +01:00
ovl_entry.h ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-23 12:39:48 +02:00
params.c ovl: fail if trusted xattrs are needed but caller lacks permission 2024-09-08 15:36:59 +02:00
params.h ovl: store and show the user provided lowerdir mount option 2023-10-31 00:13:02 +02:00
readdir.c ovl: use wrapper ovl_revert_creds() 2024-11-11 10:45:04 +01:00
super.c ovl: don't set the superblock's errseq_t manually 2024-08-29 11:35:09 +02:00
util.c ovl: Optimize override/revert creds 2024-11-15 08:55:39 +01:00
xattrs.c ovl: use wrapper ovl_revert_creds() 2024-11-11 10:45:04 +01:00