Files
linux-rockchip/lib
Christophe Leroy 83ed3e2c4a BACKPORT: vsprintf: Fix %pK with kptr_restrict == 0
Although kptr_restrict is set to 0 and the kernel is booted with
no_hash_pointers parameter, the content of /proc/vmallocinfo is
lacking the real addresses.

  / # cat /proc/vmallocinfo
  0x(ptrval)-0x(ptrval)    8192 load_module+0xc0c/0x2c0c pages=1 vmalloc
  0x(ptrval)-0x(ptrval)   12288 start_kernel+0x4e0/0x690 pages=2 vmalloc
  0x(ptrval)-0x(ptrval)   12288 start_kernel+0x4e0/0x690 pages=2 vmalloc
  0x(ptrval)-0x(ptrval)    8192 _mpic_map_mmio.constprop.0+0x20/0x44 phys=0x80041000 ioremap
  0x(ptrval)-0x(ptrval)   12288 _mpic_map_mmio.constprop.0+0x20/0x44 phys=0x80041000 ioremap
    ...

According to the documentation for /proc/sys/kernel/, %pK is
equivalent to %p when kptr_restrict is set to 0.

Bug: 254441685
Fixes: 5ead723a20 ("lib/vsprintf: no_hash_pointers prints all addresses as unhashed")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/107476128e59bff11a309b5bf7579a1753a41aca.1645087605.git.christophe.leroy@csgroup.eu
(cherry picked from commit 8484291132)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I5ac3ae8796559613cedf9a259d39b99765d7165a
2022-11-09 13:57:12 +00:00
..
2022-05-18 10:23:44 +02:00
2020-10-16 11:11:19 -07:00
2021-05-15 09:28:55 +02:00
2022-07-12 16:32:23 +02:00
2022-07-28 15:53:46 +02:00
2022-06-22 14:13:18 +02:00
2021-05-22 15:34:48 +02:00
2020-09-26 10:33:57 -07:00
2021-05-20 15:35:25 +02:00