The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: ron minnich <rminnich@gmail.com>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Borislav Petkov <bp@suse.de>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	"H . Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] initrd: Remove erroneous comment
Date: Mon, 22 Jun 2020 16:40:34 -0400	[thread overview]
Message-ID: <20200622204034.GL27801@bill-the-cat> (raw)
In-Reply-To: <CAP6exYJ64Hy9y3Dzh9Asrq8Y0oDWYk+tf4UAcasEc-ZxTY8DAw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2839 bytes --]

On Mon, Jun 22, 2020 at 01:02:16PM -0700, ron minnich wrote:

> The other thing you ought to consider fixing:
> initrd is documented as follows:
> 
>         initrd=         [BOOT] Specify the location of the initial ramdisk
> 
> for bootloaders only.
> 
> UEFI consumes initrd from the command line as well. As ARM servers
> increasingly use UEFI, there may be situations in which the initrd
> option doesn't make its way to the kernel? I don't know, UEFI is such
> a black box to me. But I've seen this "initrd consumption" happen.
> 
> Based on docs, and the growing use of bootloaders that are happy to
> consume initrd= and not pass it to the kernel, you might be better off
> trying to move to the new command line option anyway.
> 
> IOW, this comment may not be what people want to see, but ... it might
> also be right. Or possibly changed to:
> 
> /*
>  * The initrd keyword is in use today on ARM, PowerPC, and MIPS.
>  * It is also reserved for use by bootloaders such as UEFI and may
>  * be consumed by them and not passed on to the kernel.
>  * The documentation also shows it as reserved for bootloaders.
>  * It is advised to move to the initrdmem= option whereever possible.
>  */

Fair warning, one of the other hats I wear is the chief custodian of the
U-Boot project.

Note that on most architectures in modern times the device tree is used
to pass in initrd type information and "initrd=" on the command line is
quite legacy.

But what do you mean UEFI "consumes" initrd= ?  It's quite expected that
when you configure grub/syslinux/systemd-boot/whatever via extlinux.conf
or similar with "initrd /some/file" something reasonable happens to
read that in to memory and pass along the location to Linux (which can
vary from arch to arch, when not using device tree).  I guess looking at 
Documentation/x86/boot.rst is where treating initrd= as a file that
should be handled and ramdisk_image / ramdisk_size set came from.  I do
wonder what happens in the case of ARM/ARM64 + UEFI without device tree.

That said, no the comment is wrong.  It's not "since 11/2018" but "since
the 1990s".  And it doesn't provide any sort of link / context to the
boot loader specification project or similar that explains the cases
when a non-filename "initrd=" would reasonably (or unreasonably but
happens in reality) be removed.

I would go so far as to suggest that adding special handling for some
x86 setups is the wrong to place to start / further deprecate how other
architectures and firmwares handle a given situation.  I'm only chiming
in here as I saw this commit go by on LWN and wanted to see how this was
different from the traditional usage of initrd= in the rest of the
kernel (it's not) and then saw the otherwise unrelated new comment being
added.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2020-06-22 20:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 14:30 [PATCH] initrd: Remove erroneous comment Tom Rini
2020-06-19 17:49 ` [tip: x86/cleanups] " tip-bot2 for Tom Rini
2020-06-20  0:03 ` [PATCH] " ron minnich
2020-06-22 20:23   ` hpa
2020-06-22 20:02 ` ron minnich
2020-06-22 20:40   ` Tom Rini [this message]
2020-06-22 20:48     ` H. Peter Anvin
2020-06-22 21:06       ` Tom Rini
2020-06-22 20:56     ` ron minnich
2020-06-22 21:01       ` Tom Rini
2020-06-22 21:03         ` H. Peter Anvin
2020-06-22 21:07           ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200622204034.GL27801@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=rminnich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox