From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta0.migadu.com (out-189.mta0.migadu.com [91.218.175.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1937228C5D3 for ; Fri, 27 Jun 2025 22:06:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751061969; cv=none; b=ETquyBvX4VE5nQ0xn02SYc3j+kEN1dgbN2UlySJHOQMbMl7pRnY7KCa7UcYCKjMVOBPPv1DNJQshk9fgHfeZ/ccA6OJrAIzCEYjrMXz3Msolfe9fDkhuTTRJtl6mzsCMrNkuBLjLcltXIGAZMpdCw15DhEcs09WNQ7AnRnpDaP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751061969; c=relaxed/simple; bh=xQSQCRDFZJmIak4BkWH5cuMEiXyu43tg7bUI0csBYLA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=Fzh2zfCkKpTYHoMlG11HBrxARLtZHl5r/BnuUuN/xGwEnGA2LZ7HouK5AnWH53Ce/3vGjgpNBJghnZql/Anu+1WfWP5hoFPw3vvjomRcp0scXgZs039BKAaPzSwJnDeBWPcy1vCzhI2Cb0P5BCCPJbhHjspdss7bvIAb32EydqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=vpOzawR7; arc=none smtp.client-ip=91.218.175.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="vpOzawR7" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1751061962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jLv/fjuH/+8aM7PguWthg7lUMLLbNBHhzk1pss2QXFw=; b=vpOzawR7G54FSCIWr7YRPuPRSMOt72YLulyYLE2dphJOFqLg+TyH+icc2lLNlNpRTXagfd VIdyl18xysxf8YfNrFlsPUGHTADnevfnkX3dxM8cKZobZ2H8lYJRPhfRN8gL+Em7G+1jFG prz1xK8WsAECo7WLkoyLEGElpOUgTek= Date: Fri, 27 Jun 2025 15:05:51 -0700 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 bpf-next] selftests/bpf: Fix cgroup_xattr/read_cgroupfs_xattr X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Ihor Solodrai To: Alexei Starovoitov Cc: Song Liu , bpf , Kernel Team , Andrii Nakryiko , Eduard , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Jakub Kicinski , brauner@kernel.org References: <20250627191221.765921-1-song@kernel.org> <839d4696-fad6-499b-a156-994951ea75c7@linux.dev> <11bd7899-9ffe-48fc-8d0b-94ed3b9532ab@linux.dev> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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 >> wrote: >>> >>> On 6/27/25 2:34 PM, Alexei Starovoitov wrote: >>>> On Fri, Jun 27, 2025 at 2:19 PM Ihor Solodrai >>>> 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 >>>>>> Closes: https://lore.kernel.org/bpf/ >>>>>> CAADnVQ+iqMi2HEj_iH7hsx+XJAsqaMWqSDe4tzcGAnehFWA9Sw@mail.gmail.com/ >>>>>> Signed-off-by: Song Liu >>>>>> >>>>>> --- >>>>>> 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. >> >> 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