linux/fs/ksmbd
Linus Torvalds 5dfbfe71e3 fs.idmapped.v5.17
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCYdRCkgAKCRCRxhvAZXjc
 olrvAQCdp8LWkT8TauJSl8wmUm3mZhNy+5+fXuCUSwe3PyUtTQEAq4fxm41JpG8u
 WCZTrrxVhaXwgUY3aWzzeQnLCZjtEQw=
 =woqV
 -----END PGP SIGNATURE-----

Merge tag 'fs.idmapped.v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux

Pull fs idmapping updates from Christian Brauner:
 "This contains the work to enable the idmapping infrastructure to
  support idmapped mounts of filesystems mounted with an idmapping.

  In addition this contains various cleanups that avoid repeated
  open-coding of the same functionality and simplify the code in quite a
  few places.

  We also finish the renaming of the mapping helpers we started a few
  kernel releases back and move them to a dedicated header to not
  continue polluting the fs header needlessly with low-level idmapping
  helpers. With this series the fs header only contains idmapping
  helpers that interact with fs objects.

  Currently we only support idmapped mounts for filesystems mounted
  without an idmapping themselves. This was a conscious decision
  mentioned in multiple places (cf. [1]).

  As explained at length in [3] it is perfectly fine to extend support
  for idmapped mounts to filesystem's mounted with an idmapping should
  the need arise. The need has been there for some time now (cf. [2]).

  Before we can port any filesystem that is mountable with an idmapping
  to support idmapped mounts in the coming cycles, we need to first
  extend the mapping helpers to account for the filesystem's idmapping.
  This again, is explained at length in our documentation at [3] and
  also in the individual commit messages so here's an overview.

  Currently, the low-level mapping helpers implement the remapping
  algorithms described in [3] in a simplified manner as we could rely on
  the fact that all filesystems supporting idmapped mounts are mounted
  without an idmapping.

  In contrast, filesystems mounted with an idmapping are very likely to
  not use an identity mapping and will instead use a non-identity
  mapping. So the translation step from or into the filesystem's
  idmapping in the remapping algorithm cannot be skipped for such
  filesystems.

  Non-idmapped filesystems and filesystems not supporting idmapped
  mounts are unaffected by this change as the remapping algorithms can
  take the same shortcut as before. If the low-level helpers detect that
  they are dealing with an idmapped mount but the underlying filesystem
  is mounted without an idmapping we can rely on the previous shortcut
  and can continue to skip the translation step from or into the
  filesystem's idmapping. And of course, if the low-level helpers detect
  that they are not dealing with an idmapped mount they can simply
  return the relevant id unchanged; no remapping needs to be performed
  at all.

  These checks guarantee that only the minimal amount of work is
  performed. As before, if idmapped mounts aren't used the low-level
  helpers are idempotent and no work is performed at all"

Link: 2ca4dcc490 ("fs/mount_setattr: tighten permission checks") [1]
Link: https://github.com/containers/podman/issues/10374 [2]
Link: Documentations/filesystems/idmappings.rst [3]
Link: a65e58e791 ("fs: document and rename fsid helpers") [4]

* tag 'fs.idmapped.v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
  fs: support mapped mounts of mapped filesystems
  fs: add i_user_ns() helper
  fs: port higher-level mapping helpers
  fs: remove unused low-level mapping helpers
  fs: use low-level mapping helpers
  docs: update mapping documentation
  fs: account for filesystem mappings
  fs: tweak fsuidgid_has_mapping()
  fs: move mapping helpers
  fs: add is_idmapped_mnt() helper
2022-01-11 14:26:55 -08:00
..
mgmt ksmbd: throttle session setup failures to avoid dictionary attacks 2021-10-20 00:07:10 -05:00
asn1.c
asn1.h
auth.c ksmbd: remove smb2_buf_length in smb2_transform_hdr 2021-11-11 19:22:58 -06:00
auth.h
connection.c ksmbd: remove smb2_buf_length in smb2_transform_hdr 2021-11-11 19:22:58 -06:00
connection.h ksmbd: add support for negotiating signing algorithm 2021-07-22 09:56:02 +09:00
crypto_ctx.c ksmbd: remove NTLMv1 authentication 2021-09-29 16:17:34 -05:00
crypto_ctx.h ksmbd: remove NTLMv1 authentication 2021-09-29 16:17:34 -05:00
glob.h ksmbd: fix version mismatch with out of tree 2021-10-07 10:18:34 -05:00
Kconfig ksmbd: remove md4 leftovers 2021-11-11 19:22:58 -06:00
ksmbd_netlink.h ksmbd: throttle session setup failures to avoid dictionary attacks 2021-10-20 00:07:10 -05:00
ksmbd_spnego_negtokeninit.asn1
ksmbd_spnego_negtokentarg.asn1
ksmbd_work.c ksmbd: Remove redundant 'flush_workqueue()' calls 2021-11-06 23:52:06 -05:00
ksmbd_work.h ksmbd: remove smb2_buf_length in smb2_hdr 2021-11-11 19:22:58 -06:00
Makefile
misc.c ksmbd: missing check for NULL in convert_to_nt_pathname() 2021-09-30 20:00:05 -05:00
misc.h ksmbd: use LOOKUP_BENEATH to prevent the out of share access 2021-09-24 21:25:23 -05:00
ndr.c ksmbd: fix error code in ndr_read_int32() 2021-12-16 12:36:49 -06:00
ndr.h ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
nterr.h
ntlmssp.h
oplock.c ksmbd: change LeaseKey data type to u8 array 2021-11-11 19:22:58 -06:00
oplock.h ksmbd: change LeaseKey data type to u8 array 2021-11-11 19:22:58 -06:00
server.c ksmbd: remove md4 leftovers 2021-11-11 19:22:58 -06:00
server.h ksmbd: change server config string index to enumeration 2021-06-30 14:44:01 +09:00
smb2misc.c ksmbd: switch to use shared definitions where available 2021-11-11 19:22:58 -06:00
smb2ops.c ksmbd: disable SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1 2021-12-17 19:19:45 -06:00
smb2pdu.c ksmbd: disable SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1 2021-12-17 19:19:45 -06:00
smb2pdu.h ksmbd: Use the SMB3_Create definitions from the shared 2021-11-11 19:22:58 -06:00
smb_common.c ksmbd: remove smb2_buf_length in smb2_hdr 2021-11-11 19:22:58 -06:00
smb_common.h ksmbd: Use the SMB3_Create definitions from the shared 2021-11-11 19:22:58 -06:00
smbacl.c fs: use low-level mapping helpers 2021-12-03 18:58:11 +01:00
smbacl.h fs: use low-level mapping helpers 2021-12-03 18:58:11 +01:00
smbfsctl.h
smbstatus.h
transport_ipc.c ksmbd: throttle session setup failures to avoid dictionary attacks 2021-10-20 00:07:10 -05:00
transport_ipc.h ksmbd: throttle session setup failures to avoid dictionary attacks 2021-10-20 00:07:10 -05:00
transport_rdma.c ksmbd: remove smb2_buf_length in smb2_hdr 2021-11-11 19:22:58 -06:00
transport_rdma.h ksmbd: fix typo of MS-SMBD 2021-07-22 09:55:58 +09:00
transport_tcp.c ksmbd: fix documentation for 2 functions 2021-09-28 20:51:32 -05:00
transport_tcp.h
unicode.c
unicode.h
uniupr.h
vfs_cache.c ksmbd: remove unused ksmbd_file_table_flush function 2021-09-03 23:29:45 -05:00
vfs_cache.h ksmbd: remove unused ksmbd_file_table_flush function 2021-09-03 23:29:45 -05:00
vfs.c ksmbd: Use the SMB3_Create definitions from the shared 2021-11-11 19:22:58 -06:00
vfs.h ksmbd: Use the SMB3_Create definitions from the shared 2021-11-11 19:22:58 -06:00
xattr.h ksmbd: reorder and document on-disk and netlink structures in headers 2021-06-30 14:47:24 +09:00