Activity log for bug #1980648

Date Who What changed Old value New value Message
2022-07-04 08:58:42 Po-Hsu Lin bug added bug
2022-07-04 08:58:56 Po-Hsu Lin tags 4.15 bionic oracle sru-20220620
2022-07-04 08:59:00 Po-Hsu Lin tags 4.15 bionic oracle sru-20220620 4.15 bionic oracle sru-20220620 ubuntu-bpf
2022-07-04 08:59:26 Po-Hsu Lin attachment added bpf-verifier.log https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1980648/+attachment/5601170/+files/bpf-verifier.log
2022-07-05 02:31:53 Po-Hsu Lin description Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals) #0/u add+sub+mul FAIL Failed to load prog 'Operation not permitted'! -- #1/u DIV32 by 0, zero check 1 FAIL Failed to load prog 'Operation not permitted'! -- #2/u DIV32 by 0, zero check 2 FAIL Failed to load prog 'Operation not permitted'! -- #3/u DIV64 by 0, zero check FAIL Failed to load prog 'Operation not permitted'! -- #4/u MOD32 by 0, zero check 1 FAIL Failed to load prog 'Operation not permitted'! -- #5/u MOD32 by 0, zero check 2 FAIL Failed to load prog 'Operation not permitted'! -- #6/u MOD64 by 0, zero check FAIL Failed to load prog 'Operation not permitted'! -- #36/u test6 ld_imm64 FAIL Failed to load prog 'Operation not permitted'! -- #37/u test7 ld_imm64 FAIL Failed to load prog 'Operation not permitted'! -- #46/u arsh64 on imm FAIL Failed to load prog 'Operation not permitted'! -- #47/u arsh64 on reg FAIL Failed to load prog 'Operation not permitted'! -- #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! -- #63/u non-invalid fp arithmetic FAIL Failed to load prog 'Operation not permitted'! -- #67/u check valid spill/fill, skb mark FAIL Failed to load prog 'Operation not permitted'! -- #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! -- #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! -- #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! -- #86/u jump test 3 Failed to create hash map 'Operation not permitted'! -- #89/u access skb fields ok FAIL Failed to load prog 'Operation not permitted'! -- #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! -- #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! -- #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! -- #118/u check cb access: byte FAIL Failed to load prog 'Operation not permitted'! -- #121/u check skb->hash byte load permitted FAIL Failed to load prog 'Operation not permitted'! -- #126/u check cb access: half FAIL Failed to load prog 'Operation not permitted'! -- #130/u check skb->hash half load permitted FAIL Failed to load prog 'Operation not permitted'! -- #133/u check cb access: word FAIL Failed to load prog 'Operation not permitted'! -- #138/u check cb access: double FAIL Failed to load prog 'Operation not permitted'! -- #149/u PTR_TO_STACK store/load FAIL Failed to load prog 'Operation not permitted'! -- #155/u unpriv: add const to pointer FAIL Failed to load prog 'Operation not permitted'! -- #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! -- #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! -- #167/u unpriv: spill/fill of ctx FAIL Failed to load prog 'Operation not permitted'! -- #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! -- #174/u alu32: mov u32 const FAIL Failed to load prog 'Operation not permitted'! -- #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! -- #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! -- #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! -- #186/u PTR_TO_STACK check high 1 FAIL Failed to load prog 'Operation not permitted'! -- #187/u PTR_TO_STACK check high 2 FAIL Failed to load prog 'Operation not permitted'! -- #193/u PTR_TO_STACK check low 1 FAIL Failed to load prog 'Operation not permitted'! -- #200/u PTR_TO_STACK mixed reg/k, 1 FAIL Failed to load prog 'Operation not permitted'! -- #201/u PTR_TO_STACK mixed reg/k, 2 FAIL Failed to load prog 'Operation not permitted'! -- #202/u PTR_TO_STACK mixed reg/k, 3 FAIL Failed to load prog 'Operation not permitted'! -- #203/u PTR_TO_STACK reg FAIL Failed to load prog 'Operation not permitted'! -- #204/u stack pointer arithmetic FAIL Failed to load prog 'Operation not permitted'! -- #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! -- #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! -- #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! -- #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! -- #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! -- #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! -- #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! -- #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! -- #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! -- #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! -- #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! -- #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! -- #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! -- #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! -- #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! -- #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! -- #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! -- #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! -- #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! -- #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! -- #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! -- #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! -- #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! -- #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! -- #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! -- #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! -- #382/u invalid range check Failed to create hash map 'Operation not permitted'! -- #383/u map in map access Failed to create array 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! -- #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! -- #391/u ld_abs: check calling conv, r7 FAIL Failed to load prog 'Operation not permitted'! -- #398/u ld_ind: check calling conv, r7 FAIL Failed to load prog 'Operation not permitted'! -- #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! -- #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! -- #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! -- #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! -- #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! -- #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! -- #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! -- #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! -- #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! -- #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! -- #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! -- #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! -- #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! -- #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! -- #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! -- #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! -- #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! -- #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! -- #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! -- #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'! FAIL Failed to load prog 'Operation not permitted'! #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! -- #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! -- #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! -- #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! -- #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! -- #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! -- #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! -- #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! -- #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! -- #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! -- #539/u masking, test out of bounds 1 FAIL Failed to load prog 'Operation not permitted'! -- #540/u masking, test out of bounds 2 FAIL Failed to load prog 'Operation not permitted'! -- #541/u masking, test out of bounds 3 FAIL Failed to load prog 'Operation not permitted'! -- #542/u masking, test out of bounds 4 FAIL Failed to load prog 'Operation not permitted'! -- #543/u masking, test out of bounds 5 FAIL Failed to load prog 'Operation not permitted'! -- #544/u masking, test out of bounds 6 FAIL Failed to load prog 'Operation not permitted'! -- #545/u masking, test out of bounds 7 FAIL Failed to load prog 'Operation not permitted'! -- #546/u masking, test out of bounds 8 FAIL Failed to load prog 'Operation not permitted'! -- #547/u masking, test out of bounds 9 FAIL Failed to load prog 'Operation not permitted'! -- #548/u masking, test out of bounds 10 FAIL Failed to load prog 'Operation not permitted'! -- #549/u masking, test out of bounds 11 FAIL Failed to load prog 'Operation not permitted'! -- #550/u masking, test out of bounds 12 FAIL Failed to load prog 'Operation not permitted'! -- #551/u masking, test in bounds 1 FAIL Failed to load prog 'Operation not permitted'! -- #552/u masking, test in bounds 2 FAIL Failed to load prog 'Operation not permitted'! -- #553/u masking, test in bounds 3 FAIL Failed to load prog 'Operation not permitted'! -- #554/u masking, test in bounds 4 FAIL Failed to load prog 'Operation not permitted'! -- #555/u masking, test in bounds 5 FAIL Failed to load prog 'Operation not permitted'! -- #556/u masking, test in bounds 6 FAIL Failed to load prog 'Operation not permitted'! -- #557/u masking, test in bounds 7 FAIL Failed to load prog 'Operation not permitted'! -- #558/u masking, test in bounds 8 FAIL Failed to load prog 'Operation not permitted'! To be more precise, this issue happens in sru-20220221, between Oracle kernel 4.15.0-1088.96 and 4.15.0-1090.99 Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! .... Summary: 551 PASSED, 286 FAILED Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic
2022-07-05 07:22:17 Po-Hsu Lin bug task added linux (Ubuntu)
2022-07-05 07:24:35 Po-Hsu Lin description Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! .... Summary: 551 PASSED, 286 FAILED Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! ....  Summary: 551 PASSED, 286 FAILED It looks like these tests are "unprivileged tests". Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic
2022-07-05 07:24:39 Po-Hsu Lin nominated for series Ubuntu Bionic
2022-07-05 07:24:39 Po-Hsu Lin bug task added linux (Ubuntu Bionic)
2022-07-05 07:24:46 Po-Hsu Lin linux (Ubuntu): status New Fix Released
2022-07-05 07:25:00 Po-Hsu Lin summary Some tests in test_verifier from ubuntu_bpf failed with "Failed to load prog 'Operation not permitted'" on B-4.15 unprivileged tests in test_verifier from ubuntu_bpf failed with "Failed to load prog 'Operation not permitted'" on B-4.15
2022-07-05 07:28:12 Po-Hsu Lin linux (Ubuntu Bionic): status New In Progress
2022-07-05 07:28:14 Po-Hsu Lin linux (Ubuntu Bionic): assignee Po-Hsu Lin (cypressyew)
2022-07-05 07:28:16 Po-Hsu Lin ubuntu-kernel-tests: assignee Po-Hsu Lin (cypressyew)
2022-07-05 07:28:17 Po-Hsu Lin ubuntu-kernel-tests: status New In Progress
2022-07-05 08:23:57 Po-Hsu Lin description Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! ....  Summary: 551 PASSED, 286 FAILED It looks like these tests are "unprivileged tests". Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic [Impact] We have kernel.unprivileged_bpf_disabled enabled for Bionic kernel: $ sysctl kernel.unprivileged_bpf_disabled kernel.unprivileged_bpf_disabled = 2 This causes all unprivileged tests in test_verifier of bpf selftests to fail like: #0/u add+sub+mul FAIL Failed to load prog 'Operation not permitted'! Because it permanently disables unprivileged BPF access for the currently running kernel. [Fix] * d0a0e4956f ("selftests/bpf: Count tests skipped by unpriv") * 0a67487403 ("selftests/bpf: Only run tests if !bpf_disabled") These two patches can be cherrypicked into our Bionic kernel. Note that there is a follow-up fix for 0a67487403, which is commit deea81228b ("selftests/bpf: check return value of fopen in test_verifier.c"), but this is intended for older kernels (<4.4) thus I will leave it alone. [Test] Patch tested with Bionic 4.15.0-188, and these unprivileged won't fail with "Failed to load prog 'Operation not permitted'!" anymore, they will be marked as skipped test. Overall test result improves from: Summary: 551 PASSED, 286 FAILED To: Summary: 551 PASSED, 278 SKIPPED, 8 FAILED [Where problems could occur] Change limited to the bpf selftest code, no actual changes to kernel function. If this fix is wrong, we might get incorrect test results. [Original Bug Report] Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! ....  Summary: 551 PASSED, 286 FAILED It looks like these tests are "unprivileged tests". Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic
2022-07-05 08:24:40 Po-Hsu Lin description [Impact] We have kernel.unprivileged_bpf_disabled enabled for Bionic kernel: $ sysctl kernel.unprivileged_bpf_disabled kernel.unprivileged_bpf_disabled = 2 This causes all unprivileged tests in test_verifier of bpf selftests to fail like: #0/u add+sub+mul FAIL Failed to load prog 'Operation not permitted'! Because it permanently disables unprivileged BPF access for the currently running kernel. [Fix] * d0a0e4956f ("selftests/bpf: Count tests skipped by unpriv") * 0a67487403 ("selftests/bpf: Only run tests if !bpf_disabled") These two patches can be cherrypicked into our Bionic kernel. Note that there is a follow-up fix for 0a67487403, which is commit deea81228b ("selftests/bpf: check return value of fopen in test_verifier.c"), but this is intended for older kernels (<4.4) thus I will leave it alone. [Test] Patch tested with Bionic 4.15.0-188, and these unprivileged won't fail with "Failed to load prog 'Operation not permitted'!" anymore, they will be marked as skipped test. Overall test result improves from: Summary: 551 PASSED, 286 FAILED To: Summary: 551 PASSED, 278 SKIPPED, 8 FAILED [Where problems could occur] Change limited to the bpf selftest code, no actual changes to kernel function. If this fix is wrong, we might get incorrect test results. [Original Bug Report] Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! ....  Summary: 551 PASSED, 286 FAILED It looks like these tests are "unprivileged tests". Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic [Impact] We have kernel.unprivileged_bpf_disabled enabled for Bionic kernel: $ sysctl kernel.unprivileged_bpf_disabled kernel.unprivileged_bpf_disabled = 2 This causes all unprivileged tests in test_verifier of bpf selftests to fail like:   #0/u add+sub+mul FAIL   Failed to load prog 'Operation not permitted'! Because it permanently disables unprivileged BPF access for the currently running kernel. [Fix] * d0a0e4956f ("selftests/bpf: Count tests skipped by unpriv") * 0a67487403 ("selftests/bpf: Only run tests if !bpf_disabled") These two patches can be cherry-picked into our Bionic kernel. Note that there is a follow-up fix for 0a67487403, which is commit deea81228b ("selftests/bpf: check return value of fopen in test_verifier.c"), but this is intended for older kernels (< 4.4) thus I will leave it alone. [Test] Patch tested with Bionic 4.15.0-188, and these unprivileged won't fail with "Failed to load prog 'Operation not permitted'!" anymore, they will be marked as skipped test. Overall test result improves from:   Summary: 551 PASSED, 286 FAILED To:   Summary: 551 PASSED, 278 SKIPPED, 8 FAILED [Where problems could occur] Change limited to the bpf selftest code, no actual changes to kernel function. If this fix is wrong, we might get incorrect test results. [Original Bug Report] Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! ....  Summary: 551 PASSED, 286 FAILED It looks like these tests are "unprivileged tests". Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic
2022-07-05 08:26:30 Po-Hsu Lin description [Impact] We have kernel.unprivileged_bpf_disabled enabled for Bionic kernel: $ sysctl kernel.unprivileged_bpf_disabled kernel.unprivileged_bpf_disabled = 2 This causes all unprivileged tests in test_verifier of bpf selftests to fail like:   #0/u add+sub+mul FAIL   Failed to load prog 'Operation not permitted'! Because it permanently disables unprivileged BPF access for the currently running kernel. [Fix] * d0a0e4956f ("selftests/bpf: Count tests skipped by unpriv") * 0a67487403 ("selftests/bpf: Only run tests if !bpf_disabled") These two patches can be cherry-picked into our Bionic kernel. Note that there is a follow-up fix for 0a67487403, which is commit deea81228b ("selftests/bpf: check return value of fopen in test_verifier.c"), but this is intended for older kernels (< 4.4) thus I will leave it alone. [Test] Patch tested with Bionic 4.15.0-188, and these unprivileged won't fail with "Failed to load prog 'Operation not permitted'!" anymore, they will be marked as skipped test. Overall test result improves from:   Summary: 551 PASSED, 286 FAILED To:   Summary: 551 PASSED, 278 SKIPPED, 8 FAILED [Where problems could occur] Change limited to the bpf selftest code, no actual changes to kernel function. If this fix is wrong, we might get incorrect test results. [Original Bug Report] Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! ....  Summary: 551 PASSED, 286 FAILED It looks like these tests are "unprivileged tests". Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic [Impact] We have kernel.unprivileged_bpf_disabled enabled for Bionic kernel: $ sysctl kernel.unprivileged_bpf_disabled kernel.unprivileged_bpf_disabled = 2 This causes all unprivileged tests in test_verifier of bpf selftests to fail like:   #0/u add+sub+mul FAIL   Failed to load prog 'Operation not permitted'! Because it permanently disables unprivileged BPF access for the currently running kernel. [Fix] * d0a0e4956f ("selftests/bpf: Count tests skipped by unpriv") * 0a67487403 ("selftests/bpf: Only run tests if !bpf_disabled") These two patches can be cherry-picked into our Bionic kernel. Note that there is a follow-up fix for 0a67487403, which is commit deea81228b ("selftests/bpf: check return value of fopen in test_verifier.c"), but this is intended for older kernels (< 4.4) thus I will leave it alone. [Test] Patch tested with Bionic 4.15.0-188, and these unprivileged won't fail with "Failed to load prog 'Operation not permitted'!" anymore, they will be marked as skipped tests. Overall test result improves from:   Summary: 551 PASSED, 286 FAILED To:   Summary: 551 PASSED, 278 SKIPPED, 8 FAILED [Where problems could occur] Change limited to the bpf selftest code, no actual changes to kernel function. If this fix is wrong, we might get incorrect test results. [Original Bug Report] Issue found on Bionic 4.15 cloud variants (as we don't run this test on bare-metals)  #0/u add+sub+mul FAIL  Failed to load prog 'Operation not permitted'! --  #1/u DIV32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #2/u DIV32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #3/u DIV64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #4/u MOD32 by 0, zero check 1 FAIL  Failed to load prog 'Operation not permitted'! --  #5/u MOD32 by 0, zero check 2 FAIL  Failed to load prog 'Operation not permitted'! --  #6/u MOD64 by 0, zero check FAIL  Failed to load prog 'Operation not permitted'! --  #36/u test6 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #37/u test7 ld_imm64 FAIL  Failed to load prog 'Operation not permitted'! --  #46/u arsh64 on imm FAIL  Failed to load prog 'Operation not permitted'! --  #47/u arsh64 on reg FAIL  Failed to load prog 'Operation not permitted'! --  #60/u uninitialized stack1 Failed to create hash map 'Operation not permitted'! --  #63/u non-invalid fp arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #67/u check valid spill/fill, skb mark FAIL  Failed to load prog 'Operation not permitted'! --  #81/u don't check return value before access Failed to create hash map 'Operation not permitted'! --  #82/u access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #83/u sometimes access memory with incorrect alignment Failed to create hash map 'Operation not permitted'! --  #86/u jump test 3 Failed to create hash map 'Operation not permitted'! --  #89/u access skb fields ok FAIL  Failed to load prog 'Operation not permitted'! --  #91/u access skb fields bad2 Failed to create hash map 'Operation not permitted'! --  #92/u access skb fields bad3 Failed to create hash map 'Operation not permitted'! --  #93/u access skb fields bad4 Failed to create hash map 'Operation not permitted'! --  #118/u check cb access: byte FAIL  Failed to load prog 'Operation not permitted'! --  #121/u check skb->hash byte load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #126/u check cb access: half FAIL  Failed to load prog 'Operation not permitted'! --  #130/u check skb->hash half load permitted FAIL  Failed to load prog 'Operation not permitted'! --  #133/u check cb access: word FAIL  Failed to load prog 'Operation not permitted'! --  #138/u check cb access: double FAIL  Failed to load prog 'Operation not permitted'! --  #149/u PTR_TO_STACK store/load FAIL  Failed to load prog 'Operation not permitted'! --  #155/u unpriv: add const to pointer FAIL  Failed to load prog 'Operation not permitted'! --  #161/u unpriv: pass pointer to helper function Failed to create hash map 'Operation not permitted'! --  #162/u unpriv: indirectly pass pointer on stack to helper function Failed to create hash map 'Operation not permitted'! --  #167/u unpriv: spill/fill of ctx FAIL  Failed to load prog 'Operation not permitted'! --  #173/u unpriv: write pointer into map elem value Failed to create hash map 'Operation not permitted'! --  #174/u alu32: mov u32 const FAIL  Failed to load prog 'Operation not permitted'! --  #176/u unpriv: pass pointer to tail_call Failed to create prog array 'Operation not permitted'! --  #177/u unpriv: cmp map pointer with zero Failed to create hash map 'Operation not permitted'! --  #184/u runtime/jit: pass negative index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #185/u runtime/jit: pass > 32bit index to tail_call Failed to create prog array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'! --  #186/u PTR_TO_STACK check high 1 FAIL  Failed to load prog 'Operation not permitted'! --  #187/u PTR_TO_STACK check high 2 FAIL  Failed to load prog 'Operation not permitted'! --  #193/u PTR_TO_STACK check low 1 FAIL  Failed to load prog 'Operation not permitted'! --  #200/u PTR_TO_STACK mixed reg/k, 1 FAIL  Failed to load prog 'Operation not permitted'! --  #201/u PTR_TO_STACK mixed reg/k, 2 FAIL  Failed to load prog 'Operation not permitted'! --  #202/u PTR_TO_STACK mixed reg/k, 3 FAIL  Failed to load prog 'Operation not permitted'! --  #203/u PTR_TO_STACK reg FAIL  Failed to load prog 'Operation not permitted'! --  #204/u stack pointer arithmetic FAIL  Failed to load prog 'Operation not permitted'! --  #273/u valid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #274/u valid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #275/u valid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #276/u valid map access into an array with a signed variable Failed to create hash map 'Operation not permitted'! --  #277/u invalid map access into an array with a constant Failed to create hash map 'Operation not permitted'! --  #278/u invalid map access into an array with a register Failed to create hash map 'Operation not permitted'! --  #279/u invalid map access into an array with a variable Failed to create hash map 'Operation not permitted'! --  #280/u invalid map access into an array with no floor check Failed to create hash map 'Operation not permitted'! --  #281/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #282/u invalid map access into an array with a invalid max check Failed to create hash map 'Operation not permitted'! --  #289/u invalid map access from else condition Failed to create hash map 'Operation not permitted'! --  #305/u leak pointer into ctx 1 Failed to create hash map 'Operation not permitted'! --  #307/u leak pointer into ctx 3 Failed to create hash map 'Operation not permitted'! --  #308/u leak pointer into map val Failed to create hash map 'Operation not permitted'! --  #341/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #342/u map element value or null is marked on register spilling Failed to create hash map 'Operation not permitted'! --  #343/u map element value store of cleared call register Failed to create hash map 'Operation not permitted'! --  #344/u map element value with unaligned store Failed to create hash map 'Operation not permitted'! --  #345/u map element value with unaligned load Failed to create hash map 'Operation not permitted'! --  #346/u map element value illegal alu op, 1 Failed to create hash map 'Operation not permitted'! --  #347/u map element value illegal alu op, 2 Failed to create hash map 'Operation not permitted'! --  #348/u map element value illegal alu op, 3 Failed to create hash map 'Operation not permitted'! --  #349/u map element value illegal alu op, 4 Failed to create hash map 'Operation not permitted'! --  #350/u map element value illegal alu op, 5 Failed to create hash map 'Operation not permitted'! --  #351/u map element value is preserved across register spilling Failed to create hash map 'Operation not permitted'! --  #381/u invalid and of negative number Failed to create hash map 'Operation not permitted'! --  #382/u invalid range check Failed to create hash map 'Operation not permitted'! --  #383/u map in map access Failed to create array 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #384/u invalid inner map pointer Failed to create array 'Operation not permitted'! --  #385/u forgot null checking on the inner map pointer Failed to create array 'Operation not permitted'! --  #391/u ld_abs: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #398/u ld_ind: check calling conv, r7 FAIL  Failed to load prog 'Operation not permitted'! --  #405/u bounds checks mixing signed and unsigned, positive bounds Failed to create hash map 'Operation not permitted'! --  #406/u bounds checks mixing signed and unsigned Failed to create hash map 'Operation not permitted'! --  #407/u bounds checks mixing signed and unsigned, variant 2 Failed to create hash map 'Operation not permitted'! --  #408/u bounds checks mixing signed and unsigned, variant 3 Failed to create hash map 'Operation not permitted'! --  #409/u bounds checks mixing signed and unsigned, variant 4 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #410/u bounds checks mixing signed and unsigned, variant 5 Failed to create hash map 'Operation not permitted'! --  #412/u bounds checks mixing signed and unsigned, variant 7 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #413/u bounds checks mixing signed and unsigned, variant 8 Failed to create hash map 'Operation not permitted'! --  #414/u bounds checks mixing signed and unsigned, variant 9 Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #415/u bounds checks mixing signed and unsigned, variant 10 Failed to create hash map 'Operation not permitted'! --  #416/u bounds checks mixing signed and unsigned, variant 11 Failed to create hash map 'Operation not permitted'! --  #417/u bounds checks mixing signed and unsigned, variant 12 Failed to create hash map 'Operation not permitted'! --  #418/u bounds checks mixing signed and unsigned, variant 13 Failed to create hash map 'Operation not permitted'! --  #419/u bounds checks mixing signed and unsigned, variant 14 Failed to create hash map 'Operation not permitted'! --  #420/u bounds checks mixing signed and unsigned, variant 15 Failed to create hash map 'Operation not permitted'! --  #421/u subtraction bounds (map value) variant 1 Failed to create hash map 'Operation not permitted'! --  #422/u subtraction bounds (map value) variant 2 Failed to create hash map 'Operation not permitted'! --  #423/u check subtraction on pointers for unpriv Failed to create hash map 'Operation not permitted'! --  #424/u bounds check based on zero-extended MOV Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #425/u bounds check based on sign-extended MOV. test1 Failed to create hash map 'Operation not permitted'! --  #426/u bounds check based on sign-extended MOV. test2 Failed to create hash map 'Operation not permitted'! --  #429/u bounds check after truncation of non-boundary-crossing range Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #430/u bounds check after truncation of boundary-crossing range (1) Failed to create hash map 'Operation not permitted'! --  #431/u bounds check after truncation of boundary-crossing range (2) Failed to create hash map 'Operation not permitted'! --  #432/u bounds check after wrapping 32-bit addition Failed to create hash map 'Operation not permitted'!  FAIL  Failed to load prog 'Operation not permitted'!  #433/u bounds check after shift with oversized count operand Failed to create hash map 'Operation not permitted'! --  #434/u bounds check after right shift of maybe-negative number Failed to create hash map 'Operation not permitted'! --  #435/u bounds check after 32-bit right shift with 64-bit input Failed to create hash map 'Operation not permitted'! --  #436/u bounds check map access with off+size signed 32bit overflow. test1 Failed to create hash map 'Operation not permitted'! --  #437/u bounds check map access with off+size signed 32bit overflow. test2 Failed to create hash map 'Operation not permitted'! --  #438/u bounds check map access with off+size signed 32bit overflow. test3 Failed to create hash map 'Operation not permitted'! --  #439/u bounds check map access with off+size signed 32bit overflow. test4 Failed to create hash map 'Operation not permitted'! --  #440/u pointer/scalar confusion in state equality check (way 1) Failed to create hash map 'Operation not permitted'! --  #441/u pointer/scalar confusion in state equality check (way 2) Failed to create hash map 'Operation not permitted'! --  #449/u varlen_map_value_access pruning Failed to create hash map 'Operation not permitted'! --  #539/u masking, test out of bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #540/u masking, test out of bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #541/u masking, test out of bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #542/u masking, test out of bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #543/u masking, test out of bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #544/u masking, test out of bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #545/u masking, test out of bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #546/u masking, test out of bounds 8 FAIL  Failed to load prog 'Operation not permitted'! --  #547/u masking, test out of bounds 9 FAIL  Failed to load prog 'Operation not permitted'! --  #548/u masking, test out of bounds 10 FAIL  Failed to load prog 'Operation not permitted'! --  #549/u masking, test out of bounds 11 FAIL  Failed to load prog 'Operation not permitted'! --  #550/u masking, test out of bounds 12 FAIL  Failed to load prog 'Operation not permitted'! --  #551/u masking, test in bounds 1 FAIL  Failed to load prog 'Operation not permitted'! --  #552/u masking, test in bounds 2 FAIL  Failed to load prog 'Operation not permitted'! --  #553/u masking, test in bounds 3 FAIL  Failed to load prog 'Operation not permitted'! --  #554/u masking, test in bounds 4 FAIL  Failed to load prog 'Operation not permitted'! --  #555/u masking, test in bounds 5 FAIL  Failed to load prog 'Operation not permitted'! --  #556/u masking, test in bounds 6 FAIL  Failed to load prog 'Operation not permitted'! --  #557/u masking, test in bounds 7 FAIL  Failed to load prog 'Operation not permitted'! --  #558/u masking, test in bounds 8 FAIL  Failed to load prog 'Operation not permitted'! ....  Summary: 551 PASSED, 286 FAILED It looks like these tests are "unprivileged tests". Bisect shows this happens between 4.15.0-169-generic and 4.15.0-171-generic
2022-07-07 21:43:31 Luke Nowakowski-Krijger linux (Ubuntu Bionic): status In Progress Fix Committed
2022-07-13 04:32:41 Ubuntu Kernel Bot tags 4.15 bionic oracle sru-20220620 ubuntu-bpf 4.15 bionic oracle sru-20220620 ubuntu-bpf verification-needed-bionic
2022-07-19 09:19:14 Po-Hsu Lin tags 4.15 bionic oracle sru-20220620 ubuntu-bpf verification-needed-bionic 4.15 bionic oracle sru-20220620 ubuntu-bpf verification-done-bionic
2022-07-19 09:19:28 Po-Hsu Lin ubuntu-kernel-tests: status In Progress Fix Released
2022-08-09 20:56:24 Launchpad Janitor linux (Ubuntu Bionic): status Fix Committed Fix Released
2022-08-09 20:56:24 Launchpad Janitor cve linked 2022-1652
2022-08-09 20:56:24 Launchpad Janitor cve linked 2022-1679
2022-08-09 20:56:24 Launchpad Janitor cve linked 2022-1734
2022-08-09 20:56:24 Launchpad Janitor cve linked 2022-2586
2022-08-09 20:56:24 Launchpad Janitor cve linked 2022-2588
2022-08-09 20:56:24 Launchpad Janitor cve linked 2022-34918