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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

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

  kernel/bpf/verifier.c

between commit:

  983695fa6765 ("bpf: fix unconnected udp hooks")

from the net tree and commit:

  5cf1e9145630 ("bpf: cgroup inet skb programs can return 0 to 3")

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/verifier.c
index a5c369e60343,5c2cb5bd84ce..000000000000
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@@ -5353,12 -5513,13 +5505,16 @@@ static int check_return_code(struct bpf
  	struct tnum range = tnum_range(0, 1);
  
  	switch (env->prog->type) {
 +	case BPF_PROG_TYPE_CGROUP_SOCK_ADDR:
 +		if (env->prog->expected_attach_type == BPF_CGROUP_UDP4_RECVMSG ||
 +		    env->prog->expected_attach_type == BPF_CGROUP_UDP6_RECVMSG)
 +			range = tnum_range(1, 1);
  	case BPF_PROG_TYPE_CGROUP_SKB:
+ 		if (env->prog->expected_attach_type == BPF_CGROUP_INET_EGRESS) {
+ 			range = tnum_range(0, 3);
+ 			enforce_attach_type_range = tnum_range(2, 3);
+ 		}
  	case BPF_PROG_TYPE_CGROUP_SOCK:
 -	case BPF_PROG_TYPE_CGROUP_SOCK_ADDR:
  	case BPF_PROG_TYPE_SOCK_OPS:
  	case BPF_PROG_TYPE_CGROUP_DEVICE:
  	case BPF_PROG_TYPE_CGROUP_SYSCTL:
@@@ -5385,9 -5546,13 +5541,13 @@@
  			verbose(env, "has unknown scalar value");
  		}
  		tnum_strn(tn_buf, sizeof(tn_buf), range);
 -		verbose(env, " should have been %s\n", tn_buf);
 +		verbose(env, " should have been in %s\n", tn_buf);
  		return -EINVAL;
  	}
+ 
+ 	if (!tnum_is_unknown(enforce_attach_type_range) &&
+ 	    tnum_in(enforce_attach_type_range, reg->var_off))
+ 		env->prog->enforce_expected_attach_type = 1;
  	return 0;
  }
  

Attachment: pgpSUaAiQq5Ec.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux