lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180725205108.GE23643@kermit-br-ibm-com>
Date:   Wed, 25 Jul 2018 17:51:08 -0300
From:   Murilo Opsfelder Araujo <muriloo@...ux.ibm.com>
To:     LEROY Christophe <christophe.leroy@....fr>
Cc:     linuxppc-dev@...ts.ozlabs.org, "Tobin C . Harding" <me@...in.cc>,
        Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
        Simon Guo <wei.guo.simon@...il.com>,
        Paul Mackerras <paulus@...ba.org>,
        Nicholas Piggin <npiggin@...il.com>,
        Michael Neuling <mikey@...ling.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        Cyril Bur <cyrilbur@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Balbir Singh <bsingharora@...il.com>,
        Andrew Donnellan <andrew.donnellan@....ibm.com>,
        "Alastair D'Silva" <alastair@...ilva.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] powerpc/traps: Show instructions on exceptions

Hi, Christophe.

On Wed, Jul 25, 2018 at 06:01:34PM +0200, LEROY Christophe wrote:
> Murilo Opsfelder Araujo <muriloo@...ux.ibm.com> a écrit :
> 
> > Move show_instructions() declaration to arch/powerpc/include/asm/stacktrace.h
> > and include asm/stracktrace.h in arch/powerpc/kernel/process.c, which
> > contains
> > the implementation.
> > 
> > Modify show_instructions() not to call __kernel_text_address(), allowing
> > userspace instruction dump.  probe_kernel_address(), which returns -EFAULT if
> > something goes wrong, is still being called.
> > 
> > Call show_instructions() in arch/powerpc/kernel/traps.c to dump
> > instructions at
> > faulty location, useful to debugging.
> 
> Shouldn't this part be in a second patch ?

Makes sense.  Perhaps I should split this patch in two: one to remove
__kernel_text_address() check in show_instructions(), and another to
call show_instructions() in show_signal_msg().

> Wouldn't it be better to also see regs in addition if we want to use this to
> understand what happened ?
> So you could call show_regs() instead of show_instructions() ?

I see that show_regs() prints more information and calls
show_instructions() at the end if in privileged state.

I'm not sure about which situations we might want to call show_regs() -
and display a bunch of information - or just dump instructions for some
signals.

Isn't calling show_regs() in this case considered overkill?

Cheers
Murilo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ