Lines Matching full:userspace
7 reading from or writing ownership to disk, reporting ownership to userspace, or
16 in userspace is::
81 ``(uid_t)-1`` or overflowgid ``(gid_t)-1`` to userspace.
126 of userspace ids into a range of kernel ids::
128 userspace-id:kernel-id:range
130 A userspace id is always an element in the upper idmapset of an idmapping of
133 "userspace id" will be used to refer to the well known ``uid_t`` and ``gid_t``
138 A userspace id on the other hand is an id that is reported to userspace by the
139 kernel, or is passed by userspace to the kernel, or a raw device id that is
143 how userspace would specify them.
145 For the rest of this document we will prefix all userspace ids with ``u`` and
149 For example, the id ``u1000`` is an id in the upper idmapset or "userspace
172 ownership of a file is read from disk by a filesystem, the userspace id is
199 example, it is used when reporting back the ownership of a file to userspace
211 then translate ``k11000`` into a userspace id in the second idmapping using the
214 /* Map the kernel id up into a userspace id in the second idmapping. */
220 /* Map the userspace id down into a kernel id in the second idmapping. */
223 /* Map the kernel id up into a userspace id in the first idmapping. */
226 This algorithm allows us to answer the question what userspace id a given
231 For example, when the kernel reads a raw userspace id from disk it maps it down
238 When someone in userspace calls ``stat()`` or a related function to get
252 the userspace idmapset of the two idmappings. This is equivalent to remapping
264 1. Map the kernel id up into a userspace id in the first idmapping::
266 /* Map the kernel id up into a userspace id in the first idmapping. */
269 2. Map the userspace id down into a kernel id in the second idmapping::
271 /* Map the userspace id down into a kernel id in the second idmapping. */
274 As you can see we used the userspace idmapset in both idmappings to translate
278 get the same userspace id in another idmapping. In order to be able to answer
279 this question both idmappings need to contain the same userspace id in their
280 respective userspace idmapsets.
285 1. Map the kernel id up into a userspace id in the second idmapping::
287 /* Map the kernel id up into a userspace id in the second idmapping. */
290 2. Map the userspace id down into a kernel id in the first idmapping::
292 /* Map the userspace id down into a kernel id in the first idmapping. */
297 userspace id mapped. This will come in handy when working with idmapped mounts.
303 id in the userspace idmapset of another or the same idmapping. While the kernel
304 idmapset always indicates an idmapset in the kernel id space the userspace
305 idmapset indicates a userspace id. So the following translations are forbidden::
307 /* Map the userspace id down into a kernel id in the first idmapping. */
316 /* Map the kernel id up into a userspace id in the first idmapping. */
319 /* INVALID: Map the userspace id up into a userspace id in the second idmapping. */
330 /* Map the userspace id down into a kernel id. */
333 /* Map the kernel id up into a userspace id. */
344 filesystem ids. These are just regular ``uid_t`` and ``gid_t`` userspace ids
352 1. Map the caller's userspace ids down into kernel ids in the caller's
357 2. Verify that the caller's kernel ids can be mapped up to userspace ids in the
361 the kernel id back up into a userspace id when writing to disk.
362 So with the second step the kernel guarantees that a valid userspace id can be
368 kernel maps the caller's userspace id down into a kernel id according to the
383 1. Map the caller's userspace ids into kernel ids in the caller's idmapping::
387 2. Verify that the caller's kernel ids can be mapped to userspace ids in the
397 on. Ultimately the userspace id that lands on disk will be ``u1000``.
408 1. Map the caller's userspace ids down into kernel ids in the caller's
413 2. Verify that the caller's kernel ids can be mapped up to userspace ids in the
418 It's immediately clear that while the caller's userspace id could be
436 1. Map the caller's userspace ids down into kernel ids in the caller's
441 2. Verify that the caller's kernel ids can be mapped up to userspace ids in the
446 We can see that the translation always succeeds. The userspace id that the
452 userspace id. We could only do this if we were to mount the whole fileystem
459 kernel ids map up into valid userspace ids in the caller's idmapping
461 1. Map raw userspace ids down to kernel ids in the filesystem's idmapping::
465 2. Map kernel ids up to userspace ids in the caller's idmapping::
478 In order to report ownership to userspace the kernel uses the crossmapping
481 1. Map the userspace id on disk down into a kernel id in the filesystem's
486 2. Map the kernel id up into a userspace id in the caller's idmapping::
491 filesystem idmapping cannot be mapped up to a userspace id in the caller's
504 In order to report ownership to userspace the kernel uses the crossmapping
507 1. Map the userspace id on disk down into a kernel id in the filesystem's
512 2. Map the kernel id up into a userspace id in the caller's idmapping::
517 the filesystem idmapping cannot be mapped to a userspace id in the caller's
526 1. Map the userspace id on disk down into a kernel id in the filesystem's
531 2. Map the kernel id up into a userspace id in the caller's idmapping::
575 different login userspace ids. Most users will have ``u1000`` as the login id
633 /* Map the filesystem's kernel id up into a userspace id in the filesystem's idmapping. */
636 /* Map the filesystem's userspace id down ito a kernel id in the mount's idmapping. */
645 /* Map the caller's kernel id up into a userspace id in the mount's idmapping. */
648 /* Map the mount's userspace id down into a kernel id in the filesystem's idmapping. */
664 kernel id up to a userspace id in the caller's idmapping.
671 /* Map the filesystem's kernel id up into a userspace id. */
674 /* Map the filesystem's userspace id down ito a kernel id in the mount's idmapping. */
678 kernel id in the mount's idmapping into a userspace id in the caller's
688 mapped to a userspace id in the filesystem's idmapping. Since ``k11000`` can't
697 /* Map the caller's kernel id up into a userspace id in the mount's idmapping. */
700 /* Map the mount's userspace id down into a kernel id in the filesystem's idmapping. */
704 userspace id in the filesystem's idmapping::
728 1. Map the caller's userspace ids into kernel ids in the caller's idmapping::
736 /* Map the kernel id up into a userspace id in the mount's idmapping. */
739 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */
742 2. Verify that the caller's kernel ids can be mapped to userspace ids in the
761 1. Map the caller's userspace ids into kernel ids in the caller's idmapping::
769 /* Map the kernel id up into a userspace id in the mount's idmapping. */
772 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */
775 2. Verify that the caller's kernel ids can be mapped to userspace ids in the
792 In order to report ownership to userspace the kernel now does three steps using
795 1. Map the userspace id on disk down into a kernel id in the filesystem's
803 /* Map the kernel id up into a userspace id in the filesystem's idmapping. */
806 /* Map the userspace id down into a kernel id in the mounts's idmapping. */
809 3. Map the kernel id up into a userspace id in the caller's idmapping::
828 Again, in order to report ownership to userspace the kernel now does three
831 1. Map the userspace id on disk down into a kernel id in the filesystem's
839 /* Map the kernel id up into a userspace id in the filesystem's idmapping. */
842 /* Map the userspace id down into a kernel id in the mounts's idmapping. */
845 3. Map the kernel id up into a userspace id in the caller's idmapping::
899 1. Map the caller's userspace ids into kernel ids in the caller's idmapping::
907 /* Map the kernel id up into a userspace id in the mount's idmapping. */
910 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */
913 2. Verify that the caller's kernel ids can be mapped to userspace ids in the
930 1. Map the userspace id on disk down into a kernel id in the filesystem's
938 /* Map the kernel id up into a userspace id in the filesystem's idmapping. */
941 /* Map the userspace id down into a kernel id in the mounts's idmapping. */
944 3. Map the kernel id up into a userspace id in the caller's idmapping::
949 which is the caller's userspace id on their workstation in our example.
951 The raw userspace id that is put on disk is ``u1000`` so when the user takes
987 /* Map the kernel id up into a userspace id in the mount's idmapping. */
990 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */
997 /* Map the kernel id up into a userspace id in the mount's idmapping. */
1000 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */
1007 /* Map the kernel id up into a userspace id in the filesystem's idmapping. */
1010 /* Map the userspace id down into a kernel id in the mounts's idmapping. */
1018 /* Map the kernel id up into a userspace id in the filesystem's idmapping. */
1021 /* Map the userspace id down into a kernel id in the mounts's idmapping. */