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

Luck, Tony
2015-11-10T22:05:36Z

On Tue, Nov 10, 2015 at 12:21:16PM +0100, Borislav Petkov wrote:
> > +# define _ASM_MCEXTABLE(from, to) \
>
> Maybe add an intermediary macro which abstracts the table name:
>
> #define __ASM_EXTABLE(from, to, table)
> ...
>
> and then do
>
> #define _ASM_EXTABLE(from, to) __ASM_EXTABLE(from, to, "__ex_table")
> #define _ASM_MCEXTABLE(from, to) __ASM_EXTABLE(from, to, "__mcex_table")

That looks a bit nicer.
>
> Yeah, all that duplication might raise some brows but I'd guess
> special-handling MCA in the normal exception paths might make the code
> a bit too ugly...

The 0-day robot berated me for bloating the i386-tinyconfig by 88 bytes.
I guess I can put the new functions inside #ifdef CONFIG_MEMORY_FAILURE
to save them from that. Enterprise kernels that turn this option on can
probably live with 88 bytes.

-Tony