Re: [PATCH v2 0/3] init/initramfs.c: make initramfs support pivot_root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

On Fri, May 28, 2021 at 3:10 PM Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:
>
> Hi,
[...]
>
>
> This idea sounds good to me. I have tested it with MINCS container shell
> script (https://github.com/mhiramat/mincs).
>
> However, I found different issue on init_eaccess() (or symlink lookup)
> with this series.
>
> I'm using a busybox initramfs, and it makes /init as a symlink of "/sbin/init"
> (absolute path)
>
> When CONFIG_INITRAMFS_USER_ROOT=n, it booted. But CONFIG_INITRAMFS_USER_ROOT=y,
> it failed to boot because it failed to find /init. If I made the /init as
> a symlink of "sbin/init" (relative path), it works.
>
> Would you have any idea?
>

Thanks for your report!

I think it's because of the path lookup on '/'. With LOOKUP_DOWN
set, the lookup for '/' of '/init' will follow the mount. However,
during the follow link of '/sbin/init', the '/' of it will not be followed,
because LOOKUP_DOWN only works one time. I'm not sure if this is an
imperfection of 'path_lookupat()'.

I'll fix it in the next series.

Thanks!
Menglong Dong



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux