On 6/27/25 2:56 PM, Ihor Solodrai wrote:
On 6/27/25 2:38 PM, Alexei Starovoitov wrote:
On Fri, Jun 27, 2025 at 2:36 PM Ihor Solodrai
<ihor.solodrai@xxxxxxxxx> wrote:
On 6/27/25 2:34 PM, Alexei Starovoitov wrote:
On Fri, Jun 27, 2025 at 2:19 PM Ihor Solodrai
<ihor.solodrai@xxxxxxxxx> wrote:
On 6/27/25 12:12 PM, Song Liu wrote:
cgroup_xattr/read_cgroupfs_xattr has two issues:
1. cgroup_xattr/read_cgroupfs_xattr messes up lo without creating
a netns
first. This causes issue with other tests.
Fix this by using a different hook (lsm.s/file_open) and not
messing
with lo.
2. cgroup_xattr/read_cgroupfs_xattr sets up cgroups without proper
mount namespaces.
Fix this by using the existing cgroup helpers. A new helper
set_cgroup_xattr() is added to set xattr on cgroup files.
Fixes: f4fba2d6d282 ("selftests/bpf: Add tests for
bpf_cgroup_read_xattr")
Reported-by: Alexei Starovoitov <ast@xxxxxxxxxx>
Closes: https://lore.kernel.org/bpf/
CAADnVQ+iqMi2HEj_iH7hsx+XJAsqaMWqSDe4tzcGAnehFWA9Sw@xxxxxxxxxxxxxx/
Signed-off-by: Song Liu <song@xxxxxxxxxx>
---
Changes v1 => v2:
1. Add the second fix above.
v1: https://lore.kernel.org/bpf/20250627165831.2979022-1-
song@xxxxxxxxxx/
---
tools/testing/selftests/bpf/cgroup_helpers.c | 21 ++++
tools/testing/selftests/bpf/cgroup_helpers.h | 4 +
.../selftests/bpf/prog_tests/cgroup_xattr.c | 117 +++
+--------------
.../selftests/bpf/progs/read_cgroupfs_xattr.c | 4 +-
4 files changed, 49 insertions(+), 97 deletions(-)
Hi Song.
I tried this patch on BPF CI, and it appears it fixes the hanging
failure we've been seeing today on bpf-next and netdev.
I am going to add it to ci/diffs.
Applied to bpf-next already.
CI patches apply to all base branches. My understanding is, it's needed
at least for netdev too.
How is that possible?
The offending commit is only in /master and in /for-next branches,
while /for-next is there for linux-next only.
I am not sure.
I compared CI logs between bpf-next and netdev runs that both were
cancelled due to 100min job timeout, and they are very similar.
netdev: https://github.com/kernel-patches/bpf/actions/runs/15932863319/
job/44946276955
bpf-next: https://github.com/kernel-patches/bpf/actions/
runs/15934258609/job/44950981852
So the root cause is likely the same.
And most recent netdev (with this patch applied) is green:
https://github.com/kernel-patches/bpf/actions/runs/15936292169
CC Jakub
Apparently offending patches were merged by Christian Brauner:
https://github.com/linux-netdev/testing-bpf-ci/commit/13b0cce9e294f8ddf228b9db3e01d76ac29872f2