Re: [PATCH v2 RESEND] x86/kaslr: Ingest nokaslr to avoid passing it to init process
From: Peter Zijlstra
Date: Tue Jan 14 2025 - 09:12:33 EST
On Tue, Jan 14, 2025 at 01:31:42PM +0100, Borislav Petkov wrote:
> On Tue, Jan 14, 2025 at 10:36:43AM +0100, Peter Zijlstra wrote:
> > On Sat, Jan 11, 2025 at 02:17:43PM +0000, Nir Lichtman wrote:
> > > Problem: Currently booting the kernel with "nokaslr" on x86 incorrectly
> > > doesn't recognize this parameter and passes it on to the init process
> >
> > What now? I'm pretty sure nokaslr works, it's in all my test machines
> > and qemu scripts. Without it faddr2line wouldn't work, which I would
> > notice in a hurry.
>
> Yeah, the param itself works - he doesn't want to pass it on to the init
> process because then it says:
>
> [ 0.073613] Unknown kernel command line parameters "nokaslr", will be passed to user space.
>
> due to our detection of which parameters got eaten and which didn't.
I had never noticed; random machine of mine says:
[ 0.591565] Unknown kernel command line parameters "force_early_printk nokaslr kgdboc=ttyS0", will be passed to user space.
*shrug*, who cares.