ubuntu_bpf failed to build on F-azure-5.4 / B-azure-5.4 ( error: ‘bpf_object_open_opts’ undeclared)

Bug #1990794 reported by Po-Hsu Lin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
linux-azure (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Medium
Tim Gardner

Bug Description

Issue found on B-azure-5.4.0-1092.97~18.04.1

This is a regression as the test can be built and run in the last cycle.

Error log:
prog_tests/tcp_estats.c prog_tests/obj_name.c prog_tests/map_lock.c prog_tests/xdp_noinline.c prog_tests/global_data.c prog_tests/pkt_access.c -lcap -lelf -lrt -lpthread -o /home/azure/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/test_progs
  ../lib.mk:146: recipe for target '/home/azure/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/test_progs' failed
  make[1]: Leaving directory '/home/azure/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf'
  Makefile:143: recipe for target 'all' failed
  make: Leaving directory '/home/azure/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests'
  stderr:
  Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h'
  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]
     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]
     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]
      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]
      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]
     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]
    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]
    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]
    write(pipe_p2c[1], buf, 1);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
  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]
    fscanf(f, "%llu", &sample_freq);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  prog_tests/probe_user.c: In function ‘test_probe_user’:
  prog_tests/probe_user.c:9:2: warning: implicit declaration of function ‘DECLARE_LIBBPF_OPTS’ [-Wimplicit-function-declaration]
    DECLARE_LIBBPF_OPTS(bpf_object_open_opts, opts, );
    ^~~~~~~~~~~~~~~~~~~
  prog_tests/probe_user.c:9:22: error: ‘bpf_object_open_opts’ undeclared (first use in this function); did you mean ‘bpf_object_open_attr’?
    DECLARE_LIBBPF_OPTS(bpf_object_open_opts, opts, );
                        ^~~~~~~~~~~~~~~~~~~~
                        bpf_object_open_attr
  prog_tests/probe_user.c:9:22: note: each undeclared identifier is reported only once for each function it appears in
  prog_tests/probe_user.c:9:44: error: ‘opts’ undeclared (first use in this function); did you mean ‘open’?
    DECLARE_LIBBPF_OPTS(bpf_object_open_opts, opts, );
                                              ^~~~
                                              open
  prog_tests/probe_user.c:9:50: error: expected expression before ‘)’ token
    DECLARE_LIBBPF_OPTS(bpf_object_open_opts, opts, );
                                                    ^
  prog_tests/probe_user.c:18:8: warning: implicit declaration of function ‘bpf_object__open_file’; did you mean ‘bpf_object__open_buffer’? [-Wimplicit-function-declaration]
    obj = bpf_object__open_file(obj_file, &opts);
          ^~~~~~~~~~~~~~~~~~~~~
          bpf_object__open_buffer
  make[1]: *** [/home/azure/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/test_progs] Error 1
  make: *** [all] Error 2

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This issue is limited to B-azure-5.4, this new test case was came from bug 1990009

Po-Hsu Lin (cypressyew)
summary: - ubuntu_bpf failed to build on B-azure-5.4 ( error:
+ ubuntu_bpf failed to build on F-azure-5.4 / B-azure-5.4 ( error:
‘bpf_object_open_opts’ undeclared)
tags: added: focal
Tim Gardner (timg-tpi)
Changed in linux-azure (Ubuntu Focal):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Medium
status: New → In Progress
Changed in linux-azure (Ubuntu):
status: New → Fix Released
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Patches related to LP: #1990009 caused a test compile error. It can be fixed by reverting "bpf, testing: Add selftest to read/write sockaddr from user space".

The ubuntu_bpf test then completes with success, though with many compile warnings.

Tim Gardner (timg-tpi)
Changed in linux-azure (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

BTW I think bpf_object_open_opts was defined here:
https://github.com/torvalds/linux/commit/2ce8450ef5a381e5ffeb4682c0093a3ab5d07008

Which we might need if we still want to keep this test.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/5.4.0-1095.101 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-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

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!

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (31.8 KiB)

This bug was fixed in the package linux-azure - 5.4.0-1095.101

---------------
linux-azure (5.4.0-1095.101) focal; urgency=medium

  * focal/linux-azure: 5.4.0-1095.101 -proposed tracker (LP: #1992037)

  * ubuntu_bpf failed to build on F-azure-5.4 / B-azure-5.4 ( error:
    ‘bpf_object_open_opts’ undeclared) (LP: #1990794)
    - Revert "bpf, testing: Add selftest to read/write sockaddr from user space"

  [ Ubuntu: 5.4.0-132.148 ]

  * CVE-2022-42719
    - mac80211: mlme: find auth challenge directly
    - wifi: mac80211: don't parse mbssid in assoc response
    - wifi: mac80211: fix MBSSID parsing use-after-free
  * iavf: SR-IOV VFs error with no traffic flow when MTU greater than 1500
    (LP: #1983656)
    - iavf: Fix set max MTU size with port VLAN and jumbo frames
    - i40e: Fix VF set max MTU size
  * fib_nexthop_nongw.sh from ubuntu_kernel_selftests failed on B-5.4
    (LP: #1990800)
    - SAUCE: selftests/net: skipping tests for older ip command releases
  * CVE-2022-29901
    - Revert "x86/speculation: Add RSB VM Exit protections"
    - Revert "x86/cpu: Add a steppings field to struct x86_cpu_id"
    - x86/devicetable: Move x86 specific macro out of generic code
    - x86/cpu: Add consistent CPU match macros
    - x86/cpu: Add a steppings field to struct x86_cpu_id
    - x86/kvm/vmx: Make noinstr clean
    - x86/cpufeatures: Move RETPOLINE flags to word 11
    - x86/bugs: Report AMD retbleed vulnerability
    - x86/bugs: Add AMD retbleed= boot parameter
    - x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
    - x86/entry: Remove skip_r11rcx
    - x86/entry: Add kernel IBRS implementation
    - x86/bugs: Optimize SPEC_CTRL MSR writes
    - x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS
    - x86/bugs: Split spectre_v2_select_mitigation() and
      spectre_v2_user_select_mitigation()
    - x86/bugs: Report Intel retbleed vulnerability
    - intel_idle: Disable IBRS during long idle
    - x86/speculation: Change FILL_RETURN_BUFFER to work with objtool
    - x86/speculation: Fix RSB filling with CONFIG_RETPOLINE=n
    - x86/speculation: Fix firmware entry SPEC_CTRL handling
    - x86/speculation: Fix SPEC_CTRL write on SMT state change
    - x86/speculation: Use cached host SPEC_CTRL value for guest entry/exit
    - x86/speculation: Remove x86_spec_ctrl_mask
    - KVM/VMX: Use TEST %REG,%REG instead of CMP $0,%REG in vmenter.S
    - KVM/nVMX: Use __vmx_vcpu_run in nested_vmx_check_vmentry_hw
    - KVM: VMX: Flatten __vmx_vcpu_run()
    - KVM: VMX: Convert launched argument to flags
    - KVM: VMX: Prevent guest RSB poisoning attacks with eIBRS
    - KVM: VMX: Fix IBRS handling after vmexit
    - x86/speculation: Fill RSB on vmexit for IBRS
    - x86/common: Stamp out the stepping madness
    - x86/cpu/amd: Enumerate BTC_NO
    - x86/bugs: Add Cannon lake to RETBleed affected CPU list
    - x86/speculation: Disable RRSBA behavior
    - x86/speculation: Use DECLARE_PER_CPU for x86_spec_ctrl_current
    - x86/bugs: Warn when "ibrs" mitigation is selected on Enhanced IBRS parts
    - x86/speculation: Add RSB VM Exit protections
  * ACPI: processor idle: Practically limit "Dummy wait" workaround to old Intel
    systems ...

Changed in linux-azure (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/5.4.0-1100.106 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-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

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: kernel-spammed-focal-linux-azure verification-needed-focal
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Test passed on F-azure-cvm and F-azure-fips, hints removed, closing this bug.

Changed in ubuntu-kernel-tests:
status: New → Fix Released
tags: added: verification-done-focal
removed: verification-needed-focal
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.