Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: bpf: refactor stack map trace depth calculation into helper function
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1015753

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 8822409
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1015753
version: 1

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

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: bpf: refactor stack map trace depth calculation into helper function
Using index info to reconstruct a base tree...
M	kernel/bpf/stackmap.c
Falling back to patching base and 3-way merge...
Auto-merging kernel/bpf/stackmap.c
CONFLICT (content): Merge conflict in kernel/bpf/stackmap.c
Patch failed at 0001 bpf: refactor stack map trace depth calculation into helper function'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:

diff --cc kernel/bpf/stackmap.c
index 4d53cdd1374c,9a86b5acac10..000000000000
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@@ -310,11 -332,8 +332,16 @@@ BPF_CALL_3(bpf_get_stackid, struct pt_r
  			       BPF_F_FAST_STACK_CMP | BPF_F_REUSE_STACKID)))
  		return -EINVAL;
  
++<<<<<<< HEAD
 +	max_depth += skip;
 +	if (max_depth > sysctl_perf_event_max_stack)
 +		max_depth = sysctl_perf_event_max_stack;
 +
 +	trace = get_perf_callchain(regs, kernel, user, max_depth,
++=======
+ 	max_depth = stack_map_calculate_max_depth(map->value_size, elem_size, flags);
+ 	trace = get_perf_callchain(regs, 0, kernel, user, max_depth,
++>>>>>>> bpf: refactor stack map trace depth calculation into helper function
  				   false, false);
  
  	if (unlikely(!trace))
@@@ -446,13 -462,15 +470,20 @@@ static long __bpf_get_stack(struct pt_r
  	if (may_fault)
  		rcu_read_lock(); /* need RCU for perf's callchain below */
  
- 	if (trace_in)
+ 	if (trace_in) {
  		trace = trace_in;
- 	else if (kernel && task)
+ 		trace->nr = min_t(u32, trace->nr, max_depth);
+ 	} else if (kernel && task) {
  		trace = get_callchain_entry_for_task(task, max_depth);
++<<<<<<< HEAD
 +	else
 +		trace = get_perf_callchain(regs, kernel, user, max_depth,
++=======
+ 	} else {
+ 		trace = get_perf_callchain(regs, 0, kernel, user, max_depth,
++>>>>>>> bpf: refactor stack map trace depth calculation into helper function
  					   crosstask, false);
+ 	}
  
  	if (unlikely(!trace) || trace->nr < skip) {
  		if (may_fault)

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.

1 participant