|
51 | 51 | #include <linux/workqueue.h>
|
52 | 52 | #include <linux/sort.h>
|
53 | 53 |
|
54 |
| -#include <asm/setup.h> /* COMMAND_LINE_SIZE and kaslr_offset() */ |
| 54 | +#include <asm/setup.h> /* COMMAND_LINE_SIZE */ |
55 | 55 |
|
56 | 56 | #include "trace.h"
|
57 | 57 | #include "trace_output.h"
|
@@ -5995,7 +5995,7 @@ struct trace_mod_entry {
|
5995 | 5995 | };
|
5996 | 5996 |
|
5997 | 5997 | struct trace_scratch {
|
5998 |
| - unsigned long kaslr_addr; |
| 5998 | + unsigned long text_addr; |
5999 | 5999 | unsigned long nr_entries;
|
6000 | 6000 | struct trace_mod_entry entries[];
|
6001 | 6001 | };
|
@@ -6133,11 +6133,7 @@ static void update_last_data(struct trace_array *tr)
|
6133 | 6133 | kfree_rcu(module_delta, rcu);
|
6134 | 6134 |
|
6135 | 6135 | /* Set the persistent ring buffer meta data to this address */
|
6136 |
| -#ifdef CONFIG_RANDOMIZE_BASE |
6137 |
| - tscratch->kaslr_addr = kaslr_offset(); |
6138 |
| -#else |
6139 |
| - tscratch->kaslr_addr = 0; |
6140 |
| -#endif |
| 6136 | + tscratch->text_addr = (unsigned long)_text; |
6141 | 6137 | }
|
6142 | 6138 |
|
6143 | 6139 | /**
|
@@ -6996,7 +6992,7 @@ static void show_last_boot_header(struct seq_file *m, struct trace_array *tr)
|
6996 | 6992 | * should not be the same as the current boot.
|
6997 | 6993 | */
|
6998 | 6994 | if (tscratch && (tr->flags & TRACE_ARRAY_FL_LAST_BOOT))
|
6999 |
| - seq_printf(m, "%lx\t[kernel]\n", tscratch->kaslr_addr); |
| 6995 | + seq_printf(m, "%lx\t[kernel]\n", tscratch->text_addr); |
7000 | 6996 | else
|
7001 | 6997 | seq_puts(m, "# Current\n");
|
7002 | 6998 | }
|
@@ -9465,10 +9461,8 @@ static void setup_trace_scratch(struct trace_array *tr,
|
9465 | 9461 | tr->scratch = tscratch;
|
9466 | 9462 | tr->scratch_size = size;
|
9467 | 9463 |
|
9468 |
| -#ifdef CONFIG_RANDOMIZE_BASE |
9469 |
| - if (tscratch->kaslr_addr) |
9470 |
| - tr->text_delta = kaslr_offset() - tscratch->kaslr_addr; |
9471 |
| -#endif |
| 9464 | + if (tscratch->text_addr) |
| 9465 | + tr->text_delta = (unsigned long)_text - tscratch->text_addr; |
9472 | 9466 |
|
9473 | 9467 | if (struct_size(tscratch, entries, tscratch->nr_entries) > size)
|
9474 | 9468 | goto reset;
|
|
0 commit comments