android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yang Xu 0cb0093fd6 fs: add mode_strip_sgid() helper
commit 2b3416ceff5e6bd4922f6d1c61fb68113dd82302 upstream.

[remove userns argument of helper for 5.4.y backport]

Add a dedicated helper to handle the setgid bit when creating a new file
in a setgid directory. This is a preparatory patch for moving setgid
stripping into the vfs. The patch contains no functional changes.

Currently the setgid stripping logic is open-coded directly in
inode_init_owner() and the individual filesystems are responsible for
handling setgid inheritance. Since this has proven to be brittle as
evidenced by old issues we uncovered over the last months (see [1] to
[3] below) we will try to move this logic into the vfs.

Link: e014f37db1a2 ("xfs: use setattr_copy to set vfs inode attributes") [1]
Link: 01ea173e103e ("xfs: fix up non-directory creation in SGID directories") [2]
Link: fd84bfdddd16 ("ceph: fix up non-directory creation in SGID directories") [3]
Link: https://lore.kernel.org/r/1657779088-2242-1-git-send-email-xuyang2018.jy@fujitsu.com
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Reviewed-and-Tested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[commit 347750e1b69cef62966fbc5bd7dc579b4c00688a upstream
	backported from 5.10.y, resolved context conflicts]
Signed-off-by: Mahmoud Adam <mngyadam@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 08:24:49 +01:00
..
acpi
asm-generic asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 15:41:22 +01:00
clocksource
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 14:34:23 -08:00
drm drm/bridge: Fix typo in post_disable() description 2024-01-25 14:34:27 -08:00
dt-bindings
keys
kvm
linux fs: add mode_strip_sgid() helper 2024-02-23 08:24:49 +01:00
math-emu
media media: v4l2-mem2mem: add lock to protect parameter num_rdy 2023-08-30 16:27:10 +02:00
misc
net Bluetooth: Fix bogus check for re-auth no supported with non-ssp 2024-01-25 14:34:26 -08:00
pcmcia
ras
rdma
scsi scsi: core: Introduce the scsi_cmd_to_rq() function 2023-12-08 08:44:28 +01:00
soc firmware: raspberrypi: Introduce devm_rpi_firmware_get() 2023-05-17 11:35:52 +02:00
sound ALSA: pcm: Set per-card upper limit of PCM buffer allocations 2023-08-30 16:27:22 +02:00
target
trace neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section 2023-10-25 11:53:22 +02:00
uapi virtio_crypto: Introduce VIRTIO_CRYPTO_NOSPC 2024-01-25 14:34:23 -08:00
vdso
video
xen