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=1796100326; b=fMJjNTFxvlzcPdgd0v9Bzyvh6qQded65n8cLQjbBJzWpmsKCw0jSRCQAb2EUfvaiC2hd WxdfHci9eFsF+86OQGC69VhAU3LFiq4vYg7jwELclCmF/9xOHI8LCMNMbqt2F55jnELRO golz2yNc7ox2ii77tqR8czTfiIE+0Qgkpf03bALX2g8rASAtnSLFDDuDB/LfcWy2ICIHc 6IUuKmEtTtn3XgqYQC+GYw5Lm5KqgvAXun48zjJQAP+OZs+mxXVTCRS/XCRx0Kl30PPWm 7zu2wiwndnOKTc0dEoQGhhVccjkrWj+O4S6FxRVQZ7sGCcJ/082d5eIiat/90nEE+rw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796100326; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=uxIkHOrluOzm3OSl+sHiwg4VZyc2RdNY2FKMq2zWCII=; b=y83tIotr6IjLKMnzGvbYxnwVH4tXQlWJeGVa7vPzbhyJm+Da2cmE+zEDHLHPQW9wEgwV UP1vG+UwoaptQB4Tg59LFOSSxcYFVIs1PhkhtoBb8CX0DvoAUq4JWBjtb4p6T2EBpKkDD RS8ZjRj1d2M0OU3UN/Ufhdl45LyPWFmZIOsiROQiWDpL33xpD+B7r2quUctczSmZukqcu Yon/o2RxB0qpZ6KzgvvS1Ri3n9PeVTe0cT40BJeNKJY4WoWEi4YBgfn1vMsuAtsYn2ZDJ BEBsQnt0owDRRy8fpYYjJS+mI6upKEGjHFcOQh0SI5yO3cqUXUEKtg9YJS3EIofgAJA== 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=UeR6fWkp; 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 E6CF1606A31A for ; Tue, 1 Dec 2026 04:45:25 +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=UeR6fWkp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C7841F00893; Tue, 1 Dec 2026 04:45:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796100325; bh=uxIkHOrluOzm3OSl+sHiwg4VZyc2RdNY2FKMq2zWCII=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=UeR6fWkpw+AfnGtk2Xr03ubfk66ZkcY9oJT/S+FPixosQw5ZB0FnoXOYGGVznhDFE bEEodUGlyt6GhGgO1S7PCj/sNz1WuI9HQUvMyFPQpCW58jXHL5BjHQDbftfyCkrxcg Q3QoXPd4zgrf7ljUAIPja+K4kxALCgiwS91EJ0R7hw7CycxDRPSAAD2Vub0jpMuYSj YBxnofffPiNMZgkG0lBfiyvXYxvaHX6IopQEtuzgPjX13fGO64GtixuGV18im2n2wK mA4wczK0gT9kq+7JL+tlVrrdKq6KnMOSumbKicM2idXpLPmwT5tOo0uuHDwJSb3Cw/ 6j2J8CoLpdh+w== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/6] fs: add fs_dp BPF struct_ops for file data placement Reply-To: sashiko-reviews@lists.linux.dev To: "Naohiro Aota" Cc: bpf@vger.kernel.org In-Reply-To: <20261201043452.3866039-2-naohiro.aota@wdc.com> References: <20261201043452.3866039-1-naohiro.aota@wdc.com> <20261201043452.3866039-2-naohiro.aota@wdc.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 04:45:25 +0000 X-Mailing-List: bpf@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: - [High] fs: missing __nullable suffix on fa parameter in __fs_dp_file_open() -- commit 70c18d0e6fb82f627357fe30e49bdb298b3c5a44 Author: Naohiro Aota fs: add fs_dp BPF struct_ops for file data placement This commit adds the fs_dp_ops BPF struct_ops interface and registry so a BPF program can select a write lifetime hint when a file is opened for writing. > diff --git a/fs/fs_dp.c b/fs/fs_dp.c > new file mode 100644 > index 0000000000000..1c370f6ffa42b > --- /dev/null > +++ b/fs/fs_dp.c [ ... ] > +static int __fs_dp_file_open(const struct file *file, unsigned long pare= nt_ino, > + const struct file_kattr *fa, > + struct fs_dp_file_open_res *res) > +{ > + return 0; > +} [Severity: High] Should the fa parameter in __fs_dp_file_open() (and struct fs_dp_ops) be named fa__nullable? The comment on struct fs_dp_ops in include/linux/fs_dp.h states that fa may be NULL if the filesystem does not provide file attributes. However, prepare_arg_info() and btf_ctx_access() check the BTF parameter name on the cfi_stubs function for the __nullable suffix. Without fa__nullable, the verifier marks fa as a non-NULL PTR_TO_BTF_ID | PTR_TRUSTED pointer instead of adding PTR_MAYBE_NULL, allowing a BPF program to dereference fa without a NULL check and trigger a kernel NULL pointer dereference when a filesystem passes NULL. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201043452.3866= 039-1-naohiro.aota@wdc.com?part=3D1