From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, patches@armlinux.org.uk
Subject: Re: [PATCH] ARM: Remove the special printing format of pc and lr in __show_regs()
Date: Mon, 8 Aug 2022 10:41:53 +0100 [thread overview]
Message-ID: <YvDaYakZnP5Z+2ia@shell.armlinux.org.uk> (raw)
In-Reply-To: <20220801032016.1524-1-thunder.leizhen@huawei.com>
On Mon, Aug 01, 2022 at 11:20:16AM +0800, Zhen Lei wrote:
> Currently, instruction pointers are printed in [<%08lx>] format to make
> them more visible. However, it is not necessary in __show_regs() because
> they have the prefix 'pc :' or 'lr :', and it is also inconsistent with
> that of other registers, which causes misalignment.
The formatting is not "to make them more visible" - it was to mark the
addresses that we wanted the ksymoops utility to translate to kernel
symbols before we had kallsyms in the kernel. If one disables kallsyms,
then we still need a way to translate kernel addresses to symbols.
I notice there is a script which helps with this that is part of the
kernel source - scripts/decode_stacktrace.sh. I haven't tried this on
arm32 since I always use kallsyms - and I suspect that is rather
universally true as it avoids needing System.map files etc to decode
the oops. That said, if you're building a kernel for small systems,
you probably don't want the overhead of kallsyms.
So, there's an argument for keeping it - it's an API in that it
provides hints to scripting to identify which values need to be
converted to symbols. There's also the argument for getting rid of it,
which is that hardly anyone does that anymore.
The question is, which is the more important argument, and I don't
think there's a definite answer. So I'm inclined to leave this
as-is.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
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:[~2022-08-08 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 3:20 [PATCH] ARM: Remove the special printing format of pc and lr in __show_regs() Zhen Lei
2022-08-08 9:41 ` Russell King (Oracle) [this message]
2022-08-09 2:09 ` Leizhen (ThunderTown)
2022-08-09 9:03 ` Leizhen (ThunderTown)
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=YvDaYakZnP5Z+2ia@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@armlinux.org.uk \
--cc=thunder.leizhen@huawei.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;
as well as URLs for NNTP newsgroup(s).