Commit 8484291
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.
Fixes: 5ead723 ("lib/vsprintf: no_hash_pointers prints all addresses as unhashed")
Signed-off-by: Christophe Leroy <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/107476128e59bff11a309b5bf7579a1753a41aca.1645087605.git.christophe.leroy@csgroup.eu1 parent a5a763b commit 8484291
File tree
2 files changed
+22
-17
lines changed- Documentation/admin-guide
- lib
2 files changed
+22
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3491 | 3491 | | |
3492 | 3492 | | |
3493 | 3493 | | |
3494 | | - | |
3495 | | - | |
| 3494 | + | |
3496 | 3495 | | |
3497 | 3496 | | |
3498 | 3497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
848 | 852 | | |
849 | 853 | | |
850 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
851 | 868 | | |
852 | 869 | | |
853 | 870 | | |
| |||
857 | 874 | | |
858 | 875 | | |
859 | 876 | | |
860 | | - | |
| 877 | + | |
861 | 878 | | |
862 | 879 | | |
863 | 880 | | |
| |||
2233 | 2250 | | |
2234 | 2251 | | |
2235 | 2252 | | |
2236 | | - | |
2237 | | - | |
2238 | | - | |
2239 | | - | |
2240 | 2253 | | |
2241 | 2254 | | |
2242 | 2255 | | |
| |||
2465 | 2478 | | |
2466 | 2479 | | |
2467 | 2480 | | |
2468 | | - | |
| 2481 | + | |
2469 | 2482 | | |
2470 | 2483 | | |
2471 | 2484 | | |
| |||
2475 | 2488 | | |
2476 | 2489 | | |
2477 | 2490 | | |
| 2491 | + | |
| 2492 | + | |
2478 | 2493 | | |
2479 | | - | |
2480 | | - | |
2481 | | - | |
2482 | | - | |
2483 | | - | |
2484 | | - | |
2485 | | - | |
2486 | | - | |
2487 | | - | |
2488 | 2494 | | |
2489 | 2495 | | |
2490 | 2496 | | |
| |||
0 commit comments