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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200911140116.21627.rjw@sisk.pl>
Date:	Sat, 14 Nov 2009 01:16:21 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, tglx@...utronix.de,
	x86@...nel.org, Pavel Machek <pavel@....cz>,
	Nigel Cunningham <nigel@...onice.net>
Subject: Re: [PATCH 2/5] x86, sleep: always save the value of EFER

On Saturday 14 November 2009, H. Peter Anvin wrote:
> Always save the value of EFER, regardless of the state of NX.  Since
> EFER may not actually exist, use rdmsr_safe() to do so.
> 
> Signed-off-by: H. Peter Anvin <hpa@...or.com>
> Cc: Pavel Machek <pavel@....cz>
> Cc: Rafael J. Wysocki <rjw@...k.pl>

Acked-by: Rafael J. Wysocki <rjw@...k.pl>

> Cc: Nigel Cunningham <nigel@...onice.net>
> ---
>  arch/x86/kernel/acpi/sleep.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
> index ca93638..c2e4455 100644
> --- a/arch/x86/kernel/acpi/sleep.c
> +++ b/arch/x86/kernel/acpi/sleep.c
> @@ -78,12 +78,9 @@ int acpi_save_state_mem(void)
>  #ifndef CONFIG_64BIT
>  	store_gdt((struct desc_ptr *)&header->pmode_gdt);
>  
> -	header->pmode_efer_low = nx_enabled;
> -	if (header->pmode_efer_low & 1) {
> -		/* This is strange, why not save efer, always? */
> -		rdmsr(MSR_EFER, header->pmode_efer_low,
> -			header->pmode_efer_high);
> -	}
> +	header->pmode_efer_low = header->pmode_efer_high = 0;
> +	rdmsr_safe(MSR_EFER,
> +		   &header->pmode_efer_low, &header->pmode_efer_high);
>  #endif /* !CONFIG_64BIT */
>  
>  	header->pmode_cr0 = read_cr0();
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ