Re: [PATCH] x86/process: don't mix user/kernel regs in 64bit __show_regs
From: Thomas Gleixner
Date: Thu Sep 06 2018 - 08:31:51 EST
On Thu, 6 Sep 2018, Jann Horn wrote:
> On Fri, Aug 31, 2018 at 10:12 PM Andy Lutomirski <luto@xxxxxxxxxx> wrote:
> >
> > On Fri, Aug 31, 2018 at 12:41 PM, Jann Horn <jannh@xxxxxxxxxx> wrote:
> > > When the kernel.print-fatal-signals sysctl has been enabled (I don't know
> > > whether anyone actually enables it), a simple userspace crash will cause
> > > the kernel to write a crash dump that contains, among other things, the
> > > kernel gsbase into dmesg.
> > >
> > > As suggested by Andy, limit output to pt_regs, FS_BASE and KERNEL_GS_BASE
> > > in this case.
> > >
> > > This also moves the bitness-specific logic from show_regs() into
> > > process_{32,64}.c.
> > >
> > > Signed-off-by: Jann Horn <jannh@xxxxxxxxxx>
> > > Fixes: 45807a1df9f5 ("vdso: print fatal signals")
> > > ---
> > > @Andy: Does this look like what you had in mind?
> >
> > Yes.
> >
> > Although there's another option: remove print-fatal-signals.
>
> Who wants to decide? Ingo, it's your feature - what do you think?
It seems to be documented for trouble shooting in lots of places and the
fix is not horrible. So lets keep it.
Thanks,
tglx