[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160106123604.GD19507@pd.tnic>
Date: Wed, 6 Jan 2016 13:36:04 +0100
From: Borislav Petkov <bp@...en8.de>
To: Tony Luck <tony.luck@...el.com>
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Dan Williams <dan.j.williams@...el.com>, elliott@....com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-nvdimm@...1.01.org, x86@...nel.org
Subject: Re: [PATCH v7 1/3] x86: Add classes to exception tables
On Wed, Dec 30, 2015 at 09:59:29AM -0800, Tony Luck wrote:
> Starting with a patch from Andy Lutomirski <luto@...capital.net>
> that used linker relocation trickery to free up a couple of bits
> in the "fixup" field of the exception table (and generalized the
> uaccess_err hack to use one of the classes).
>
> This patch allocates another one of the classes to provide
> a mechanism to provide the fault number to the fixup code
> in %rax.
>
> Still one free class for the next brilliant idea. If more are
> needed it should be possible to squeeze another bit or three
> extending the same technique.
>
> Originally-from: Andy Lutomirski <luto@...capital.net>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
> arch/x86/include/asm/asm.h | 102 +++++++++++++++++++++++++++++++----------
> arch/x86/include/asm/uaccess.h | 17 +++++--
> arch/x86/kernel/kprobes/core.c | 2 +-
> arch/x86/kernel/traps.c | 6 +--
> arch/x86/mm/extable.c | 66 ++++++++++++++++++--------
> arch/x86/mm/fault.c | 2 +-
> 6 files changed, 142 insertions(+), 53 deletions(-)
...
> @@ -699,7 +699,7 @@ static void math_error(struct pt_regs *regs, int error_code, int trapnr)
> conditional_sti(regs);
>
> if (!user_mode(regs)) {
> - if (!fixup_exception(regs)) {
> + if (!fixup_exception(regs, X86_TRAP_DE)) {
Whatever we end up doing, this needs to be trapnr above and not X86_TRAP_DE.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
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