Re: [PATCH v2 2/3] x86/traps: Print non-canonical address on #GP

From: Ingo Molnar
Date: Wed Nov 20 2019 - 06:41:45 EST



* Borislav Petkov <bp@xxxxxxxxx> wrote:

> On Mon, Nov 18, 2019 at 05:44:07PM +0100, Borislav Petkov wrote:
> > [ 2.523708] Write protecting the kernel read-only data: 16384k
> > [ 2.524729] Freeing unused kernel image (text/rodata gap) memory: 2040K
> > [ 2.525594] Freeing unused kernel image (rodata/data gap) memory: 368K
> > [ 2.541414] x86/mm: Checked W+X mappings: passed, no W+X pages found.
> >
> > <--- important first splat starts here:
> >
> > [ 2.542218] [*] general protection fault while derefing a non-canonical address 0xdfff000000000001: 0000 [#1] PREEMPT SMP
> ^
>
> Btw, tglx just suggested on IRC to simply slap the die_counter number here so
> that you have
>
> [ 2.543343] [1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc8+ #8
> [ 2.544138] [1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1 04/01/2014
> ...
>
> which also tells you to which splat the line belongs to.
>
> Also useful.

Yeah - but I think it would be even better to make it part of the
timestamp - most tools will already discard the [] bit, so why not merge
the two:

> [ 2.543343-#1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc8+ #8
> [ 2.544138-#1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1 04/01/2014

Thanks,

Ingo