From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f0.google.com (mail-wr2-f0.google.com [74.125.225.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13EFE393DC8 for ; Sat, 1 Aug 2026 16:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785601778; cv=none; b=cSzSMQPxhsMv031ECmCwnym6ptKB/+JVA4kTTKGQM+C33cAa8Ye6lYMrZQTgbD9etpzVir96aa6UUUINTReKpkbPgRKk7WYI53tEE1I7uj8/gyiauJcKwkyOvcp1IkOGev0uH9rUgOv6DGx03Z6YFv5qnWX1XylfL0YrbxCuY1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785601778; c=relaxed/simple; bh=GsaH64zwrQdKJ5gPv+eZ5EA1gUTGduKA+kjlJCpWnLM=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=X2LJVRY/ReZL0izuEM6U5pgWO53RF9RlTWRj8NpQBIn/Ytrs0bqobR5O7oyL1v8d2SSTZBu0A0QM0WKw2dPyvAmuT4w7KJdA8zQaVmJw4onk2y6P+XIvMaHhoQYTStNn8xcixgXe8tjpPcIk79fzLNQ93nzCPrr84blS3uUqy08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NUFxAt5C; arc=none smtp.client-ip=74.125.225.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NUFxAt5C" Received: by mail-wr2-f0.google.com with SMTP id ffacd0b85a97d-47f4c92d1b3so542345f8f.0 for ; Sat, 01 Aug 2026 09:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785601775; x=1786206575; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=GsaH64zwrQdKJ5gPv+eZ5EA1gUTGduKA+kjlJCpWnLM=; b=NUFxAt5C9fg0ZRuuR72ZO+PNH242D3Mzy/OAUSqS4xo3p0I94udWuFccSt0FFLnxMg +eurv7zCpBsEaz+kdRfNwygvFmLzZkTujFs5bClwCov9cdfgLTxTp5RGzm8p1MJg+6w4 q6zbduE2Ht79x4yHM+47pJeTac6ICkmT07FBjj4Mq4A+Qjzx0GkF6SWT7rwItug2PRCp HOVTpsvh1H71kI57POLaYxu9cMWsg0z5vyRUwzTEUCGX0Ovjc8FH4kLyTeD9j2gsiwmF 3v6xZzLvOHB3pSirgMg0AcFe7MRswMsBovInsTqHYkeFV/xHYWf/oVwXUngwjgTmO3cB l4cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785601775; x=1786206575; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=GsaH64zwrQdKJ5gPv+eZ5EA1gUTGduKA+kjlJCpWnLM=; b=YMkyobtA1AgPalPBzABOJAopkXGyE1hKzUTbfbHp7fUCGliOrueTijDdiTd/nZIUQZ Ja1J0aYWgHJOM1RJyDDcX7OQuikoU76xLVuqcx7jQgxP53uimzTJttUvYkOUMYB4UHlF Nd+C5zeOtCSnvUB/1/MwRGe+7bupYEIhxMoyB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-Received: by 2002:a5d:6347:0:b0:47f:7b75:9dfe with SMTP id ffacd0b85a97d-47fd72ba981mr7747375f8f.8.1785601775189; Sat, 01 Aug 2026 09:29:35 -0700 (PDT) Received: from localhost (nat-icclus-192-26-29-3.epfl.ch. [192.26.29.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd41e296csm15589245f8f.12.2026.08.01.09.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2026 09:29:34 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 01 Aug 2026 18:29:34 +0200 Message-Id: Cc: , , , "Sashiko" Subject: Re: [PATCH bpf 3/3] bpf: Unconditionally take socket references in lookup helpers From: "Kumar Kartikeya Dwivedi" To: "Michal Luczaj" , "Emil Tsalapatis" , "Eric Dumazet" , "Kuniyuki Iwashima" , "Paolo Abeni" , "Willem de Bruijn" , "John Fastabend" , "Jakub Sitnicki" , "Jiayuan Chen" , "David S. Miller" , "Jakub Kicinski" , "Simon Horman" , "Daniel Borkmann" , "Stanislav Fomichev" , "Martin KaFai Lau" , "Alexei Starovoitov" , "Andrii Nakryiko" , "Eduard Zingerman" , "Song Liu" , "Yonghong Song" , "Jiri Olsa" , "Joe Stringer" X-Mailer: aerc 0.21.0 References: <20260723-sockmap-lookup-tcp-leak-v1-0-1bbdc58ce514@rbox.co> <20260723-sockmap-lookup-tcp-leak-v1-3-1bbdc58ce514@rbox.co> <591fd57e-d006-4e51-af5c-fea65a071819@rbox.co> In-Reply-To: <591fd57e-d006-4e51-af5c-fea65a071819@rbox.co> On Thu Jul 30, 2026 at 1:55 PM CEST, Michal Luczaj wrote: > On 7/29/26 22:32, Emil Tsalapatis wrote: >> On Thu Jul 23, 2026 at 7:33 AM EDT, Michal Luczaj wrote: >>> Lookup helpers gate whether to acquire a socket reference on >>> sk_is_refcounted(), a check re-evaluated at release. An established soc= ket >>> refcounted at acquire time can gain SOCK_RCU_FREE via >>> connect(AF_UNSPEC)+listen() before release runs; the release-side re-ch= eck >>> then reads sk_is_refcounted() =3D=3D false and skips the put. The refer= ence >>> leaks. >>> >>> Make acquire and release unconditional and symmetric: always take a >>> reference, always put it. Adapt sk_select_reuseport(). >> >> Reviewed-by: Emil Tsalapatis > > Thanks! > >> The bot's concern about the comment style is obviously invalid here. > > Are the prompts incorrect? > https://github.com/masoncl/review-prompts/blob/59469708305eca305cbd9eb94e= 5aa0ee3627529c/kernel/subsystem/bpf.md#bpf-comment-style > The prompt is correct, but we don't bother for existing comments, if you ad= d a new one, you can use the new style. Overall, looks like the set is pretty close. You can respin targeting bpf-n= ext as John suggested (and we can wait for his ack before landing) so it can go through CI again. pw-bot: cr > Michal