From: Eduard Zingerman <eddyz87@gmail.com>
To: Song Liu <song@kernel.org>, bpf@vger.kernel.org
Cc: kernel-team@meta.com, andrii@kernel.org, ast@kernel.org,
daniel@iogearbox.net, martin.lau@linux.dev
Subject: Re: [PATCH v2 bpf-next] selftests/bpf: Fix cgroup_xattr/read_cgroupfs_xattr
Date: Fri, 27 Jun 2025 13:50:04 -0700 [thread overview]
Message-ID: <bf34ec5793a4bf243d283be52f8f5cc1dd0dd23a.camel@gmail.com> (raw)
In-Reply-To: <20250627191221.765921-1-song@kernel.org>
On Fri, 2025-06-27 at 12:12 -0700, 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@kernel.org>
> Closes: https://lore.kernel.org/bpf/CAADnVQ+iqMi2HEj_iH7hsx+XJAsqaMWqSDe4tzcGAnehFWA9Sw@mail.gmail.com/
> Signed-off-by: Song Liu <song@kernel.org>
>
> ---
> Changes v1 => v2:
> 1. Add the second fix above.
>
> v1: https://lore.kernel.org/bpf/20250627165831.2979022-1-song@kernel.org/
> ---
This fixes ./test_progs -j -t cgroup for me.
Changes seem to reflect logic of the original test.
Tested-by: Eduard Zingerman <eddyz87@gmail.com>
[...]
next prev parent reply other threads:[~2025-06-27 20:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 19:12 [PATCH v2 bpf-next] selftests/bpf: Fix cgroup_xattr/read_cgroupfs_xattr Song Liu
2025-06-27 20:50 ` Eduard Zingerman [this message]
2025-06-27 21:19 ` Ihor Solodrai
2025-06-27 21:34 ` Alexei Starovoitov
2025-06-27 21:36 ` Ihor Solodrai
2025-06-27 21:38 ` Alexei Starovoitov
2025-06-27 21:56 ` Ihor Solodrai
2025-06-27 22:05 ` Ihor Solodrai
2025-06-27 23:19 ` Alexei Starovoitov
2025-06-30 21:49 ` Ihor Solodrai
2025-06-30 22:11 ` Alexei Starovoitov
2025-06-30 22:22 ` Ihor Solodrai
2025-06-27 21:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf34ec5793a4bf243d283be52f8f5cc1dd0dd23a.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@linux.dev \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox