Subject: linux-next: manual merge of the net-next tree with the bpf tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 4 Oct 2022 12:24:28 +1100

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  kernel/bpf/helpers.c

between commit:

  8addbfc7b308 ("bpf: Gate dynptr API behind CAP_BPF")

from the bpf tree and commits:

  8a67f2de9b1d ("bpf: expose bpf_strtol and bpf_strtoul to all program types")
  5679ff2f138f ("bpf: Move bpf_loop and bpf_for_each_map_elem under CAP_BPF")
  205715673844 ("bpf: Add bpf_user_ringbuf_drain() helper")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc kernel/bpf/helpers.c
index 3814b0fd3a2c,b069517a3da0..000000000000
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@@ -1627,12 -1609,26 +1609,12 @@@ bpf_base_func_proto(enum bpf_func_id fu
  		return &bpf_ringbuf_discard_proto;
  	case BPF_FUNC_ringbuf_query:
  		return &bpf_ringbuf_query_proto;
- 	case BPF_FUNC_for_each_map_elem:
- 		return &bpf_for_each_map_elem_proto;
- 	case BPF_FUNC_loop:
- 		return &bpf_loop_proto;
 -	case BPF_FUNC_ringbuf_reserve_dynptr:
 -		return &bpf_ringbuf_reserve_dynptr_proto;
 -	case BPF_FUNC_ringbuf_submit_dynptr:
 -		return &bpf_ringbuf_submit_dynptr_proto;
 -	case BPF_FUNC_ringbuf_discard_dynptr:
 -		return &bpf_ringbuf_discard_dynptr_proto;
  	case BPF_FUNC_strncmp:
  		return &bpf_strncmp_proto;
+ 	case BPF_FUNC_strtol:
+ 		return &bpf_strtol_proto;
+ 	case BPF_FUNC_strtoul:
+ 		return &bpf_strtoul_proto;
 -	case BPF_FUNC_dynptr_from_mem:
 -		return &bpf_dynptr_from_mem_proto;
 -	case BPF_FUNC_dynptr_read:
 -		return &bpf_dynptr_read_proto;
 -	case BPF_FUNC_dynptr_write:
 -		return &bpf_dynptr_write_proto;
 -	case BPF_FUNC_dynptr_data:
 -		return &bpf_dynptr_data_proto;
  	default:
  		break;
  	}
@@@ -1661,20 -1657,12 +1643,26 @@@
  		return &bpf_timer_cancel_proto;
  	case BPF_FUNC_kptr_xchg:
  		return &bpf_kptr_xchg_proto;
 +	case BPF_FUNC_ringbuf_reserve_dynptr:
 +		return &bpf_ringbuf_reserve_dynptr_proto;
 +	case BPF_FUNC_ringbuf_submit_dynptr:
 +		return &bpf_ringbuf_submit_dynptr_proto;
 +	case BPF_FUNC_ringbuf_discard_dynptr:
 +		return &bpf_ringbuf_discard_dynptr_proto;
 +	case BPF_FUNC_dynptr_from_mem:
 +		return &bpf_dynptr_from_mem_proto;
 +	case BPF_FUNC_dynptr_read:
 +		return &bpf_dynptr_read_proto;
 +	case BPF_FUNC_dynptr_write:
 +		return &bpf_dynptr_write_proto;
 +	case BPF_FUNC_dynptr_data:
 +		return &bpf_dynptr_data_proto;
+ 	case BPF_FUNC_for_each_map_elem:
+ 		return &bpf_for_each_map_elem_proto;
+ 	case BPF_FUNC_loop:
+ 		return &bpf_loop_proto;
+ 	case BPF_FUNC_user_ringbuf_drain:
+ 		return &bpf_user_ringbuf_drain_proto;
  	default:
  		break;
  	}