From nobody Mon Feb 9 18:44:24 2026 Received: from mailtransmit04.runbox.com (mailtransmit04.runbox.com [185.226.149.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FDB334F499; Sat, 7 Feb 2026 14:35:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.226.149.37 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770474921; cv=none; b=bWih68u0jwi8w9n7xexgVI0lpQ327co/oA05+y8xfNT7t26qAbi/1Rs1FTdk/fx7bjeMxf3Y3JE7N2DYsehjb3Tv8sj3kkQScTZX5TuyveI+tXAbAI70HcL2Tq6c4N7bIqFQmqDP6TWsbBIhWVcqTX6EhB/3Naw6NhD49EAOT3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770474921; c=relaxed/simple; bh=dPxiuBeFVLFXcQWhDoQAORF1N20Mja2gEH0QbJScTxc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VNqCCtzz7AftFrRoToTORZ10MIyOViyL55WuvmtRGUK5KipvKqcCeklzZeN7daTWj6SZNLaTFd6dWC81S4r+XGPyqI3/3tHl10v/9BkmTfLmk2T46wmhrkjq4tHnnwh8St9R5vcdRlcjLY49IlyRObJU6uc8b4DXv589Vz0dcxQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; dkim=pass (2048-bit key) header.d=rbox.co header.i=@rbox.co header.b=QxexerH/; arc=none smtp.client-ip=185.226.149.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rbox.co Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rbox.co header.i=@rbox.co header.b="QxexerH/" Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1vojOz-00Ah6X-ET; Sat, 07 Feb 2026 15:35:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector2; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From; bh=RdHEkIIRAhdGMHaZV+5C0ZEGBw8Y9TkMkH8ReCDpSdI=; b=QxexerH/G4vQrH0ysQvQZs5/h6 TM7eBxQrdwPl2XWkMh+sdKQF5HWIY99GWfw/VHw3bcjuLxAN0VIfcxLU58aGGRls3+2zcSa8UU9dD KXvT04w41NtQW65dCcfn0RkANvmBY8njdOQ0wbdQohUzLZaNy4oI8/TAxV/sy5ynm+1tIH6C7jTtD pNkoQfpkaap+hDFl555PlY31eSMrNAPlCU6aj4baseW+v4lWqgtmaKKEX0bw28kCqKCBBgYL1UmYO aQqWx1zHYPzPv6ItAttzUHTjzMIbooXJkrzFwMUB8flAa1ZiZPz08PuKA+6hEVSMS3VUsXQbRyndf rdmbWfmA==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1vojOy-0005Xv-Si; Sat, 07 Feb 2026 15:35:13 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1vojOu-006OQ1-VX; Sat, 07 Feb 2026 15:35:09 +0100 From: Michal Luczaj Date: Sat, 07 Feb 2026 15:34:57 +0100 Subject: [PATCH bpf v2 4/4] selftests/bpf: Extend bpf_iter_unix to attempt deadlocking Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260207-unix-proto-update-null-ptr-deref-v2-4-9f091330e7cd@rbox.co> References: <20260207-unix-proto-update-null-ptr-deref-v2-0-9f091330e7cd@rbox.co> In-Reply-To: <20260207-unix-proto-update-null-ptr-deref-v2-0-9f091330e7cd@rbox.co> To: John Fastabend , Jakub Sitnicki , Kuniyuki Iwashima , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Daniel Borkmann , Willem de Bruijn , Cong Wang , Alexei Starovoitov , Yonghong Song , Andrii Nakryiko , Eduard Zingerman , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Michal Luczaj X-Mailer: b4 0.14.3 Updating a sockmap from a unix iterator prog may lead to a deadlock. Piggyback on the original selftest. Signed-off-by: Michal Luczaj --- tools/testing/selftests/bpf/progs/bpf_iter_unix.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_unix.c b/tools/test= ing/selftests/bpf/progs/bpf_iter_unix.c index fea275df9e22..a2652c8c3616 100644 --- a/tools/testing/selftests/bpf/progs/bpf_iter_unix.c +++ b/tools/testing/selftests/bpf/progs/bpf_iter_unix.c @@ -7,6 +7,13 @@ =20 char _license[] SEC("license") =3D "GPL"; =20 +SEC(".maps") struct { + __uint(type, BPF_MAP_TYPE_SOCKMAP); + __uint(max_entries, 1); + __type(key, __u32); + __type(value, __u64); +} sockmap; + static long sock_i_ino(const struct sock *sk) { const struct socket *sk_socket =3D sk->sk_socket; @@ -76,5 +83,8 @@ int dump_unix(struct bpf_iter__unix *ctx) =20 BPF_SEQ_PRINTF(seq, "\n"); =20 + /* Test for deadlock. */ + bpf_map_update_elem(&sockmap, &(int){0}, sk, 0); + return 0; } --=20 2.52.0