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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Kleber Souza
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(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 1/1] UBUNTU: SAUCE: Fix "bpf: relax verifier restriction on BPF_MOV | BPF_ALU"

Kleber Souza
BugLink: https://bugs.launchpad.net/bugs/1840935

Commit a25d38b54163 (bpf: relax verifier restriction on BPF_MOV |
BPF_ALU), upstream commit e434b8cdf788568ba65a0a0fd9f3cb41f3ca1803,
breaks the compilation of bpf selftests because Bionic misses
111e6b45315c (selftests/bpf: make test_verifier run most programs),
which adds the 'retval' member to struct bpf_test.

Fix it by removing the setting of '.retval = 0', which isn't needed for
the current code in Bionic.

Signed-off-by: Kleber Sacilotto de Souza <[hidden email]>
---
 tools/testing/selftests/bpf/test_verifier.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 5a25a4d7d81f..95e9e751862a 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -2170,7 +2170,6 @@ static struct bpf_test tests[] = {
  BPF_EXIT_INSN(),
  },
  .result = ACCEPT,
- .retval = 0,
  },
  {
  "unpriv: partial copy of pointer",
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 1/1] UBUNTU: SAUCE: Fix "bpf: relax verifier restriction on BPF_MOV | BPF_ALU"

Connor Kuehl
On 8/22/19 8:32 AM, Kleber Sacilotto de Souza wrote:

> BugLink: https://bugs.launchpad.net/bugs/1840935
>
> Commit a25d38b54163 (bpf: relax verifier restriction on BPF_MOV |
> BPF_ALU), upstream commit e434b8cdf788568ba65a0a0fd9f3cb41f3ca1803,
> breaks the compilation of bpf selftests because Bionic misses
> 111e6b45315c (selftests/bpf: make test_verifier run most programs),
> which adds the 'retval' member to struct bpf_test.
>
> Fix it by removing the setting of '.retval = 0', which isn't needed for
> the current code in Bionic.
>
> Signed-off-by: Kleber Sacilotto de Souza <[hidden email]>

Acked-by: Connor Kuehl <[hidden email]>

> ---
>  tools/testing/selftests/bpf/test_verifier.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
> index 5a25a4d7d81f..95e9e751862a 100644
> --- a/tools/testing/selftests/bpf/test_verifier.c
> +++ b/tools/testing/selftests/bpf/test_verifier.c
> @@ -2170,7 +2170,6 @@ static struct bpf_test tests[] = {
>   BPF_EXIT_INSN(),
>   },
>   .result = ACCEPT,
> - .retval = 0,
>   },
>   {
>   "unpriv: partial copy of pointer",
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 1/1] UBUNTU: SAUCE: Fix "bpf: relax verifier restriction on BPF_MOV | BPF_ALU"

Kamal Mostafa-2
In reply to this post by Kleber Souza


Acked-by: Kamal Mostafa <[hidden email]>

 -Kamal

On Thu, Aug 22, 2019 at 05:32:44PM +0200, Kleber Sacilotto de Souza wrote:

> BugLink: https://bugs.launchpad.net/bugs/1840935
>
> Commit a25d38b54163 (bpf: relax verifier restriction on BPF_MOV |
> BPF_ALU), upstream commit e434b8cdf788568ba65a0a0fd9f3cb41f3ca1803,
> breaks the compilation of bpf selftests because Bionic misses
> 111e6b45315c (selftests/bpf: make test_verifier run most programs),
> which adds the 'retval' member to struct bpf_test.
>
> Fix it by removing the setting of '.retval = 0', which isn't needed for
> the current code in Bionic.
>
> Signed-off-by: Kleber Sacilotto de Souza <[hidden email]>
> ---
>  tools/testing/selftests/bpf/test_verifier.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
> index 5a25a4d7d81f..95e9e751862a 100644
> --- a/tools/testing/selftests/bpf/test_verifier.c
> +++ b/tools/testing/selftests/bpf/test_verifier.c
> @@ -2170,7 +2170,6 @@ static struct bpf_test tests[] = {
>   BPF_EXIT_INSN(),
>   },
>   .result = ACCEPT,
> - .retval = 0,
>   },
>   {
>   "unpriv: partial copy of pointer",
> --
> 2.17.1
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

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

Stefan Bader-2
In reply to this post by Kleber Souza
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


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment