mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
kprobes: treewide: Replace arch_deref_entry_point() with dereference_symbol_descriptor()
~15 years ago kprobes grew the 'arch_deref_entry_point()' __weak function:
3d7e33825d
: ("jprobes: make jprobes a little safer for users")
But this is just open-coded dereference_symbol_descriptor() in essence, and
its obscure nature was causing bugs.
Just use the real thing and remove arch_deref_entry_point().
Link: https://lkml.kernel.org/r/163163043630.489837.7924988885652708696.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
a7fe237845
commit
f2ec8d9a3b
5 changed files with 3 additions and 24 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/sections.h>
|
||||
|
||||
/* Whitelist of symbols that can be overridden for error injection. */
|
||||
static LIST_HEAD(error_injection_list);
|
||||
|
@ -64,7 +65,7 @@ static void populate_error_injection_list(struct error_injection_entry *start,
|
|||
|
||||
mutex_lock(&ei_mutex);
|
||||
for (iter = start; iter < end; iter++) {
|
||||
entry = arch_deref_entry_point((void *)iter->addr);
|
||||
entry = (unsigned long)dereference_symbol_descriptor((void *)iter->addr);
|
||||
|
||||
if (!kernel_text_address(entry) ||
|
||||
!kallsyms_lookup_size_offset(entry, &size, &offset)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue