diff mbox series

[1/2] Document new xattrperm flag

Message ID 20230413223024.11513-2-petrovicmarko2006@gmail.com
State Changes Requested
Headers show
Series [1/2] Document new xattrperm flag | expand

Commit Message

Marko Petrović April 13, 2023, 10:30 p.m. UTC
Signed-off-by: Marko Petrović <petrovicmarko2006@gmail.com>
---
 ...to_v2.rst => user_mode_linux_howto_v3.rst} | 20 +++++++++----------
 1 file changed, 9 insertions(+), 11 deletions(-)
 rename Documentation/virt/uml/{user_mode_linux_howto_v2.rst => user_mode_linux_howto_v3.rst} (99%)

Comments

Johannes Berg April 14, 2023, 7:17 a.m. UTC | #1
Hi,

Nice. I think you can squash this into a single patch eventually. Couple
of comments below:

On Fri, 2023-04-14 at 00:30 +0200, Marko Petrović wrote:
> Signed-off-by: Marko Petrović <petrovicmarko2006@gmail.com>
> ---
>  ...to_v2.rst => user_mode_linux_howto_v3.rst} | 20 +++++++++----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
>  rename Documentation/virt/uml/{user_mode_linux_howto_v2.rst => user_mode_linux_howto_v3.rst} (99%)

I don't think you should rename this, it's not a document version, it's
more of a historic artifact that it's called v2 now. We should probably
remove that anyway.

> +++ b/Documentation/virt/uml/user_mode_linux_howto_v3.rst
> @@ -1007,23 +1007,21 @@ an existing root_fs file::
>  
>     #  mount root_fs uml_root_dir -o loop
>  
> -
> -You need to change the filesystem type of ``/`` in ``etc/fstab`` to be
> -'hostfs', so that line looks like this::
> -
> -   /dev/ubd/0       /        hostfs      defaults          1   1
> -

I was going to ask why you removed this, but yeah, cleaning this up to
not use ubd0 for hostfs is probably a good idea. At least documentation
(recommendation) wise ...

>  Then you need to chown to yourself all the files in that directory
> -that are owned by root.  This worked for me::
> +that are owned by root so that the kernel can access them.
> +This worked for me::
>  
> -   #  find . -uid 0 -exec chown jdike {} \;
> +   #  find uml_root_dir -uid 0 -not -type l -exec chown jdike {} \;
>  
>  Next, make sure that your UML kernel has hostfs compiled in, not as a
> -module.  Then run UML with the boot device pointing at that directory::
> +module.  Then run UML with the appropriate kernel command line
> +parameters::
>  
> -   ubd0=/path/to/uml/root/directory
> +   rootfstype=hostfs rw hostfs=uml_root_dir,xattrperm
>  
> -UML should then boot as it does normally.
> +You should have extended attributes supported and enabled on
> +your host filesystem since UML uses them to store correct file
> +permissions.

I'm not really sure we should basically say in the documentation that
"the way" to run it is with xattrperm? IOW, why not just add a new
paragraph that explains that (and how) you can add xattrperm, and what
it does?

johannes
diff mbox series

Patch

diff --git a/Documentation/virt/uml/user_mode_linux_howto_v2.rst b/Documentation/virt/uml/user_mode_linux_howto_v3.rst
similarity index 99%
rename from Documentation/virt/uml/user_mode_linux_howto_v2.rst
rename to Documentation/virt/uml/user_mode_linux_howto_v3.rst
index af2a97429692..709eef10dd7d 100644
--- a/Documentation/virt/uml/user_mode_linux_howto_v2.rst
+++ b/Documentation/virt/uml/user_mode_linux_howto_v3.rst
@@ -1007,23 +1007,21 @@  an existing root_fs file::
 
    #  mount root_fs uml_root_dir -o loop
 
-
-You need to change the filesystem type of ``/`` in ``etc/fstab`` to be
-'hostfs', so that line looks like this::
-
-   /dev/ubd/0       /        hostfs      defaults          1   1
-
 Then you need to chown to yourself all the files in that directory
-that are owned by root.  This worked for me::
+that are owned by root so that the kernel can access them.
+This worked for me::
 
-   #  find . -uid 0 -exec chown jdike {} \;
+   #  find uml_root_dir -uid 0 -not -type l -exec chown jdike {} \;
 
 Next, make sure that your UML kernel has hostfs compiled in, not as a
-module.  Then run UML with the boot device pointing at that directory::
+module.  Then run UML with the appropriate kernel command line
+parameters::
 
-   ubd0=/path/to/uml/root/directory
+   rootfstype=hostfs rw hostfs=uml_root_dir,xattrperm
 
-UML should then boot as it does normally.
+You should have extended attributes supported and enabled on
+your host filesystem since UML uses them to store correct file
+permissions.
 
 Hostfs Caveats
 --------------