Re: [PATCH 2/5] x86/boot: Move get_cmd_line_ptr() and COMMAND_LINE_SIZE into misc.h

Borislav Petkov
2020-10-08T16:16:22Z

On Thu, Oct 08, 2020 at 11:30:02AM -0400, Arvind Sankar wrote:
> I'm working on a couple of separate series to clean up cmdline
> and the compressed boot code a bit. I was actually planning to
> get rid of boot/compressed/cmdline.c entirely, replacing it with
> arch/x86/lib/cmdline.c instead:

The problem with mixing code from kernel proper with the decompressor is
that when someone changes former, latter gets all those changes too and
gradual changes like that have lead to this mess. There's a reason the
two are separate and we should separate them even more. I'm even fine
with copying functionality between the two instead of sharing.

> that one's better and is reusable as-is for the decompressor stub,
> instead of the current hack to use the real-mode boot stub's
> cmdline.c. The real mess in there is all the includes of .c files from
> various places.

Yes, and that needs untangling and making all separate. This will keep
the decompressor simple and without all that undeffery/ifdeffery because
of includes leaking symbols from kernel proper and whatnot.

Thx.

--
Regards/Gruss,
Boris.