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=1793999374; b=AmX8lJMHkDgMlMMvJAfhdPGnc/jGcHbos9AwbiTXCFS9cDtuKUiuyUppw5e0RP1fk4Nt TVQEj7OM5jk4H6r2+RltzuWSpPTpwnIWPeA7IXQ5P9HY5Q5RtIXmR33cZShQLyk6itRrD Gf5/vI0vTuGEApN2wUuL/29j0HMzfXdM5EJjkw6I/RVBDvE/TRNaXbPueIcLS0V1HVdAF KPb/byD6WLWbuXmuIOEiajv6Y0QBzb3MBot9BLpM0LjFYJqw+U6exuy8aNcv8gXyhxIWq pmv9OhVDZZCfoP5l21E1KFPeyq0oXNF8uJXqQr4/bhJEdf0apYvdR6agOjYu7elbdEA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793999374; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=E5JaI0mNVJFVAodT7bG4CxY3z+sb8nhsTFOllnuodCU=; b=vey+peRhSu5HKBAkKYtRFzrKgJ5wq7w0+6mDF4K/MGrWz3V9fRbaIDRlNQbpc0t2FFB7 G0PPvcs1Hqmj3HaK1T8ZJoefJG/JW6Vv1VQgebV3VSkqXifo/MEnsdkabdFHwzYi+HWkR 3E4NDBKXuhtncLx0yiZnmDm1Ap7REREZvPsPqo6pQ2gX2tjsBIeZAwofpchx5FtymIF2Z LX3G8BTviE9HEcnbkFX/FYux3JF7Kg8jI4cqnxlIKJv7FtHwBQ6L5lCSjLtAHIBDYt/E3 LduiQg6VWatBANB/XMmKbJvC6oE8JaO3JTSmG9t/KwnlUzWyyeo+jV+Ow87vcvbujkA== 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=HTvKuYOm; 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 15934606A329 for ; Fri, 6 Nov 2026 21:09:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HTvKuYOm Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CA1F1F0089F; Fri, 6 Nov 2026 21:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793999373; bh=E5JaI0mNVJFVAodT7bG4CxY3z+sb8nhsTFOllnuodCU=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=HTvKuYOm62wwZAR0ShFaxpTbunIPeV5+zZpiIlbwAmflZGLWd86ZaEXvXocM3SgVE x1RvUodUtsFx3vaBOpuIsUSEPCwItNU4QVdWtL3KQHpYXPnl9NEMaNCMOsDDtgvYIP Ykzn0n3whiXJkdb4kdCRzC/gVQzC5sDyZsmovlEm+FRssGvxdFt9VsbXiPYMO+tqvm vggel2cxgYdFArG343OQg7p9FKuxanauWzi3aaoYUUNho+mEMPiR7/EHDR5DIkeRqp eKzr0L2Qgzif/tX779VtfNN2EZKALQOaxMZPneHZoCUyjuTFXWWD34CBya5EN70hW0 ldILicNIgxEzQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v1 bpf-next 16/18] selftests/bpf: Test fmod_ret candidates found by bpf_scan_ir Reply-To: sashiko-reviews@lists.linux.dev To: "Anton Protopopov" , bpf@vger.kernel.org In-Reply-To: <20261106210314.1767267-16-a.s.protopopov@gmail.com> References: <20261106210314.1767267-1-a.s.protopopov@gmail.com> <20261106210314.1767267-16-a.s.protopopov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 06 Nov 2026 21:09:33 +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: - [Low] selftests/bpf: missing KASAN and KCSAN exclusions for bpf_testmod_retval.o -- commit 628c6eb28eaac0eeb5e557c0b787a65b02cd6e06 Author: Anton Protopopov selftests/bpf: Test fmod_ret candidates found by bpf_scan_ir This commit adds bpf_testmod fixtures and BPF selftests to verify the fmod_ret target tags generated by the bpf_scan_ir compiler plugin and the verifier's enforcement of restricted return values. > diff --git a/tools/testing/selftests/bpf/test_kmods/Makefile b/tools/test= ing/selftests/bpf/test_kmods/Makefile > index 031c7454ce65f..475df9a7680ea 100644 > --- a/tools/testing/selftests/bpf/test_kmods/Makefile > +++ b/tools/testing/selftests/bpf/test_kmods/Makefile > @@ -23,7 +23,16 @@ MODULES =3D bpf_testmod.ko bpf_test_no_cfi.ko bpf_test= _modorder_x.ko \ > =20 > $(foreach m,$(MODULES),$(eval obj-m +=3D $(m:.ko=3D.o))) > =20 > -CFLAGS_bpf_testmod.o =3D -I$(src) > +bpf_testmod-y :=3D bpf_testmod_main.o > +# The functions for bpf_scan_ir use clang extensions and need the plugin > +bpf_testmod-$(CONFIG_CLANG_PLUGIN_BPF_SCAN_IR) +=3D bpf_testmod_retval.o= \ > + bpf_testmod_retval_strong.o > +# Coverage instrumentation makes every path of the fixtures dirty > +GCOV_PROFILE_bpf_testmod_retval.o :=3D n > +KCOV_INSTRUMENT_bpf_testmod_retval.o :=3D n > +KMSAN_SANITIZE_bpf_testmod_retval.o :=3D n [Severity: Low] Should KASAN_SANITIZE_bpf_testmod_retval.o and KCSAN_SANITIZE_bpf_testmod_retval.o also be set to n here? bpf_testmod_retval_private_store() and bpf_testmod_retval_private_memset() use __attribute__((optnone)) to keep their stack writes and memset in the IR until OptimizerLast. When CONFIG_KASAN or CONFIG_KCSAN is enabled, the sanitizer pass runs before bpf_scan_ir and instruments those operations with shadow stores and runtime calls (__asan_report_store4, __asan_memset, __tsan_write4), which bpf_scan_ir rejects as side effects, causing the tags subtest in test_fmodret_retval() to fail. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261106205523.1765= 622-1-a.s.protopopov@gmail.com?part=3D16