Commit bcba8d4
committed
ring-buffer: Use kaslr address instead of text delta
Instead of saving off the text and data pointers and using them to compare
with the current boot's text and data pointers, just save off the KASLR
offset. Then that can be used to figure out how to read the previous boots
buffer.
The last_boot_info will now show this offset, but only if it is for a
previous boot:
~# cat instances/boot_mapped/last_boot_info
39000000 [kernel]
~# echo function > instances/boot_mapped/current_tracer
~# cat instances/boot_mapped/last_boot_info
# Current
If the KASLR offset saved is for the current boot, the last_boot_info will
show the value of "current".
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: https://lore.kernel.org/[email protected]
Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent c73f0b6 commit bcba8d4
File tree
4 files changed
+39
-34
lines changed- include/linux
- kernel/trace
4 files changed
+39
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
554 | | - | |
| 553 | + | |
555 | 554 | | |
556 | 555 | | |
557 | 556 | | |
| |||
1891 | 1890 | | |
1892 | 1891 | | |
1893 | 1892 | | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
1897 | | - | |
1898 | | - | |
1899 | | - | |
1900 | 1893 | | |
1901 | 1894 | | |
1902 | | - | |
1903 | | - | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
1904 | 1900 | | |
1905 | 1901 | | |
1906 | 1902 | | |
| |||
1928 | 1924 | | |
1929 | 1925 | | |
1930 | 1926 | | |
1931 | | - | |
1932 | | - | |
| 1927 | + | |
1933 | 1928 | | |
1934 | 1929 | | |
1935 | 1930 | | |
| |||
2482 | 2477 | | |
2483 | 2478 | | |
2484 | 2479 | | |
2485 | | - | |
2486 | | - | |
| 2480 | + | |
2487 | 2481 | | |
2488 | 2482 | | |
2489 | 2483 | | |
2490 | 2484 | | |
2491 | | - | |
| 2485 | + | |
2492 | 2486 | | |
2493 | 2487 | | |
2494 | | - | |
2495 | | - | |
| 2488 | + | |
2496 | 2489 | | |
2497 | 2490 | | |
2498 | 2491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
4193 | 4193 | | |
4194 | 4194 | | |
4195 | 4195 | | |
4196 | | - | |
| 4196 | + | |
4197 | 4197 | | |
4198 | 4198 | | |
4199 | 4199 | | |
| |||
5990 | 5990 | | |
5991 | 5991 | | |
5992 | 5992 | | |
5993 | | - | |
| 5993 | + | |
5994 | 5994 | | |
5995 | 5995 | | |
5996 | 5996 | | |
| |||
6003 | 6003 | | |
6004 | 6004 | | |
6005 | 6005 | | |
6006 | | - | |
| 6006 | + | |
| 6007 | + | |
6007 | 6008 | | |
6008 | 6009 | | |
6009 | 6010 | | |
| |||
6821 | 6822 | | |
6822 | 6823 | | |
6823 | 6824 | | |
6824 | | - | |
6825 | | - | |
| 6825 | + | |
| 6826 | + | |
| 6827 | + | |
| 6828 | + | |
| 6829 | + | |
| 6830 | + | |
| 6831 | + | |
| 6832 | + | |
| 6833 | + | |
| 6834 | + | |
| 6835 | + | |
6826 | 6836 | | |
6827 | 6837 | | |
6828 | 6838 | | |
| |||
9210 | 9220 | | |
9211 | 9221 | | |
9212 | 9222 | | |
9213 | | - | |
9214 | | - | |
| 9223 | + | |
| 9224 | + | |
| 9225 | + | |
| 9226 | + | |
9215 | 9227 | | |
9216 | 9228 | | |
9217 | 9229 | | |
| |||
10459 | 10471 | | |
10460 | 10472 | | |
10461 | 10473 | | |
10462 | | - | |
| 10474 | + | |
10463 | 10475 | | |
10464 | 10476 | | |
10465 | 10477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| 351 | + | |
351 | 352 | | |
352 | | - | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
437 | | - | |
438 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
439 | 440 | | |
440 | 441 | | |
441 | 442 | | |
| |||
0 commit comments