Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: Use ftrace_get_symaddr() for kprobe_multi probes #8304

Closed
wants to merge 1 commit into from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: bpf: Use ftrace_get_symaddr() for kprobe_multi probes
version: 23
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=921585

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: ccb98cc
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=921585
version: 23

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/netdevbpf/list/?series=921585
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: bpf: Use ftrace_get_symaddr() for kprobe_multi probes
Using index info to reconstruct a base tree...
M	kernel/trace/bpf_trace.c
Falling back to patching base and 3-way merge...
Auto-merging kernel/trace/bpf_trace.c
CONFLICT (content): Merge conflict in kernel/trace/bpf_trace.c
Patch failed at 0001 bpf: Use ftrace_get_symaddr() for kprobe_multi probes
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch'

conflict:

diff --cc kernel/trace/bpf_trace.c
index 1b8db5aee9d3,9bfd52913a5b..000000000000
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@@ -2584,6 -2584,20 +2584,23 @@@ struct user_syms 
  	char *buf;
  };
  
++<<<<<<< HEAD
++=======
+ #ifndef CONFIG_HAVE_FTRACE_REGS_HAVING_PT_REGS
+ static DEFINE_PER_CPU(struct pt_regs, bpf_kprobe_multi_pt_regs);
+ #define bpf_kprobe_multi_pt_regs_ptr()	this_cpu_ptr(&bpf_kprobe_multi_pt_regs)
+ #else
+ #define bpf_kprobe_multi_pt_regs_ptr()	(NULL)
+ #endif
+ 
+ static unsigned long ftrace_get_entry_ip(unsigned long fentry_ip)
+ {
+ 	unsigned long ip = ftrace_get_symaddr(fentry_ip);
+ 
+ 	return ip ? : fentry_ip;
+ }
+ 
++>>>>>>> bpf: Use ftrace_get_symaddr() for kprobe_multi probes
  static int copy_user_syms(struct user_syms *us, unsigned long __user *usyms, u32 cnt)
  {
  	unsigned long __user usymbol;
@@@ -2820,7 -2836,8 +2837,12 @@@ kprobe_multi_link_handler(struct fprob
  	int err;
  
  	link = container_of(fp, struct bpf_kprobe_multi_link, fp);
++<<<<<<< HEAD
 +	err = kprobe_multi_link_prog_run(link, get_entry_ip(fentry_ip), regs, false, data);
++=======
+ 	err = kprobe_multi_link_prog_run(link, ftrace_get_entry_ip(fentry_ip),
+ 					 fregs, false, data);
++>>>>>>> bpf: Use ftrace_get_symaddr() for kprobe_multi probes
  	return is_kprobe_session(link->link.prog) ? err : 0;
  }
  
@@@ -2832,7 -2849,8 +2854,12 @@@ kprobe_multi_link_exit_handler(struct f
  	struct bpf_kprobe_multi_link *link;
  
  	link = container_of(fp, struct bpf_kprobe_multi_link, fp);
++<<<<<<< HEAD
 +	kprobe_multi_link_prog_run(link, get_entry_ip(fentry_ip), regs, true, data);
++=======
+ 	kprobe_multi_link_prog_run(link, ftrace_get_entry_ip(fentry_ip),
+ 				   fregs, true, data);
++>>>>>>> bpf: Use ftrace_get_symaddr() for kprobe_multi probes
  }
  
  static int symbols_cmp_r(const void *a, const void *b, const void *priv)

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=921585 irrelevant now. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants