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:   Tue, 16 Apr 2019 15:49:47 +0200
From:   Helge Deller <deller@....de>
To:     linux-kernel@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4.9 64/76] parisc: Detect QEMU earlier in boot process

Hi Greg,

please do NOT apply this patch to the 4.9 tree.
See below, it was tagged for v4.14+ only.
It breaks the build on 4.9, I got a 0-day build bug about it.

Thanks,
Helge


On 15.04.19 20:44, Greg Kroah-Hartman wrote:
> From: Helge Deller <deller@....de>
> 
> commit d006e95b5561f708d0385e9677ffe2c46f2ae345 upstream.
> 
> While adding LASI support to QEMU, I noticed that the QEMU detection in
> the kernel happens much too late. For example, when a LASI chip is found
> by the kernel, it registers the LASI LED driver as well.  But when we
> run on QEMU it makes sense to avoid spending unnecessary CPU cycles, so
> we need to access the running_on_QEMU flag earlier than before.
> 
> This patch now makes the QEMU detection the fist task of the Linux
> kernel by moving it to where the kernel enters the C-coding.
> 
> Fixes: 310d82784fb4 ("parisc: qemu idle sleep support")
> Signed-off-by: Helge Deller <deller@....de>
> Cc: stable@...r.kernel.org # v4.14+
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> ---
>  arch/parisc/kernel/process.c |    6 ------
>  arch/parisc/kernel/setup.c   |    3 +++
>  2 files changed, 3 insertions(+), 6 deletions(-)
> 
> --- a/arch/parisc/kernel/process.c
> +++ b/arch/parisc/kernel/process.c
> @@ -206,12 +206,6 @@ void __cpuidle arch_cpu_idle(void)
>  
>  static int __init parisc_idle_init(void)
>  {
> -	const char *marker;
> -
> -	/* check QEMU/SeaBIOS marker in PAGE0 */
> -	marker = (char *) &PAGE0->pad0;
> -	running_on_qemu = (memcmp(marker, "SeaBIOS", 8) == 0);
> -
>  	if (!running_on_qemu)
>  		cpu_idle_poll_ctrl(1);
>  
> --- a/arch/parisc/kernel/setup.c
> +++ b/arch/parisc/kernel/setup.c
> @@ -403,6 +403,9 @@ void start_parisc(void)
>  	int ret, cpunum;
>  	struct pdc_coproc_cfg coproc_cfg;
>  
> +	/* check QEMU/SeaBIOS marker in PAGE0 */
> +	running_on_qemu = (memcmp(&PAGE0->pad0, "SeaBIOS", 8) == 0);
> +
>  	cpunum = smp_processor_id();
>  
>  	set_firmware_width_unlocked();
> 
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ