ACK: [PATCH 0/1] [SRU][R] Fix ubuntu_bpf selftest setup
Ross Porter
ross.porter at canonical.com
Mon May 25 22:13:20 UTC 2026
Acked-by: Ross Porter <ross.porter at canonical.com>
On 26/05/2026 02:51, Paolo Pisati wrote:
> BugLink: https://bugs.launchpad.net/bugs/2150071
>
> [Impact]
>
> ubuntu_bpf selftest fails to setup:
>
> '/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:
> In file included from test_tag.c:18:
> /usr/include/linux/if_alg.h:45:22: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘__counted_by’
> 45 | __u8 iv[] __counted_by(ivlen);
> | ^~~~~~~~~~~~
> make[1]: *** [Makefile:244:
>
> [Fix]
>
> Apply the upstream fix present in v7.1-rc2:
>
> commit 0c7ae130698e70107430254e79fbe996b4d37ab5
> Author: Paul Chaignon <paul.chaignon at gmail.com>
> Date: Sat May 2 12:12:40 2026 +0200
>
> tools/headers: Regenerate stddef.h to fix BPF selftests
>
> With commit dacbfc167808 ("crypto: af_alg - Annotate struct af_alg_iv
> with __counted_by"), two selftests, test_tag and crypto_sanity, now
> indirectly rely on the __counted_by macro. On systems with commit
> dacbfc167808 in the installed UAPI headers, the selftests build fails
> with:
>
> In file included from
> tools/testing/selftests/bpf/prog_tests/crypto_sanity.c:7:
> /usr/include/linux/if_alg.h:45:22: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or
> ‘__attribute__’ before ‘__counted_by’
> 45 | __u8 iv[] __counted_by(ivlen);
> | ^~~~~~~~~~~~
>
> This patch fixes it by regenerating stddef.h in tools/include using the
> instructions from commit a778f5d46b62 ("tools/headers: Pull in stddef.h
> to uapi to fix BPF selftests build in CI").
>
> [How to reproduce]
>
> Run the ubuntu_bpf test again after applying the patch.
>
> [Regression potential]
>
> Low: clean upstream cherry-pick for a known problem.
>
> Paul Chaignon (1):
> tools/headers: Regenerate stddef.h to fix BPF selftests
>
> tools/include/uapi/linux/stddef.h | 26 +++++++++++++++++++++++++-
> 1 file changed, 25 insertions(+), 1 deletion(-)
>
More information about the kernel-team
mailing list