From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 10E6B2749EC for ; Wed, 16 Jul 2025 20:02:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752696166; cv=none; b=af47XSnemqlBDdVzMPScQIcPMAZP+c4SQiK3YwD0/ccxfgjGawwIixeuxtxLTRKn/vm/pFUDkmNKWzjYP+99dQY8GflCgLB8Sra6O7vybc7spYTrxAcsQZEfBnVTfwaqWjPfa4oJYMZbOxgXfms472pKe5AbccVSDaXz0FoUGyc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752696166; c=relaxed/simple; bh=LyZIzMJ+176FVY3wSNBaRyULlAoZ+vWoFImqvhRaayY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tau9WpnQlN6GS98UUoa3NMGJvsRJOBBu6wCeE/0guIelbEqX0ayt1PzPCSHPCj+9L3ojoITyTVz2cdMnqnSL+0snDCnCsTNV0wWqAM41jxqgYGG4gpSw6gOGRXcYA3+eHI3rhdxAqIl+Z0zYmN/okTB/+lKFhxBWIQsxiPzSAco= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=rdnyA+nd; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="rdnyA+nd" Message-ID: <4c9fcc40-9aca-4ac8-9769-1075e2858b8a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1752696160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LyZIzMJ+176FVY3wSNBaRyULlAoZ+vWoFImqvhRaayY=; b=rdnyA+ndWAuYJ7XjkWG90xSnqgOsXJBHoMeXSV7s6Mq95GEULyWiIpp7a0EUTGHaoeEps/ NVnlIWLLzPKiZ69u+/QlVTt2NUBg0IriCA5vczmUcS3uQlgOHDHRQo9RpYNXETT+0KOzSA Biq0G4NF5Zv8jTIxRhHApWA6ll1/vSE= Date: Wed, 16 Jul 2025 13:02:33 -0700 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] bpf: restrict verifier access to bpf_lru_node.ref To: Shankari Anand Cc: Alexei Starovoitov , bpf , LKML , Martin KaFai Lau , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , syzbot+ad4661d6ca888ce7fe11@syzkaller.appspotmail.com, Hou Tao References: <20250715075755.114339-1-shankari.ak0208@gmail.com> <27c7c76c-becf-47b1-812b-05f260a8cd85@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 7/15/25 11:32 PM, Shankari Anand wrote: >> I think the percpu_freelist used in the regular hashmap should have similar >> behavior, so may be worth finding a common solution, such as waiting for a rcu >> gp before reusing it. > To resolve this, would it make sense to ensure that elements popped > from the free list are only reused after a grace period? Similar to > how other parts of the kernel manage safe object reuse. The reuse behavior has been there for a long time. It had been discussed before. Please go back to those threads for the background and the direction that it is going. This thread is a good start: https://lore.kernel.org/bpf/20250204082848.13471-3-hotforest@gmail.com/