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]
Date: Sun, 31 Mar 2024 22:28:27 +0200
From: Borislav Petkov <bp@...en8.de>
To: Mahmoud Younes <m.younesbadr@...il.com>
Cc: dave.hansen@...ux.intel.com, linux-kernel@...r.kernel.org,
	luto@...nel.org
Subject: Re: [PATCH] kaslr: x86: fixes log message nokaslr

On Sun, Mar 31, 2024 at 10:05:46PM +0200, Mahmoud Younes wrote:
> Unknown kernel command line parameters nokaslr message will be printed
> to kernel log buffer if nokaslr option exists in boot command line.
> nokaslr gets consumed earlier and this message becomes confusing.
> impact is that user gets confused whether kaslr is enabled or not.

Well, my dmesg has here:

---
..
trampoline_32bit: 0x0000000000000000


KASLR disabled: 'nokaslr' on cmdline.


Decompressing Linux... Parsing ELF... No relocation needed... done.
..
---

so the notification for the user is there.

> Signed-off-by: Mahmoud Younes <m.younesbadr@...il.com>
> ---
>  arch/x86/mm/kaslr.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
> index 37db264866b6..a62cb0675e22 100644
> --- a/arch/x86/mm/kaslr.c
> +++ b/arch/x86/mm/kaslr.c
> @@ -179,3 +179,9 @@ void __meminit init_trampoline_kaslr(void)
>  			__pgd(_KERNPG_TABLE | __pa(pud_page_tramp));
>  	}
>  }
> +
> +static int __init parse_nokaslr(char *_)
> +{
> +	return 0;
> +}
> +early_param("nokaslr", parse_nokaslr);

This piece of code without any comments explaining why it is there is
not less confusing to whoever stares at it.

I'd prefer if print_unknown_bootoptions() would filter out those options
which are parsed earlier and not warn about them instead of having such
dummy stubs.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ