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:   Thu, 8 Oct 2020 11:04:20 +0200
From:   Joerg Roedel <jroedel@...e.de>
To:     Arvind Sankar <nivedita@...m.mit.edu>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] x86/boot: Initialize boot_params in startup code

On Wed, Oct 07, 2020 at 03:53:47PM -0400, Arvind Sankar wrote:
> Save the boot_params pointer passed in by the bootloader in
> startup_32/64. This avoids having to initialize it in two different
> places in C code, and having to preserve SI through the early assembly
> code.
> 
> Signed-off-by: Arvind Sankar <nivedita@...m.mit.edu>

Nice cleanup!

>  /*
>   * Jump to the extracted kernel.
>   */
> -	xorl	%ebx, %ebx
> +	movl	boot_params@...OFF(%ebx), %esi
>  	jmp	*%eax
>  SYM_FUNC_END(.Lrelocated)
>  
> @@ -209,6 +208,8 @@ SYM_DATA_START_LOCAL(gdt)
>  	.quad	0x00cf92000000ffff	/* __KERNEL_DS */
>  SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
>  
> +SYM_DATA(boot_params, .long 0)
> +

You should add a comment here that boot_params needs to be in the .data
section because in .bss it would get zeroed out again later. Same
applies to the 64bit version of this.

With that changed:

Reviewed-by: Joerg Roedel <jroedel@...e.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ