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=1796415428; b=Nk421kCatUl3P43H4OzLzoB77e5nGjQI8Xorh7jdl/4U8vihxYb7yN0g9GXVCSNGAbUy c7npXSkO74LUtE1FG50LS7s0ANOOya5azdY0I2wSidKxO5dPK3wDSD4erflNg38CsK1C4 fSA5zBFol5GwIWNBDiFFnr8WR31M5DOrFUWE3l0MD1KMDgkRMJ8mvxS0He+U4i9YHZ8ec I8CEP6AbTUkP9kk33IpMYmz15+cPnrW9rYiyhYOnAoGGTve+hgQ4s1dGm9GjYAWY/1QSf R21jWnbkEDxwCF4bWb9rBcu93n2XKpGYV468dxEtenrHMZ0liN2W7Jb6B3aKS5adudA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796415428; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Wkkjd+GlVU84rTRrchis/8njZaXC6bcx0kAfTuNuXTw=; b=ZmrmrQyzkQcxWfqX3nE0IZcNM5kxwawtz5S/uHhxPMaHaQtmkXsmHJxKDFJOauxKQQ+p FpBu7224puEBZrNrZ3XPULjlbFr0MbyK/3Kn/PcyhJqKq5P+vf0rSHCGXKQ7zEgcs4/Z/ BIj26Lio9zj0B41zT5QWl0budAJH8mAFboLNjE+ZFrvcbRXsCldd4glnWJRF/LRWKhViG IhriP6VL9bAMX95Q0S7oJ49lupn5TLTLM/pGUeEKyUieAnf8EwAdE37bPFexzxa5KZ0tF ogMm8D5btfRNRu6iK9G4t/zW2QKOgLYXXmjRBufS2A9v80OaybrdycRWzftRHxF0xmw== 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=QC1wv29B; 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 671F0606A322 for ; Fri, 4 Dec 2026 20:17:08 +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=QC1wv29B Received: by smtp.kernel.org (Postfix) with ESMTPSA id F35E71F00936; Fri, 4 Dec 2026 20:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796415428; bh=Wkkjd+GlVU84rTRrchis/8njZaXC6bcx0kAfTuNuXTw=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=QC1wv29BuvwEimf6OAzw8G8GcEN1sGYd8loHePWp6hVZefp7imLTqxnz6Xm5YneBT +/xQo2klNTAHNvXRfnlBgHGrU52jkY+OGPR5/SAiGu2QN+gC2LoCtzc38TYvmv05ui oDjeBs0U+Pez1nQY+fHWBEMby3xoWbOqIHmiIuWwy3H/RMDcBFJzmG0ur4OBKwdUAo cf0XaMA8quS3f/mJAoNuSR26gadw99yEu9AJ2Shnvy4s4UUcbd68ZhCNDwTHoKxjCk FW49dbASzwubXcn5TcNDcPMRegNxExExe1tRCXG6yb28X5hMdXcGYdHoSZjgSC6N6z UZF/V/O9S9yfA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH bpf-next 5/5] selftests/bpf: Test sk storage lookups during TCP transmit Reply-To: sashiko-reviews@lists.linux.dev To: "Mykyta Yatsenko" , bpf@vger.kernel.org In-Reply-To: <20261204-sk_storage_prefetch-v1-5-ea52fb48b52b@meta.com> References: <20261204-sk_storage_prefetch-v1-0-ea52fb48b52b@meta.com> <20261204-sk_storage_prefetch-v1-5-ea52fb48b52b@meta.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 20:17:07 +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: scheduling race in churn() can fail deleted assertion -- commit c50686a666890adca4b04b7b43ac8b9ddda340a7 Author: Mykyta Yatsenko selftests/bpf: Test sk storage lookups during TCP transmit This commit adds the sk_storage_xmit BPF selftest to exercise concurrent sk_storage map lookups on TCP egress while user space deletes elements and destroys and reloads the maps. > diff --git a/tools/testing/selftests/bpf/prog_tests/sk_storage_xmit.c b/t= ools/testing/selftests/bpf/prog_tests/sk_storage_xmit.c > new file mode 100644 > index 0000000000000..9e80011e6630c > --- /dev/null > +++ b/tools/testing/selftests/bpf/prog_tests/sk_storage_xmit.c [ ... ] > +/* Delete the elements of cli for NR_TRIPS round trips */ > +static void churn(struct sk_storage_xmit *skel, struct pair *p) > +{ > + struct bpf_map *a =3D skel->maps.sk_a, *b =3D skel->maps.sk_b; > + __u64 end =3D get_time_ns() + TIMEOUT_NS; > + int done =3D READ_ONCE(trips) + NR_TRIPS; > + int deleted =3D 0; > + > + while (!READ_ONCE(stop) && READ_ONCE(trips) < done && > + get_time_ns() < end) { > + deleted +=3D !bpf_map__delete_elem(a, &p->cli, sizeof(p->cli), 0); > + deleted +=3D !bpf_map__delete_elem(b, &p->cli, sizeof(p->cli), 0); > + } > + ASSERT_GT(deleted, 0, "deleted"); > +} [Severity: Low] Can a scheduling delay between the main thread and ping_pong() make ASSERT_GT(deleted, 0, "deleted") fail spuriously? ping_pong() runs continuously in a tight loopback round-trip loop without coordination with churn(). During the second churn() call, ping_pong() is already running at full speed: main thread ping_pong thread churn() done =3D READ_ONCE(trips) + 1000 (preempted) round_trip() x 1000 WRITE_ONCE(trips, trips + 1) while (READ_ONCE(trips) < done) /* exits with deleted =3D=3D 0 */ ASSERT_GT(deleted, 0, ...) <-- spurious failure On an oversubscribed or single-CPU VM, preemption of the main thread lets trips reach done before bpf_map__delete_elem() succeeds once, failing the test even though the kernel behaved correctly. Looping while (READ_ONCE(trips) < done || !deleted), still bounded by !READ_ONCE(stop) and get_time_ns() < end, would avoid this race. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-sk_storage= _prefetch-v1-0-ea52fb48b52b@meta.com?part=3D5