linux-sg2042/include
Christian Brauner 705191b03d fs: fix acl translation
Last cycle we extended the idmapped mounts infrastructure to support
idmapped mounts of idmapped filesystems (No such filesystem yet exist.).
Since then, the meaning of an idmapped mount is a mount whose idmapping
is different from the filesystems idmapping.

While doing that work we missed to adapt the acl translation helpers.
They still assume that checking for the identity mapping is enough.  But
they need to use the no_idmapping() helper instead.

Note, POSIX ACLs are always translated right at the userspace-kernel
boundary using the caller's current idmapping and the initial idmapping.
The order depends on whether we're coming from or going to userspace.
The filesystem's idmapping doesn't matter at the border.

Consequently, if a non-idmapped mount is passed we need to make sure to
always pass the initial idmapping as the mount's idmapping and not the
filesystem idmapping.  Since it's irrelevant here it would yield invalid
ids and prevent setting acls for filesystems that are mountable in a
userns and support posix acls (tmpfs and fuse).

I verified the regression reported in [1] and verified that this patch
fixes it.  A regression test will be added to xfstests in parallel.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215849 [1]
Fixes: bd303368b7 ("fs: support mapped mounts of mapped filesystems")
Cc: Seth Forshee <sforshee@digitalocean.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: <stable@vger.kernel.org> # 5.17
Cc: <regressions@lists.linux.dev>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-04-19 10:19:02 -07:00
..
acpi ACPI: bus: Eliminate acpi_bus_get_device() 2022-04-05 19:49:26 +02:00
asm-generic block-5.18-2022-04-15 2022-04-15 11:38:55 -07:00
clocksource clocksource/drivers/arm_arch_timer: Use event stream scaling when available 2022-03-07 18:27:22 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2022-03-21 16:02:36 -07:00
drm drm-misc-next for v5.18: 2022-03-04 13:41:57 +10:00
dt-bindings RTC for 5.18 2022-04-01 09:37:18 -07:00
keys KEYS: Introduce link restriction for machine keys 2022-03-08 13:55:52 +02:00
kunit
kvm
linux fs: fix acl translation 2022-04-19 10:19:02 -07:00
math-emu
media media: m5mols: Convert to use GPIO descriptors 2022-03-04 09:36:26 +02:00
memory
misc
net net/sched: flower: fix parsing of ethertype following VLAN header 2022-04-08 12:07:37 +01:00
pcmcia
ras mm/memory-failure.c: fix race with changing page compound again 2022-03-22 15:57:07 -07:00
rdma
scsi scsi: iscsi: Fix NOP handling during conn recovery 2022-04-11 22:09:35 -04:00
soc drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
sound sound fixes for 5.18-rc3 2022-04-14 11:08:12 -07:00
target scsi: target: Add iscsi/cpus_allowed_list in configfs 2022-03-14 23:40:36 -04:00
trace NFSD bug fixes for 5.18-rc: 2022-04-12 14:23:19 -10:00
uapi io_uring-5.18-2022-04-14 2022-04-15 11:33:20 -07:00
vdso
video drm/exynos: fimd: add BGR support for exynos4/5 2022-03-04 17:13:52 +09:00
xen xen/grant-table: remove readonly parameter from functions 2022-03-15 20:34:40 -05:00