[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrURssJHn42dXsEJbJbr=VGPnV1U_-UkYEZ48SPUSbUDww@mail.gmail.com>
Date: Fri, 8 Jan 2016 17:52:54 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Tony Luck <tony.luck@...el.com>
Cc: Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
Robert <elliott@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
linux-nvdimm <linux-nvdimm@...1.01.org>, X86 ML <x86@...nel.org>
Subject: Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options
On Fri, Jan 8, 2016 at 12:49 PM, Tony Luck <tony.luck@...el.com> wrote:
> Huge amounts of help from Andy Lutomirski and Borislav Petkov to
> produce this. Andy provided the inspiration to add classes to the
> exception table with a clever bit-squeezing trick, Boris pointed
> out how much cleaner it would all be if we just had a new field.
>
> Linus Torvalds blessed the expansion with:
> I'd rather not be clever in order to save just a tiny amount of space
> in the exception table, which isn't really criticial for anybody.
>
> The third field is a simple integer indexing into an array of handler
> functions (I thought it couldn't be a relative pointer like the other
> fields because a module may have its ex_table loaded more than 2GB away
> from the handler function - but that may not be actually true. But the
> integer is pretty flexible, we are only really using low two bits now).
>
> We start out with three handlers:
>
> 0: Legacy - just jumps the to fixup IP
> 1: Fault - provide the trap number in %ax to the fixup code
> 2: Cleaned up legacy for the uaccess error hack
I think I preferred the relative function pointer approach.
Also, I think it would be nicer if the machine check code would invoke
the handler regardless of which handler (or class) is selected. Then
the handlers that don't want to handle #MC can just reject them.
Also, can you make the handlers return bool instead of int?
--Andy
Powered by blists - more mailing lists