ubuntu_bpf test failed to build on Eoan

Bug #1871613 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned
Eoan
Fix Released
High
Unassigned

Bug Description

Issue found on 5.3.0-47.39 Eoan

Test failed to build with error message below:
make[1]: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf'
make: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests'
stderr:
Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
prog_tests/send_signal.c: In function 'test_send_signal_common':
prog_tests/send_signal.c:52:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
   52 | write(pipe_c2p[1], buf, 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:55:3: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
   55 | read(pipe_p2c[0], buf, 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:61:4: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
   61 | write(pipe_c2p[1], "2", 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:63:4: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
   63 | write(pipe_c2p[1], "0", 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:66:3: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
   66 | read(pipe_p2c[0], buf, 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:109:2: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
  109 | read(pipe_c2p[0], buf, 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:117:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  117 | write(pipe_p2c[1], buf, 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:131:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  131 | write(pipe_p2c[1], buf, 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/sockmap_basic.c: In function 'connected_socket_v4':
prog_tests/sockmap_basic.c:22:6: warning: implicit declaration of function 'CHECK_FAIL' [-Wimplicit-function-declaration]
   22 | if (CHECK_FAIL(s == -1))
      | ^~~~~~~~~~
prog_tests/sockmap_basic.c:26:22: error: 'SOL_TCP' undeclared (first use in this function); did you mean 'SOL_TIPC'?
   26 | err = setsockopt(s, SOL_TCP, TCP_REPAIR, &repair, sizeof(repair));
      | ^~~~~~~
      | SOL_TIPC
prog_tests/sockmap_basic.c:26:22: note: each undeclared identifier is reported only once for each function it appears in
prog_tests/sockmap_basic.c: In function 'test_sockmap_basic':
prog_tests/sockmap_basic.c:75:6: warning: implicit declaration of function 'test__start_subtest' [-Wimplicit-function-declaration]
   75 | if (test__start_subtest("sockmap create_update_free"))
      | ^~~~~~~~~~~~~~~~~~~
prog_tests/stacktrace_build_id_nmi.c: In function 'read_perf_max_sample_freq':
prog_tests/stacktrace_build_id_nmi.c:12:2: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
   12 | fscanf(f, "%llu", &sample_freq);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [../lib.mk:141: /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/test_progs] Error 1
make: *** [Makefile:136: all] Error 2

This is blocking the net test in kernel selftest as well, as it will try to build bpf test first.

CVE References

Po-Hsu Lin (cypressyew)
description: updated
tags: added: 5.3 eoan ubuntu-bpf
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1871613

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This file:
prog_tests/sockmap_basic.c

seems to be a new file added to the tree recently with this commit [1]:
7c57edd selftests/bpf: Test freeing sockmap/sockhash with a socket in it

$ git tag --contains 7c57edd8018e70b4faebf0569a1fa3f35a21829c
Ubuntu-5.3.0-47.39

[1] https://github.com/torvalds/linux/commit/5d3919a953c3c96c02fc7a337f8376cde43ae31f#diff-a31a85d33b7885d4715bb97dffe88ab9

tags: added: kqa-blocker
tags: added: sru-20200406
Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

It looks like it might need this patch:
https://github.com/torvalds/linux/commit/9a365e67d8bbcfff47063a4eeaa98fd3668e223a

in test_progs.h
- #include <linux/tcp.h>
+ #include <netinet/tcp.h>

And the newly added "CHECK_FAIL" was defined here:
https://github.com/torvalds/linux/commit/d38835b75f67df16cef65c14aa64796a1832e6b4

Changed in linux (Ubuntu Eoan):
status: New → Confirmed
Changed in linux (Ubuntu):
status: Incomplete → Invalid
Stefan Bader (smb)
Changed in linux (Ubuntu Eoan):
importance: Undecided → High
Changed in linux (Ubuntu Eoan):
status: Confirmed → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-eoan
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

The test can be built now, verified with Eoan 5.3.0-48.41
Thanks!

Changed in ubuntu-kernel-tests:
status: New → Fix Released
tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.3.0-51.44

---------------
linux (5.3.0-51.44) eoan; urgency=medium

  * CVE-2020-11884
    - SAUCE: s390/mm: fix page table upgrade vs 2ndary address mode accesses

 -- Thadeu Lima de Souza Cascardo <email address hidden> Wed, 22 Apr 2020 17:35:41 -0300

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.