From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 8A59F429CF4 for ; Mon, 10 Aug 2026 19:30:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390258; cv=none; b=nXuEbs0UPCala6Ks1vaPfoHuWybUkli/CIXlhcc39GHb/U1vistWeyglL4Jtd8n0Smz3CXD56Mx7ZqwFQgs+FI8Nu8Yn/YcFYGRj3YoS6Hqlf41ASUk3e3rw+Jz+4UVA9ByX4O++mdVvP8I7JM7hRqJUbUevEe2H7UpBXWH79zQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390258; c=relaxed/simple; bh=ez/LWSIdBA/RKNAM9CkBfCrfJtyE+IThwKhIJNgo0/8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=StlIH2n7BAu3EV9JBlOOYAno/ojI+bWAFjy1k4FDfUUnOh6iEBLhtnlk5T66bok9HVxAMiXLwwfNr3pULRjUOGWIN4Dmw5eEGYYqpqV/eAowhUsMbfgMsdXMQc8eeNZGCRHXFoD8KLejbAzoz46BN32KQG20Xr93V5ZkBl9eY9k= 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=qPzVDE83; arc=none smtp.client-ip=209.85.216.50 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="qPzVDE83" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-38ea87caafeso1619463a91.3 for ; Mon, 10 Aug 2026 12:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390256; x=1786995056; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=ez/LWSIdBA/RKNAM9CkBfCrfJtyE+IThwKhIJNgo0/8=; b=qPzVDE838jUAeu/fHtRRnRCUDX7PpACXzMK/T1/TRDx0m2vZX5dU9cXrjcNHx1DvfA yjKRejqOPVOun1oS5+XqCfF1ZJ/MZyrSoKXi2L7NPE1DC19ZMwBjD9S0e5sI3fp/Ragj aeUFWdlm4gT7wdQkQDRSqP59Tm9xwTgocgBDhNAgXX/jmIbRhq44OjJkaOggcYx8X5Qw azBgGlRDv/IbMd8ckROUC2tJHlW84oBXJ1IU+7wTSyug6cmH9TdFaqUxa/7SkotJcyvT fNHafUZ9CeJbA5H/DVKAuVSSNDOwvixrr9qGVNnNpJGZs9lIyiEnTOfNtYLkuDuP3Fgj eFjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390256; x=1786995056; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ez/LWSIdBA/RKNAM9CkBfCrfJtyE+IThwKhIJNgo0/8=; b=VKbU+X+O0HA1yXU/i9wjxbmsNVEMxJkCMICzVrpRrTrtdoVBthZdTF/ABcVrZWhPbt W11cKlET01D5LQxpxXoX0AjKsTosghQYFfmpKZkOMrN+o2UbWMKGhNIaxqu4PAzHUKw+ sNaYjeOPhjwioexaB7ryoZlYi4mrWQJo1S1Y8l3dequ0L44NO8LQIbM0WdsaigS7EfZe cxdjuUCSOFPdGoWfTqacLjYDR0ki0lK6E58QC7K8l+jk/t54IscxTurqEZKYnDu0Ef/Y jriyR/yXdYzOwuSfWPK8fwiRtDD5vWQCnKIpOq4f/GJfh3A0/fg8lEbpSTRfWm8E5gUx Posg== X-Forwarded-Encrypted: i=1; AHgh+RrKQIEoH6Ez1zLJ6CsC/g7Im75Ey4wx2sgZpX16Tozi1slLJcEDd3TAoX0ajg62+1Zq+Yrghqt4rlu4Mh8=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8D5qOXOKCk+SVRAYbEG5bKojhoKOzMQ62V249dCNF9Th8puik MDHrbr1YUNnwbij5FZNKlPcMgYGo4TzO9VDuSuF8qqakSU2b2qHapGIB X-Gm-Gg: AR+sD13zkKCmEMVXv6OxUuz2GGdiawHzkKbTkGLfzdB/gnnckV6GacQLHp8B3HGoLUD Svf+hBo6LxkZvDnWMYghLWicvdgH1nxU6NuQauVphzKiAxnu9ta5VlBVNKK8z04hWPT2Tc8vUFW zaWIiGXMHhFsY7uZKaKGCUAboMm7YnhKaoX8jtDkpNEtQ2Iuawcd3ShCvDBTQ3DGmCv69EgiK2o 35NP2nNBPhhTpLE73knahsJHHxiVX9kdYb164QEZ57QSt9MTQ2WkEr2TkVmz8F1EtkFwPqVWXns O/NRLAKVCDsQr0nQxHafxwUduA72PxArQn1FHZeSkr683EN51KjWFX7Y/FS78njV1lyqsWq8N7s +QfNQ+asaVRVBVH7aF4QdBaZbS6f04pDM3d1Ae6dA5hQ8mRyUP4u69G6U058Q+uIJ4ZeZhaFoQH zcik/JE/DT4aVVt/78YdGIFtLuzrvl+Pig5FBPSkbjEKHo/7Mxj4XHhluH2tw4lTeBntY00MK2o 2R2nCOuADF95tkv X-Received: by 2002:a17:90b:448b:b0:38e:524:8797 with SMTP id 98e67ed59e1d1-3909d8c3b9cmr27977660a91.13.1786390256493; Mon, 10 Aug 2026 12:30:56 -0700 (PDT) Received: from [192.168.0.13] ([38.34.87.7]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-392d5238e13sm737925a91.14.2026.08.10.12.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:30:56 -0700 (PDT) Message-ID: Subject: Re: [PATCH bpf-next 1/2] bpf: Account for preempt and IRQ state in RCU protection From: Eduard Zingerman To: Ning Ding , bpf@vger.kernel.org Cc: memxor@gmail.com, puranjay@kernel.org, paulmck@kernel.org, Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Ihor Solodrai , linux-kernel@vger.kernel.org Date: Mon, 10 Aug 2026 12:30:53 -0700 In-Reply-To: <20260805233940.3966981-2-dingning04@gmail.com> References: <20260805233940.3966981-1-dingning04@gmail.com> <20260805233940.3966981-2-dingning04@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-10 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2026-08-05 at 16:39 -0700, Ning Ding wrote: > Disabling preemption or local IRQs keeps the current CPU in an RCU > read-side critical section, but in_rcu_cs() does not account for either > state. The verifier therefore rejects safe kptr accesses and invalidates > pointers when another RCU source ends. >=20 > Include preemption-disabled and IRQ-disabled state in in_rcu_cs(). > Invalidate RCU-protected pointers on RCU unlock, preempt enable, or IRQ > restore only after the final protection ends. >=20 > Signed-off-by: Ning Ding > --- Hi Ning, Thank you for identifying and fixing this issue! Acked-by: Eduard Zingerman ...