From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796318753; b=ZzMYkRv4eK1ENn9oGIHUe/pHbrZiWiMt5pQOTVKLXSmXdWVq5DuykOVFu7REZdKqAQNx WrDOr461VUtfSWbeBQivPMJFeuR9P8u/Fk22ErMt0xtDOzM2CKgMxq2usnQ+sjpX0O7Wq x8wIHE/AEjiNM6iNdPDme+yK6pfpuTmsbFd2tGeHi7GzBqYlO1LKYUT2KNKne4IWNAWL2 31KNAPwpzSLFm8sny7mADazZsVDBFTzpfAciXVPtGkrpMhRH4TwvgPD8L61ZRqXFVT8TG zVK1ZURECg+q9emCKci8wMK6wNbneSe+LYR8evW++kY5a7pdebY2hHUp2fLmqT9g44g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796318753; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=tc2ti99BbvPJyM04kcWpJCznMLCctMd5CcggqG2IkV8=; b=1pJZJGftu2tB9TVsCZZmxvCZxF3OyHbTYb4n01ejHzfZZvysTcBRNM684rpHQVkIk9Kn tqEHX+QWipKaHaBiwhRdWig4x8y3bQP1ujrbkIEBRkMUX7sSL6UfZF/TsWXI6May7c73M p3fAstoKWTIgIzr3kjnfVWyKKiitRKB8rLeu0++RyDraCclSWxSFx8oMhHC90Y0gWTP5c MkuZ5quUveL9JGVgQ7ePv75ExA63KDgWTYRb1d9wxKoWnOf/WqUfhm1mXJa43siDAdBIb KkaSr9zVU/nin//OUolTin9JOCR3Dc7c8kL9T61yZUm3aPeIC3Wxq/L1lssuzyP6/+A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WPTJCh+8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD65A606A339; Thu, 3 Dec 2026 17:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WPTJCh+8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 835601F0089B; Thu, 3 Dec 2026 17:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796318753; bh=tc2ti99BbvPJyM04kcWpJCznMLCctMd5CcggqG2IkV8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=WPTJCh+8FESVgOFtgU+Ff6ubFMvlK/P1U+bC4uNbePIcK4jXbDKjNTcx8hAHO7MCm AeruHsHHTc/9Y7NBqW4ZNF9ejCiiJRDn1y7YkA0AzzTO4181+4D1BT+WNKPy4AlP22 ojuwGp+6yZk3SWdKk0ESJKqVdp3oaa7OXRKupxrb/6EAAKH2a3nuFdrDY78YB8KjCy fMARDNyEGev5xSgXEddrDVkqFZaTc6AX9MWsf3l0vw+OBmbB8A1WMPFtwW2xg2gtAK a7/SLZv7VU+p11TVy4zynPsCfXhKhHRuWipnxkjIHEtd0X9BD9MHkkcA7mdVyB3f70 cmfTc4BdHNehA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH bpf] bpf: Destroy inode storage after an RCU grace period Reply-To: sashiko-reviews@lists.linux.dev To: "Chris Mason" , bpf@vger.kernel.org Cc: linux-security-module@vger.kernel.org In-Reply-To: <20261203163706.50213-1-mason@kernel.org> References: <20261203163706.50213-1-mason@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 17:25:53 +0000 X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] bpf: modified multi-line comments in bpf_inode_storage.c violate BPF style -- commit b8ac1197acd3f529720434f8eed1437d3463198b Author: Chris Mason bpf: Destroy inode storage after an RCU grace period This commit moves BPF inode storage destruction from the inode_free_security() LSM hook to inode_free_security_rcu() and changes the storage owner from the struct inode to the LSM blob. > diff --git a/kernel/bpf/bpf_inode_storage.c b/kernel/bpf/bpf_inode_storag= e.c > index f9e81060c1f45..fdae59b25cd34 100644 > --- a/kernel/bpf/bpf_inode_storage.c > +++ b/kernel/bpf/bpf_inode_storage.c [ ... ] > @@ -126,29 +123,35 @@ BPF_CALL_4(bpf_inode_storage_get, struct bpf_map *,= map, struct inode *, inode, > void *, value, u64, flags) > { [ ... ] > - /* explicitly check that the inode_storage_ptr is not > + if (!inode) > + return (unsigned long)NULL; > + > + /* explicitly check that the blob is not > * NULL as inode_storage_lookup returns NULL in this case and > * bpf_local_storage_update expects the owner to have a > * valid storage pointer. > */ [ ... ] > - /* This helper must only called from where the inode is guaranteed > - * to have a refcount and cannot be freed. > + /* This helper must only be called from places where the lifetime of the > + * inode is guaranteed. Either by being refcounted or by being protected > + * by an RCU read-side critical section. > */ [ ... ] > @@ -164,8 +167,9 @@ BPF_CALL_2(bpf_inode_storage_delete, > if (!inode) > return -EINVAL; > =20 > - /* This helper must only called from where the inode is guaranteed > - * to have a refcount and cannot be freed. > + /* This helper must only be called from places where the lifetime of the > + * inode is guaranteed. Either by being refcounted or by being protected > + * by an RCU read-side critical section. > */ > return inode_storage_delete(inode, map); > } [Severity: Low] This isn't a bug, but BPF code uses the modern kernel multi-line comment style where the opening /* sits on its own line and the comment text starts on the following line. Could these three modified multi-line comments in bpf_inode_storage_get() and bpf_inode_storage_delete() be updated to match? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203163706.5021= 3-1-mason@kernel.org?part=3D1