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]
Date:   Wed, 1 Sep 2021 20:07:37 +0200
From:   Heiko Carstens <hca@...ux.ibm.com>
To:     Marco Elver <elver@...gle.com>
Cc:     Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, qemu-s390x <qemu-s390x@...gnu.org>
Subject: Re: [PATCH] s390/unwind: use current_frame_address() to unwind
 current task

On Wed, Sep 01, 2021 at 07:51:06PM +0200, Marco Elver wrote:
> On Wed, 1 Sept 2021 at 16:06, Vasily Gorbik <gor@...ux.ibm.com> wrote:
> > current_stack_pointer() simply returns current value of %r15. If
> > current_stack_pointer() caller allocates stack (which is the case in
> > unwind code) %r15 points to a stack frame allocated for callees, meaning
> > current_stack_pointer() caller (e.g. stack_trace_save) will end up in
> > the stacktrace. This is not expected by stack_trace_save*() callers and
> > causes problems.
> >
> > current_frame_address() on the other hand returns function stack frame
> > address, which matches %r15 upon function invocation. Using it in
> > get_stack_pointer() makes it more aligned with x86 implementation
> > (according to BACKTRACE_SELF_TEST output) and meets stack_trace_save*()
> > caller's expectations, notably KCSAN.
> >
> > Also make sure unwind_start is always inlined.
> >
> > Reported-by: Nathan Chancellor <nathan@...nel.org>
> > Suggested-by: Marco Elver <elver@...gle.com>
> > Signed-off-by: Vasily Gorbik <gor@...ux.ibm.com>
> 
> Tested-by: Marco Elver <elver@...gle.com>
> 
> Thanks!
> 
> > ---
> >  arch/s390/include/asm/stacktrace.h | 20 ++++++++++----------
> >  arch/s390/include/asm/unwind.h     |  8 ++++----
> >  2 files changed, 14 insertions(+), 14 deletions(-)

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ