Re: printk() format %pS wrong symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, Jul 4, 2020 at 6:29 AM Valentin Vidić <vvidic@xxxxxxxxxxxxxxxxxxxxxx> wrote:
On Sat, Jul 04, 2020 at 06:11:19AM -0400, William Tambe wrote:
> 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 ?

Check lib/vsprintf.c

How or which function within that file translates an address to the string symbol+offset for the format %pS ?
 

--
Valentin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux