All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Marco Elver <elver@google.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev, qemu-s390x <qemu-s390x@nongnu.org>
Subject: Re: [PATCH] s390/unwind: use current_frame_address() to unwind current task
Date: Wed, 1 Sep 2021 20:07:37 +0200	[thread overview]
Message-ID: <YS/BaQcbMkEji9Zg@osiris> (raw)
In-Reply-To: <CANpmjNOJN4yG8g+Qz0icppRK6coVdN5yKMhyTCQeBRFq7_YpfA@mail.gmail.com>

On Wed, Sep 01, 2021 at 07:51:06PM +0200, Marco Elver wrote:
> On Wed, 1 Sept 2021 at 16:06, Vasily Gorbik <gor@linux.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@kernel.org>
> > Suggested-by: Marco Elver <elver@google.com>
> > Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
> 
> Tested-by: Marco Elver <elver@google.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!

  reply	other threads:[~2021-09-01 18:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 13:11 [GIT PULL] s390 updates for 5.15 merge window Heiko Carstens
2021-08-30 20:17 ` pr-tracker-bot
2021-08-31  2:19 ` Nathan Chancellor
2021-08-31  7:09   ` Christian Borntraeger
2021-08-31 10:13     ` Heiko Carstens
2021-08-31 10:46       ` Marco Elver
2021-08-31 15:02         ` Marco Elver
2021-08-31 15:18           ` Heiko Carstens
2021-08-31 17:48           ` Nathan Chancellor
2021-08-31 17:49             ` Christian Borntraeger
2021-09-01 14:03           ` Vasily Gorbik
2021-09-01 14:05             ` [PATCH] s390/unwind: use current_frame_address() to unwind current task Vasily Gorbik
2021-09-01 17:51               ` Marco Elver
2021-09-01 18:07                 ` Heiko Carstens [this message]
2021-09-03 23:23               ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YS/BaQcbMkEji9Zg@osiris \
    --to=hca@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=elver@google.com \
    --cc=gor@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.