From: Mark Brown <broonie@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-s390@vger.kernel.org, Vasily Gorbik <gor@linux.ibm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Heiko Carstens <hca@linux.ibm.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Jiri Slaby <jirislaby@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Miroslav Benes <mbenes@suse.cz>, Will Deacon <will@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/3] arm64: stacktrace: Convert to ARCH_STACKWALK
Date: Thu, 10 Sep 2020 18:34:14 +0100 [thread overview]
Message-ID: <20200910173414.GD4898@sirena.org.uk> (raw)
In-Reply-To: <20200902184935.GA5875@C02TD0UTHF1T.local>
[-- Attachment #1.1: Type: text/plain, Size: 1385 bytes --]
On Wed, Sep 02, 2020 at 07:50:27PM +0100, Mark Rutland wrote:
> On Wed, Sep 02, 2020 at 11:32:13AM +0200, Miroslav Benes wrote:
> > > - start_backtrace(&frame,
> > > - (unsigned long)__builtin_frame_address(0),
> > > - (unsigned long)__save_stack_trace);
> Oh whoops; I'm annoyed I didn't spot that.
> With that gone this cannot work for (task == current && regs == NULL), as
> we'll erroneously use stale values from the task struct.
I remember somehow convincing myself at the time I originally did this
that doing the above was redundant with the new interface but that was
quite some time ago and I can't reconstruct my reasoning any more, I'm
pretty sure I was just mistaken. I've added it back in, thanks for
spotting this.
> It looks like the LKDTM tests only trigger cases with non-NULL regs, but
> IIUC this should show up with show_stack(NULL, NULL, KERN_INFO), as
> drivers/tty/sysrq.c does for other cpus.
show_stack() doesn't go through this bit of the stacktrace code, it goes
through dump_backtrace() in traps.c which used the underlying arch
specific unwinder directly so is unaffected by arch_stack_walk().
Actually now I look at LKDTM it's ending up using show_stack() mostly
if not entirely so my testing with it was not exercising this change
as much as might be expected anyway (the modified code was getting hit
by other things like /proc/N/stack).
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-09-10 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 12:49 [PATCH v2 0/3] arm64: Convert to ARCH_STACKWALK Mark Brown
2020-08-19 12:49 ` [PATCH v2 1/3] stacktrace: Remove reliable argument from arch_stack_walk() callback Mark Brown
2020-09-02 9:26 ` Miroslav Benes
2020-08-19 12:49 ` [PATCH v2 2/3] arm64: stacktrace: Make stack walk callback consistent with generic code Mark Brown
2020-09-02 9:26 ` Miroslav Benes
2020-08-19 12:49 ` [PATCH v2 3/3] arm64: stacktrace: Convert to ARCH_STACKWALK Mark Brown
2020-09-02 9:32 ` Miroslav Benes
2020-09-02 18:50 ` Mark Rutland
2020-09-10 17:34 ` Mark Brown [this message]
2020-09-01 16:06 ` [PATCH v2 0/3] arm64: " Mark Rutland
2020-09-02 17:38 ` Mark Brown
2020-09-02 19:03 ` Mark Rutland
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=20200910173414.GD4898@sirena.org.uk \
--to=broonie@kernel.org \
--cc=borntraeger@de.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mbenes@suse.cz \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).