← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Bug 1896420] Re: seccomp_bpf in seccomp from ubuntu_kernel_selftests failed to build on B-5.4

 

** Tags added: kernel-daily-bug

-- 
You received this bug notification because you are a member of Canonical
Platform QA Team, which is subscribed to ubuntu-kernel-tests.
https://bugs.launchpad.net/bugs/1896420

Title:
  seccomp_bpf in seccomp from ubuntu_kernel_selftests failed to build on
  B-5.4

Status in ubuntu-kernel-tests:
  Fix Released
Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Focal:
  Fix Released

Bug description:
  [Impact]

  Test fails to build in selftests/seccomp/seccomp_bpf.c with
  'error: storage size of ‘md’ isn’t known' due to the type
  struct seccomp_metadata not being defined for B/5.4 kernels.

  [Test case]

  Test successfully builds and test cases pass both on Bionic/5.4 and on
  Focal

  [Fixes]

  Unconditionally define struct seccomp_metadata.
  Remove linux/ptrace.h where a definition of seccomp_metadata is already being
  defined in Focal.

  [Potential regression]

  There could be future build failures if glibc headers get updated to
  include definitions of struct seccomp_metadata or if linux/ptrace.h gets updated
  to include needed definitions.

  ---------------------------------------------------
  Issue found on 5.4.0-48.52~18.04.1

  Test build failed with:
   gcc -Wl,-no-as-needed -Wall seccomp_bpf.c -lpthread -o seccomp_bpf
   seccomp_bpf.c: In function ‘get_metadata’:
   seccomp_bpf.c:3028:26: error: storage size of ‘md’ isn’t known
   struct seccomp_metadata md;
   ^~
   seccomp_bpf.c:3028:26: warning: unused variable ‘md’ [-Wunused-variable] 
   Makefile:12: recipe for target 'seccomp_bpf' failed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1896420/+subscriptions