From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795930713; b=MvUPOOCqVIZlQ0h063I3SMVuXoG+Q59xCu6W5gvHEB3Fbh3pFNlLAGSvGeTk4a/adSpn MCCbD3dCGxVeIcgMsEiflG6o+rw3dectzZGfK6MsSe4ogDDraUer0npALxnahhE5NokiO oNhakaBbqnqPoLkeHI4QITGXYU6146UTSYQnD9nW7QN/VTOBtkcqeX2pBgt27VTJPXyQv RKk/CMSN/2+w6MwKceLhyORit6Mzuh9wXL/GpwKEwvAnp3Qv+42KF+kRer0rkgpSviNPE HFQA4u8c9xk7jmnT5R46jOq+lbXG6ILF+Mn5CwDFBMP8k274/LCX8aEkC2HKRXr8mpg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795930713; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:In-Reply-To:References:From:Subject:To:Cc: MIME-Version:Content-Type:Content-Disposition:User-Agent; bh=zcwTnVts/X5PyCCR2Vmw6pDhMedjGP0JI/o/WZVuxp0=; b=zD/MZCx+Ej1XB9pMApfcYCMWTOFSBZWNZvDl08Q853YnXgM/7wwDixNaUA2Fd43pv+2n amEjpRHJpYlOp2qsLYBhj34camZtIl+x4jstU/mK5VR/wKg5GMkd7i+cUS8jTCQG3EnAz mKNy2kkJa0EEh/RThEAb7wUzB1/cq+zAY6USXlymOTy45i8zQv/adYTJQtdLY81QoquQm 4+CJj+XLO1V4V9CyvhVjrKMvTbZSTiv/dWn+NDDd2yLtdSssP4u5oJryRpm6HHFS4dprE duMv/w4JmdyBCEWSm8OcDt8JCNLLkos6aGnZCRiYpqiZyOzZ3ISL9dxYhQrpeyOy6nA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b="qb/xt62/"; arc=none smtp.remote-ip=74.125.224.54 Received: from mail-yx1-f54.google.com (mail-yx1-f54.google.com [74.125.224.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD2AC606A32F for ; Sun, 29 Nov 2026 05:38:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BD2AC606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=qb/xt62/ Received: by mail-yx1-f54.google.com with SMTP id 956f58d0204a3-675617e81f9so10703952d50.3 for ; Sat, 28 Nov 2026 21:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1795930712; x=1796535512; darn=vger.kernel.org; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:references:in-reply-to:message-id:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=zcwTnVts/X5PyCCR2Vmw6pDhMedjGP0JI/o/WZVuxp0=; b=qb/xt62/LGkYtIcQIIL5vnWj5r4sonDK4usDdjZ8Kdzl7lp9mYjomfMEXXUDW526m3 8x4RibidFMergjEUwhqeSkILVOX9R6avBb5FvFaWgJkKWkwnMvPGSytIaAKNFiS9ULtG YaK6tQVkIS/RVc+hTrI9cVHgiTPOHZWPBvuC0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795930712; x=1796535512; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:references:in-reply-to:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zcwTnVts/X5PyCCR2Vmw6pDhMedjGP0JI/o/WZVuxp0=; b=PNsyd1q6w6etJz3Tvn5f027uFOOBX7pchbQMOa6SmkVtNg7XU6YI2SgmSCL8nbcEbk dJ6cjboENKTOImQZnTGBoHsB6tAwXYXYldsXHvYr6DYJ5iRw4jx2Oorm+Zpfr41KdXPa K5HFxzp51tqbMqJHbwQzAVQk25L65s11I86RinXw3uPfjY7DIfeItwYxvxztDgkKM+u0 Y3yqjT25q4s6PXcaOUvHctobmzNUx18I7nOYstuS6f9pSNDyyIifwrgzIr/Q97hg8x/x +ZH+dWrkE0WdDn+Ykvw2rl98uXoYb25fc2TvjdpUZW2fXPJPcP1c/tx3eUUuFz72b28C 5t0g== X-Forwarded-Encrypted: i=1; AL+hErGkg1pOio2ydYr11ySjmRu/8XM9GmLlBT8yoc5MTEHxmqtv2xKquPMZtzVc3IHl0+FEs4iocyA8kjIV+Mw=@vger.kernel.org X-Gm-Message-State: APuU4Z9chjrLkQnHTY+lYlbj2o4pQFSQkr5DDgRECWytiTFqOvx70cQT +ip9ysAT0A92T6wsJtYFXz35ExsSmlp9T1oVALT6dYLnbzWC4Rc3d+mjlZnqZqRanEs= X-Gm-Gg: AZFdTZc7+WecARzwvdHMbSUuUNBJY4WG46wwT7Xw107hCXSpDJOTwX2qQsYhLWhA2yb x+jaDao8xR629N5PPZSSiqMttXSKbq67mmuenSNSj1dxIwoanHMyDSKHstqq3zzgmZHiEIKI4iC Bsk0QXzsYvzh6CzZX2CjroweooJzWRqauMqtSa4hd1Q3chzK2/a9tEMVBGB9NYhTeJuIRYn/q+L WoXQJZrhibz9rB3ALSs3PzGFKJ+uW+V1wLKIHTDI2ftpQ9kJ0E6kxsDIaF43zpLLJPPxiAILPO2 bOn2KCcFmflQw7Ys//MhyRQdhOM+dbcy367Jxap70hnUEsj5fv48KXq4tX4d6g1/jkzjKR2qdSt OeWiUGZLPamIPaRXnY6bcQEpPm3DS7Gd5NjJAoJQntDEWtXM+9NghUxg3BcqCL9HNlx+nYh/HOg yUr58H5yQrUEwvyiR4Dgc6X4XZA7+GncMkFzDQarJ5YVjhclOaE+4OP+7BcctE4X4JFvs0KT1th wTkgANXN8Ekh+cEzf8GAAErJRcyCVLKi+RqhRXp9tMRf/qeylcB+0QhcIeSLmqBsgw1FMKZDjWX aGM+UsBKIJA9WTBRkXB+DIQt7dYDgz9VwrSk1pDjnuhTEFWDAOEmrzH4oKpEYjs3Szong9dgdQ2 Kqyy+HermREp99SgPJ2LU8c/FY8fx9HC20QaGQ+goPJE2WmrpqLVFAcOwgctgiOjppoVnpTUL+Q M5RobzwFwfVFpTfR0FBhS1Wyg7hC72VRwFRoyhLEXhctn4WnJ/mvE/XKLqBR9f96+vniqiqnm2O Brq3WsyaA+iDb4UZhSjgLU= X-Received: by 2002:a05:690c:620b:b0:8b4:c2c4:c5f4 with SMTP id 00721157ae682-8b5205537camr111111547b3.67.1795930711815; Sat, 28 Nov 2026 21:38:31 -0800 (PST) Received: from [172.20.0.2] (c-73-207-185-9.hsd1.ga.comcast.net. [73.207.185.9]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b52030ff10sm111104947b3.33.2026.11.28.21.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 21:38:30 -0800 (PST) Date: Sat, 28 Nov 2026 21:38:27 -0800 Message-ID: <6058cc3be190392debbc8402ea8479528eb75599.1795930577.git.chris@chrisdown.name> In-Reply-To: References: From: Chris Down Subject: [PATCH v2 3/3] bpf: Describe cgroup_iter's fdinfo path for paths which don't fit To: Greg Kroah-Hartman , Tejun Heo Cc: Johannes Weiner , =?utf-8?q?Michal_Koutn=C3=BD?= , Serge Hallyn , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Yonghong Song , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , driver-core@lists.linux.dev, cgroups@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.4.3 (cc9e3943) (2026-10-09) bpf_iter_cgroup_show_fdinfo() says that if cgroup_path_ns() fails, buf is an empty string and nothing is printed. That isn't the case for a path which doesn't fit in PATH_MAX: cgroup_path_ns() now returns -E2BIG with the end of the path in buf, and fdinfo prints that. The end of the path is still useful to show, so let's update the comment to say so rather than change what is printed. Signed-off-by: Chris Down --- kernel/bpf/cgroup_iter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/cgroup_iter.c b/kernel/bpf/cgroup_iter.c index fd51fe3d92cc..12e702e421aa 100644 --- a/kernel/bpf/cgroup_iter.c +++ b/kernel/bpf/cgroup_iter.c @@ -251,7 +251,8 @@ static void bpf_iter_cgroup_show_fdinfo(const struct bpf_iter_aux_info *aux, } /* If cgroup_path_ns() fails, buf will be an empty string, cgroup_path - * will print nothing. + * will print nothing. The exception is a path which doesn't fit, where + * buf holds as much of the end of the path as fits. * * Path is in the calling process's cgroup namespace. */ -- 2.56.1