mbox series

[SRU,Bionic,0/1] Fix bpf selftest compilation (LP: #1840935)

Message ID 20190822153244.14818-1-kleber.souza@canonical.com
Headers show
Series Fix bpf selftest compilation (LP: #1840935) | expand

Message

Kleber Sacilotto de Souza Aug. 22, 2019, 3:32 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1840935

[Impact]
Commit a25d38b54163 (bpf: relax verifier restriction on BPF_MOV | BPF_ALU) in
Bionic tree

Is causing bpf test compilation failure:
$ sudo make -C tools/testing/selftests TARGETS=bpf run_tests
make: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests'
make[1]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf'
make -C ../../../lib/bpf OUTPUT=/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/
make[2]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
make[2]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
make -C ../../../lib/bpf OUTPUT=/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/
make[2]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
make[2]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
gcc -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../../include/generated -I../../../include test_verifier.c /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/libbpf.a /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/cgroup_helpers.c -lcap -lelf -lrt -o /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier
test_verifier.c:2173:4: error: ‘struct bpf_test’ has no member named ‘retval’
   .retval = 0,
    ^~~~~~
../lib.mk:121: recipe for target '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier' failed
make[1]: *** [/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier] Error 1
make[1]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf'
Makefile:73: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests'

[Fix]
Bionic misses 111e6b45315c (selftests/bpf: make test_verifier run most
programs), which adds the 'retval' member to struct bpf_test. The fix is a
SAUCE patch to remove setting '.retval = 0'.

[Test Case]
Run bpf kernel selftests.

[Regression Potential]
Low. There's a chance that not backporting 111e6b45315c (selftests/bpf: make
test_verifier run most programs) will cause possible bugs on the changes added
by a25d38b54163 (bpf: relax verifier restriction on BPF_MOV | BPF_ALU) to
remain uncaught.


Kleber Sacilotto de Souza (1):
  UBUNTU: SAUCE: Fix "bpf: relax verifier restriction on BPF_MOV |
    BPF_ALU"

 tools/testing/selftests/bpf/test_verifier.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Stefan Bader Aug. 22, 2019, 4:53 p.m. UTC | #1
On 22.08.19 17:32, Kleber Sacilotto de Souza wrote:
> BugLink: https://bugs.launchpad.net/bugs/1840935
> 
> [Impact]
> Commit a25d38b54163 (bpf: relax verifier restriction on BPF_MOV | BPF_ALU) in
> Bionic tree
> 
> Is causing bpf test compilation failure:
> $ sudo make -C tools/testing/selftests TARGETS=bpf run_tests
> make: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests'
> make[1]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf'
> make -C ../../../lib/bpf OUTPUT=/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/
> make[2]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
> Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
> make[2]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
> make -C ../../../lib/bpf OUTPUT=/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/
> make[2]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
> Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
> make[2]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
> gcc -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../../include/generated -I../../../include test_verifier.c /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/libbpf.a /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/cgroup_helpers.c -lcap -lelf -lrt -o /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier
> test_verifier.c:2173:4: error: ‘struct bpf_test’ has no member named ‘retval’
>    .retval = 0,
>     ^~~~~~
> ../lib.mk:121: recipe for target '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier' failed
> make[1]: *** [/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier] Error 1
> make[1]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf'
> Makefile:73: recipe for target 'all' failed
> make: *** [all] Error 2
> make: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests'
> 
> [Fix]
> Bionic misses 111e6b45315c (selftests/bpf: make test_verifier run most
> programs), which adds the 'retval' member to struct bpf_test. The fix is a
> SAUCE patch to remove setting '.retval = 0'.
> 
> [Test Case]
> Run bpf kernel selftests.
> 
> [Regression Potential]
> Low. There's a chance that not backporting 111e6b45315c (selftests/bpf: make
> test_verifier run most programs) will cause possible bugs on the changes added
> by a25d38b54163 (bpf: relax verifier restriction on BPF_MOV | BPF_ALU) to
> remain uncaught.
> 
> 
> Kleber Sacilotto de Souza (1):
>   UBUNTU: SAUCE: Fix "bpf: relax verifier restriction on BPF_MOV |
>     BPF_ALU"
> 
>  tools/testing/selftests/bpf/test_verifier.c | 1 -
>  1 file changed, 1 deletion(-)
> 
Applied to bionic/master-next. Thanks.

-Stefan