lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADxym3a3=Xjj4LkRDMyiCnFm3BfG7s_iGoR1EjNWA9ytoS2tSQ@mail.gmail.com>
Date:   Thu, 29 Jul 2021 21:25:40 +0800
From:   Menglong Dong <menglong8.dong@...il.com>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Christian Brauner <christian.brauner@...ntu.com>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Kees Cook <keescook@...omium.org>,
        Sami Tolvanen <samitolvanen@...gle.com>, johan@...nel.org,
        ojeda@...nel.org, jeyu@...nel.org, masahiroy@...nel.org,
        joe@...ches.com, Jan Kara <jack@...e.cz>, hare@...e.de,
        Jens Axboe <axboe@...nel.dk>, tj@...nel.org,
        gregkh@...uxfoundation.org, song@...nel.org,
        NeilBrown <neilb@...e.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Barret Rhoden <brho@...gle.com>, f.fainelli@...il.com,
        palmerdabbelt@...gle.com, wangkefeng.wang@...wei.com,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>, vbabka@...e.cz,
        Alexander Potapenko <glider@...gle.com>,
        johannes.berg@...el.com,
        "Eric W. Biederman" <ebiederm@...ssion.com>, jojing64@...il.com,
        terrelln@...com, geert@...ux-m68k.org,
        linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        Luis Chamberlain <mcgrof@...nel.org>, arnd@...db.de,
        Chris Down <chris@...isdown.name>, mingo@...nel.org,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Josh Triplett <josh@...htriplett.org>
Subject: Re: [PATCH v6 2/2] init/do_mounts.c: create second mount for initramfs

Hello,

On Wed, Jul 28, 2021 at 4:07 PM Petr Mladek <pmladek@...e.com> wrote:
>
[...]
>
> I guess that you have seen the following message printed by
> console_on_rootfs():
>
>       "Warning: unable to open an initial console."
>
> This function is responsible for opening stdin, stdout, stderr
> file to be used by the init process.
>
> I am not sure how this is supposed to work with the pivot_root
> and initramfs.
>
>
> Some more details:
>
> console_on_rootfs() tries to open /dev/console. It is created
> by tty_init(). The open() callback calls:
>
>   + tty_kopen()
>     + tty_lookup_driver()
>       + console_device()
>
> , where console_device() iterates over all registered consoles
>   and returns the first with tty binding.
>
> There is ttynull_console that might be used as a fallback. But I
> am not sure if this is what you want.

I didn't figure out the relation between initramfs and initial console,
could you please tell me how this warning came up? I can't
reproduce it in qemu with this command:

qemu-system-x86_64 -nographic -m 2048M -smp cores=4,sockets=1 -s
-kernel ./bzImage -initrd ./rootfs.cpio -append "rdinit=/init
console=ttyS0"

Thanks!
Menglong Dong

>
> Best Regards,
> Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ