Re: [PATCH net-next] bpf: enhance verifier to understand stack pointer arithmetic

2017-04-30 Thread David Miller
From: Alexei Starovoitov Date: Sat, 29 Apr 2017 22:52:42 -0700 > From: Yonghong Song > > llvm 4.0 and above generates the code like below: > > 440: (b7) r1 = 15 > 441: (05) goto pc+73 > 515: (79) r6 = *(u64 *)(r10 -152) > 516: (bf) r7 = r10 > 517: (07) r7 += -112 > 518: (bf) r2 = r7 > 519:

[PATCH net-next] bpf: enhance verifier to understand stack pointer arithmetic

2017-04-29 Thread Alexei Starovoitov
From: Yonghong Song llvm 4.0 and above generates the code like below: 440: (b7) r1 = 15 441: (05) goto pc+73 515: (79) r6 = *(u64 *)(r10 -152) 516: (bf) r7 = r10 517: (07) r7 += -112 518: (bf) r2 = r7 519: (0f) r2 += r1 520: (71) r1 = *(u8 *)(r8 +0) 521: (73) *(u8 *)(r2 +45) = r1 and th