* [PATCH v2] docs: filesystems: idmappings: clarify from where idmappings are taken
@ 2023-06-25 18:20 Alexander Mikhalitsyn
2023-08-10 13:40 ` Christian Brauner
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Mikhalitsyn @ 2023-06-25 18:20 UTC (permalink / raw)
To: brauner
Cc: linux-fsdevel, Alexander Mikhalitsyn, Jonathan Corbet, linux-doc,
Seth Forshee, linux-kernel
Let's clarify from where we take idmapping of each type:
- caller
- filesystem
- mount
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Christian Brauner <brauner@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
---
v2:
- fixed https://lore.kernel.org/oe-kbuild-all/202306252253.qxHG1txo-lkp@intel.com/
---
Documentation/filesystems/idmappings.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/filesystems/idmappings.rst b/Documentation/filesystems/idmappings.rst
index ad6d21640576..f3d168c9f0b9 100644
--- a/Documentation/filesystems/idmappings.rst
+++ b/Documentation/filesystems/idmappings.rst
@@ -373,6 +373,13 @@ kernel maps the caller's userspace id down into a kernel id according to the
caller's idmapping and then maps that kernel id up according to the
filesystem's idmapping.
+From the implementation point it's worth mentioning how idmappings are represented.
+All idmappings are taken from the corresponding user namespace.
+
+ - caller's idmapping (usually taken from ``current_user_ns()``)
+ - filesystem's idmapping (``sb->s_user_ns``)
+ - mount's idmapping (``mnt_idmap(vfsmnt)``)
+
Let's see some examples with caller/filesystem idmapping but without mount
idmappings. This will exhibit some problems we can hit. After that we will
revisit/reconsider these examples, this time using mount idmappings, to see how
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] docs: filesystems: idmappings: clarify from where idmappings are taken
2023-06-25 18:20 [PATCH v2] docs: filesystems: idmappings: clarify from where idmappings are taken Alexander Mikhalitsyn
@ 2023-08-10 13:40 ` Christian Brauner
0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2023-08-10 13:40 UTC (permalink / raw)
To: Alexander Mikhalitsyn
Cc: Christian Brauner, linux-fsdevel, Jonathan Corbet, linux-doc,
Seth Forshee, linux-kernel
On Sun, 25 Jun 2023 20:20:47 +0200, Alexander Mikhalitsyn wrote:
> Let's clarify from where we take idmapping of each type:
> - caller
> - filesystem
> - mount
>
>
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/1] docs: filesystems: idmappings: clarify from where idmappings are taken
https://git.kernel.org/vfs/vfs/c/b4704cb65f47
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-10 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-25 18:20 [PATCH v2] docs: filesystems: idmappings: clarify from where idmappings are taken Alexander Mikhalitsyn
2023-08-10 13:40 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).