Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1267605

Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check fixup tables

From Andy Lutomirski <luto@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check fixup tables
Date 2015-11-12 05:20 +0100
Message-ID <qtRwB-417-3@gated-at.bofh.it> (permalink)
References <qsZFT-1HI-9@gated-at.bofh.it> <qsZFU-1HI-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <tony.luck@intel.com>
> ---
>   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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] x86, ras: Add new infrastructure for machine check fixup  tables Tony Luck <tony.luck@intel.com> - 2015-11-09 19:50 +0100
  Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check  fixup tables Borislav Petkov <bp@alien8.de> - 2015-11-10 12:30 +0100
    Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check  fixup tables "Luck, Tony" <tony.luck@intel.com> - 2015-11-10 23:10 +0100
  Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check  fixup tables Andy Lutomirski <luto@kernel.org> - 2015-11-12 05:20 +0100
    Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check  fixup tables "Luck, Tony" <tony.luck@intel.com> - 2015-11-12 20:50 +0100
      Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check  fixup tables Andy Lutomirski <luto@amacapital.net> - 2015-11-12 21:10 +0100
        Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check  fixup tables "Luck, Tony" <tony.luck@intel.com> - 2015-11-12 22:20 +0100

csiph-web