BPF List
 help / color / mirror / Atom feed
From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Song Liu <song@kernel.org>, bpf <bpf@vger.kernel.org>,
	Kernel Team <kernel-team@meta.com>,
	Andrii Nakryiko <andrii@kernel.org>, Eduard <eddyz87@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <martin.lau@linux.dev>
Subject: Re: [PATCH v2 bpf-next] selftests/bpf: Fix cgroup_xattr/read_cgroupfs_xattr
Date: Fri, 27 Jun 2025 14:36:51 -0700	[thread overview]
Message-ID: <11bd7899-9ffe-48fc-8d0b-94ed3b9532ab@linux.dev> (raw)
In-Reply-To: <CAADnVQL5vQ9e5TMYfUafkzEUU+akgVME=OFtbATeTkL-G8aKLQ@mail.gmail.com>

On 6/27/25 2:34 PM, Alexei Starovoitov wrote:
> On Fri, Jun 27, 2025 at 2:19 PM Ihor Solodrai <ihor.solodrai@linux.dev> 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@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/
>>> ---
>>>    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.

  reply	other threads:[~2025-06-27 21:36 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
2025-06-27 21:19 ` Ihor Solodrai
2025-06-27 21:34   ` Alexei Starovoitov
2025-06-27 21:36     ` Ihor Solodrai [this message]
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=11bd7899-9ffe-48fc-8d0b-94ed3b9532ab@linux.dev \
    --to=ihor.solodrai@linux.dev \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --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