From: William Tambe <tambewilliam@gmail.com>
To: Kernelnewbies@kernelnewbies.org
Subject: printk() format %pS wrong symbol
Date: Sat, 4 Jul 2020 06:11:19 -0400 [thread overview]
Message-ID: <CAF8i9mNTPDROfKbxiwcXOY0HD=6LupOBkCoquiL+YZCv_xf1eA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 586 bytes --]
I am seeing an issue in our Linux port where printk() format %pS will print
a symbol as:
kernel_init+0x120/0x120
where the offset within the function 0x120, is the same as the function
size 0x120; in fact, the largest offset within the function should be 0x11f.
When printing above symbol+offset in gdb, the correct symbol is
displayed as follow:
(gdb) p (void*)(kernel_init+0x120)
$1 = (void *) 0x589a28 <ret_for_syscall>
What could be the cause of printk() format %pS printing an incorrect symbol.
Where can I find in the Linux source code, the function handling the format
%pS ?
[-- Attachment #1.2: Type: text/html, Size: 803 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next reply other threads:[~2020-07-04 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-04 10:11 William Tambe [this message]
2020-07-04 10:29 ` printk() format %pS wrong symbol Valentin Vidić
2020-07-04 16:04 ` William Tambe
2020-07-04 17:14 ` Valentin Vidić
2020-07-06 22:06 ` William Tambe
2020-07-07 18:39 ` Valentin Vidić
2020-07-07 18:53 ` Valentin Vidić
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='CAF8i9mNTPDROfKbxiwcXOY0HD=6LupOBkCoquiL+YZCv_xf1eA@mail.gmail.com' \
--to=tambewilliam@gmail.com \
--cc=Kernelnewbies@kernelnewbies.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).