Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753004AbbKLEPA (ORCPT ); Wed, 11 Nov 2015 23:15:00 -0500 Received: from mail.kernel.org ([198.145.29.136]:45211 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752668AbbKLEO7 (ORCPT ); Wed, 11 Nov 2015 23:14:59 -0500 Subject: Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check fixup tables To: Tony Luck , Borislav Petkov References: <5bf6f812a7dd2b619487c57987e29b3884c6c4ec.1447093568.git.tony.luck@intel.com> Cc: linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, x86@kernel.org From: Andy Lutomirski Message-ID: <56441240.6000607@kernel.org> Date: Wed, 11 Nov 2015 20:14:56 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5bf6f812a7dd2b619487c57987e29b3884c6c4ec.1447093568.git.tony.luck@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1611 Lines: 46 On 11/06/2015 12:57 PM, Tony Luck wrote: > Copy the existing page fault fixup mechanisms to create a new table > to be used when fixing machine checks. Note: > 1) At this time we only provide a macro to annotate assembly code > 2) We assume all fixups will in code builtin to the kernel. Shouldn't the first step be to fixup failures during user memory access? > > Signed-off-by: Tony Luck > --- > arch/x86/include/asm/asm.h | 7 +++++++ > arch/x86/include/asm/uaccess.h | 1 + > arch/x86/mm/extable.c | 16 ++++++++++++++++ > include/asm-generic/vmlinux.lds.h | 6 ++++++ > include/linux/module.h | 1 + > kernel/extable.c | 14 ++++++++++++++ > 6 files changed, 45 insertions(+) > > diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h > index 189679aba703..f2fa7973f18f 100644 > --- a/arch/x86/include/asm/asm.h > +++ b/arch/x86/include/asm/asm.h > @@ -58,6 +58,13 @@ > .long (to) - . + 0x7ffffff0 ; \ > .popsection > > +# define _ASM_MCEXTABLE(from, to) \ > + .pushsection "__mcex_table", "a" ; \ > + .balign 8 ; \ > + .long (from) - . ; \ > + .long (to) - . ; \ > + .popsection > + This does something really weird to rax. (Also, what happens on 32-bit kernels? There's no bit 63.) Please at least document it clearly. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/