mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] docs: filesystems: idmappings: clarify from where idmappings are taken
@ 2023-06-21  9:59 Alexander Mikhalitsyn
  2023-06-25 14:25 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Mikhalitsyn @ 2023-06-21  9:59 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>
---
 Documentation/filesystems/idmappings.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/filesystems/idmappings.rst b/Documentation/filesystems/idmappings.rst
index ad6d21640576..c20382f8bbb0 100644
--- a/Documentation/filesystems/idmappings.rst
+++ b/Documentation/filesystems/idmappings.rst
@@ -373,6 +373,12 @@ 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	[flat|nested] 2+ messages in thread

* Re: [PATCH] docs: filesystems: idmappings: clarify from where idmappings are taken
  2023-06-21  9:59 [PATCH] docs: filesystems: idmappings: clarify from where idmappings are taken Alexander Mikhalitsyn
@ 2023-06-25 14:25 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-06-25 14:25 UTC (permalink / raw)
  To: Alexander Mikhalitsyn, brauner
  Cc: oe-kbuild-all, linux-fsdevel, Alexander Mikhalitsyn,
	Jonathan Corbet, linux-doc, Seth Forshee, linux-kernel

Hi Alexander,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vfs-idmapping/for-next]
[also build test WARNING on linus/master v6.4-rc7 next-20230623]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Mikhalitsyn/docs-filesystems-idmappings-clarify-from-where-idmappings-are-taken/20230621-180345
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git for-next
patch link:    https://lore.kernel.org/r/20230621095905.31346-1-aleksandr.mikhalitsyn%40canonical.com
patch subject: [PATCH] docs: filesystems: idmappings: clarify from where idmappings are taken
reproduce: (https://download.01.org/0day-ci/archive/20230625/202306252253.qxHG1txo-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306252253.qxHG1txo-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> Documentation/filesystems/idmappings.rst:378: WARNING: Unexpected indentation.

vim +378 Documentation/filesystems/idmappings.rst

   375	
   376	From the implementation point it's worth mentioning how idmappings are represented.
   377	All idmappings are taken from the corresponding user namespace.
 > 378	    - caller's idmapping (usually taken from ``current_user_ns()``)
   379	    - filesystem's idmapping (``sb->s_user_ns``)
   380	    - mount's idmapping (``mnt_idmap(vfsmnt)``)
   381	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-25 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21  9:59 [PATCH] docs: filesystems: idmappings: clarify from where idmappings are taken Alexander Mikhalitsyn
2023-06-25 14:25 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®