[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADxym3ZjQOmruJXZxR=LwtQRCKQiDFGXNAq+Yk_-+vLJcGchvQ@mail.gmail.com>
Date: Fri, 28 May 2021 15:37:04 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Luis Chamberlain <mcgrof@...nel.org>,
Josh Triplett <josh@...htriplett.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Kees Cook <keescook@...omium.org>,
Sami Tolvanen <samitolvanen@...gle.com>, ojeda@...nel.org,
johan@...nel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
masahiroy@...nel.org, Menglong Dong <dong.menglong@....com.cn>,
joe@...ches.com, Jens Axboe <axboe@...nel.dk>, hare@...e.de,
Jan Kara <jack@...e.cz>, tj@...nel.org,
gregkh@...uxfoundation.org, song@...nel.org,
NeilBrown <neilb@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
f.fainelli@...il.com, arnd@...db.de,
Rasmus Villemoes <linux@...musvillemoes.dk>,
wangkefeng.wang@...wei.com, Barret Rhoden <brho@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>, vbabka@...e.cz,
Alexander Potapenko <glider@...gle.com>, pmladek@...e.com,
Chris Down <chris@...isdown.name>,
"Eric W. Biederman" <ebiederm@...ssion.com>, jojing64@...il.com,
terrelln@...com, geert@...ux-m68k.org, mingo@...nel.org,
linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
jeyu@...nel.org
Subject: Re: [PATCH v2 0/3] init/initramfs.c: make initramfs support pivot_root
Hello!
On Fri, May 28, 2021 at 3:10 PM Masami Hiramatsu <mhiramat@...nel.org> 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
Powered by blists - more mailing lists