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]
Message-ID: <20120513095913.GB28863@aftab.osrc.amd.com>
Date:	Sun, 13 May 2012 11:59:13 +0200
From:	Borislav Petkov <bp@...64.org>
To:	Tony Luck <tony.luck@...el.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Borislav Petkov <bp@...64.org>,
	Chen Gong <gong.chen@...ux.intel.com>,
	"Huang, Ying" <ying.huang@...el.com>,
	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
Subject: Re: [PATCH 1/2] x86/mce: Only restart instruction after machine
 check recovery if it is safe

On Thu, May 10, 2012 at 11:01:20AM -0700, Tony Luck wrote:
> Section 15.3.1.2 of the software developer manual has this to say about the
> RIPV bit in the IA32_MCG_STATUS register:
> 
>   RIPV (restart IP valid) flag, bit 0 — Indicates (when set) that program
>   execution can be restarted reliably at the instruction pointed to by the
>   instruction pointer pushed on the stack when the machine-check exception
>   is generated.  When clear, the program cannot be reliably restarted at
>   the pushed instruction pointer.
> 
> We need to save the state of this bit in do_machine_check() and use it
> in mce_notify_process() to force a signal; even if memory_failure() says
> it made a complete recovery ... e.g. replaced a clean LRU page).
> 
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
>  arch/x86/kernel/cpu/mcheck/mce.c |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 66e1c51..3b8ebdc 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -947,9 +947,10 @@ struct mce_info {
>  	atomic_t		inuse;
>  	struct task_struct	*t;
>  	__u64			paddr;
> +	int			restartable;

Is it me or does this look like a flag, or a bitfield? Instead of
wasting a whole integer for a single bit of information.

It will probably end up the same size though due to compiler padding
since this struct is currently 4 + 2*8 byte without the ->restartable
thing.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
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