mbox series

[SRU,F,v2,0/1] Fix storage size of 'md' isn't known issue in selftests/seccomp for B/5.4

Message ID cover.1638487717.git.luke.nowakowskikrijger@canonical.com
Headers show
Series Fix storage size of 'md' isn't known issue in selftests/seccomp for B/5.4 | expand

Message

Luke Nowakowski-Krijger Dec. 2, 2021, 11:43 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1896420

[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.

Luke Nowakowski-Krijger (1):
  UBUNTU: SAUCE: selftests/seccomp: fix "storage size of 'md' isn't
    known" build issue

 tools/testing/selftests/seccomp/seccomp_bpf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Kleber Sacilotto de Souza Dec. 15, 2021, 1:34 p.m. UTC | #1
On 03.12.21 00:43, Luke Nowakowski-Krijger wrote:
> BugLink: https://bugs.launchpad.net/bugs/1896420
>
> [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.
>
> Luke Nowakowski-Krijger (1):
>    UBUNTU: SAUCE: selftests/seccomp: fix "storage size of 'md' isn't
>      known" build issue
>
>   tools/testing/selftests/seccomp/seccomp_bpf.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>

Applied to focal:linux.

Thanks,
Kleber