From: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
To: Nico Boehr <nrb@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>
Cc: David Hildenbrand <david@redhat.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v1] s390x: Improve stack traces that contain an interrupt frame
Date: Mon, 17 Apr 2023 11:06:51 +0200 [thread overview]
Message-ID: <ea529fc34e7b4b3b28097fb53e65928c249f6a88.camel@linux.ibm.com> (raw)
In-Reply-To: <168171822413.10491.11548053616048775653@t14-nrb>
On Mon, 2023-04-17 at 09:57 +0200, Nico Boehr wrote:
> Quoting Nina Schoetterl-Glausch (2023-04-05 14:35:08)
> > When we encounter an unexpected interrupt we print a stack trace.
> > While we can identify the interrupting instruction via the old psw,
> > we don't really have a way to identify callers further up the stack,
> > since we rely on the s390x elf abi calling convention to perform the
> > backtrace. An interrupt is not a call, so there are no guarantees about
> > the contents of the stack and return address registers.
> > If we get lucky their content is as we need it or valid for a previous
> > callee in which case we print one wrong caller and then proceed with the
> > correct ones.
>
> I did not think too much about it, so it might not work, but how about a
> seperate interrupt stack?
>
> Then, we could print the interrupt stack trace (which should be correct) and -
> with a warning as you suggest - the maybe incorrect regular stack trace.
Not sure I'm getting the point. Do you want an implementation that doesn't have
the weirdness of using a frame with a special symbol to warn?
We only output a bunch of caller addresses and pretty_print_stacks.py formats that
into a readable stack trace. So by having the special symbol frame there are no
changes needed to that script, but it certainly would be possible do it differently,
e.g. output "STACK: dead beef WARN 0 ffff" and have the script
print the warning if it sees a WARN.
prev parent reply other threads:[~2023-04-17 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 12:35 [kvm-unit-tests PATCH v1] s390x: Improve stack traces that contain an interrupt frame Nina Schoetterl-Glausch
2023-04-17 7:57 ` Nico Boehr
2023-04-17 9:06 ` Nina Schoetterl-Glausch [this message]
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=ea529fc34e7b4b3b28097fb53e65928c249f6a88.camel@linux.ibm.com \
--to=nsg@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox