Skip to content

Commit 7c7806d

Browse files
rnavNobody
authored andcommitted
bpf/trampoline: Allow ftrace location to differ from trampoline attach address
On some architectures, ftrace location can include multiple instructions, and does not necessarily match the function entry address returned by kallsyms_lookup(). Drop the check in is_ftrace_location() to accommodate the same. Signed-off-by: Naveen N. Rao <[email protected]>
1 parent 41c7eca commit 7c7806d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/bpf/trampoline.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ static int is_ftrace_location(void *ip)
124124
addr = ftrace_location((long)ip);
125125
if (!addr)
126126
return 0;
127-
if (WARN_ON_ONCE(addr != (long)ip))
128-
return -EFAULT;
129127
return 1;
130128
}
131129

0 commit comments

Comments
 (0)