Messages in this thread | | | Date | Tue, 31 Dec 2019 13:11:21 +0100 | From | Borislav Petkov <> | Subject | Re: [PATCH v7 3/4] x86/dumpstack: Introduce die_addr() for die() with #GP fault address |
| |
On Thu, Dec 19, 2019 at 12:11:49AM +0100, Jann Horn wrote: > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c > index c8b4ae6aed5b..4c691bb9e0d9 100644 > --- a/arch/x86/kernel/traps.c > +++ b/arch/x86/kernel/traps.c > @@ -621,7 +621,10 @@ do_general_protection(struct pt_regs *regs, long error_code) > "maybe for address", > gp_addr);
> - die(desc, regs, error_code);
I've added here:
/* * KASAN is interested only in the non-canonical case, clear it * otherwise. */
> + if (hint != GP_NON_CANONICAL) > + gp_addr = 0;
otherwise you have:
if (hint != GP_NO_HINT) ...
if (hint != GP_NON_CANONICAL) ...
which is kinda confusing at a first glance and one has to follow the code into die_addr() to figure out the usage of the address argument.
Thx.
-- Regards/Gruss, Boris.
https://people.kernel.org/tglx/notes-about-netiquette
| |