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=1796100943; b=AAyWukk1xk4Nu0ICUHLyd0SEBtYa2nMiiPC+ERLfL1csRGogAgacd6Ad05OjyN39/wxZ 03fs1pTTZef8Mj85L7shnbcJJGA5+K6oQm74IMeYVDdgSZ18IhMHaubwzq/IncaYNyOIu 35zR2mHFvUZXvqSDVtgsnZ3JTDsrTb1TToC18WyCZWNfIG3It17G8tdLEVd7JcUDNEnt6 GyTk07d73MMmoAjg/fP9V0Tk4J4nXvr4XsnTqA541OEg53AGE+yVt8rUTyh9q0SsBHSug iH5eRLJfDbIynbMwJRCwsvxaXdvFuNJPmArD6svJJVfQFh1HC3+7oPJDTNcmQhNrltQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796100943; h=Received:DKIM-Signature:Content-Type:MIME-Version:Message-Id: In-Reply-To:References:Subject:From:To:Cc:Date; bh=TEWBLNcda2ayhDx9vRg7cYwkBzpabkVYGurnYgxVhKg=; b=sOh5rBlncCC8mkpWRlb3EODfclsjd+XID26k2uhKbb8Wh6wLQkPN/Ia4ix3xmBhq4P6L 4umZfaHS1nLkYqWusEyeZT2bFb5w84CP8HALBUwsTB8wKY8jJesh1sVlZOsgt6Pv5PMNF r6Tgjbf0GyWTm4lYs4PoR+LL9R7twoqwdf4NqAdA4T+1kxSp/c/SEdTkZ6ACk/1Cnp2pq KAlZfhOTmODGfLXTO6+N7lYREYzTPGjCgGzXmiRSaqR5G7lD+PpX93QW69mm4b9e/OKrr bwKwhSGvx68cBIDiAK257FzYaY+6qMXNNP79KGcGFjMEVjDbLU8Al7rsSEoNunEmhyQ== 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=k1AcdiCg; 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 95954606A31A; Tue, 1 Dec 2026 04:55:43 +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=k1AcdiCg Received: by smtp.kernel.org (Postfix) with ESMTPSA id D798B1F00893; Tue, 1 Dec 2026 04:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796100943; bh=TEWBLNcda2ayhDx9vRg7cYwkBzpabkVYGurnYgxVhKg=; h=In-Reply-To:References:Subject:From:To:Cc:Date; b=k1AcdiCgSnUTKA+DzmoygZZFJ3dbGuUyeypmlADD2rKRIdKprIYNtybjRE/iGAjYl HnnZzCdjZJhnRvpqiahlSX3FIQY3PZNU00UUuD9UIeYwYjAnGchAv/oSS2ZaU2Frlr zmXzFZLs+FZom+18cGEk2yBktmqrf6JRCX7XKe4Twd93HW/D05bgLGmSWQfsrih9TO xdso2ma4ecppBMKigGEZd9L0n66VJD/totZ5aQAjytNxB32YdFrHHc/bYnVKww8zcs j2uTS1gLIF+m29UCtjByCVcJRFR+QFGkNljk4LP8ZulpXmXteeJlCaut2GwDbzx3sK H0tKeK5fY5eCQ== Content-Type: multipart/mixed; boundary="===============8360390418620704777==" X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: In-Reply-To: <20261201042201.3199928-4-song@kernel.org> References: <20261201042201.3199928-4-song@kernel.org> Subject: Re: [PATCH v3 03/22] bpf: Mark bpf_spin_lock helpers notrace From: bot+bpf-ci@kernel.org To: song@kernel.org,linux-kernel@vger.kernel.org,linux-trace-kernel@vger.kernel.org,live-patching@vger.kernel.org,linux-arch@vger.kernel.org,linux-arm-kernel@lists.infradead.org,linuxppc-dev@lists.ozlabs.org,linux-riscv@lists.infradead.org,bpf@vger.kernel.org Cc: rostedt@goodmis.org,mhiramat@kernel.org,mark.rutland@arm.com,peterz@infradead.org,tglx@kernel.org,frederic@kernel.org,paulmck@kernel.org,catalin.marinas@arm.com,will@kernel.org,maddy@linux.ibm.com,mpe@ellerman.id.au,npiggin@gmail.com,chleroy@kernel.org,pjw@kernel.org,palmer@dabbelt.com,aou@eecs.berkeley.edu,alex@ghiti.fr,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,ojeda@kernel.org,kernel-team@meta.com,song@kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev Date: Tue, 1 Dec 2026 04:55:39 +0000 (UTC) --===============8360390418620704777== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > bpf: Mark bpf_spin_lock helpers notrace TL;DR: Commit message only: the claim that nothing called by bpf_spin_lock()/unlock() is traceable looks inaccurate, since out-of-line callees like queued_spin_release_traced() and the qspinlock slowpath remain traceable; narrow it or cover them. > bpf: Mark bpf_spin_lock helpers notrace > > [ ... ] > __bpf_spin_unlock_irqrestore(), __bpf_spin_unlock() > and queued_spin_unlock() run with the lock held, so an fentry program > attached to an out-of-line copy of one of them can hit the same > deadlock. These copies are untraced today only because inline implies > notrace. > Mark all of these helpers notrace explicitly, so that nothing called by > bpf_spin_lock() and bpf_spin_unlock() is traceable. No functional > change. > [ ... ] > Signed-off-by: Song Liu Is the claim that "nothing called by bpf_spin_lock() and bpf_spin_unlock() is traceable" accurate? The patch only covers the inline helpers, and btf_id_deny in kernel/bpf/verifier.c has no lock entries. Some out-of-line callees remain traceable. With CONFIG_QUEUED_SPINLOCKS_TRACE_CONTENDED_RELEASE and no x86 PARAVIRT_SPINLOCKS, the generic queued_spin_unlock() calls the extern queued_spin_release_traced(): kernel/locking/qspinlock.c:queued_spin_release_traced() It runs with the lock still held, which is the same deadlock the message describes, and it is not marked notrace (qspinlock.o is not built without -pg). queued_spin_lock_slowpath() / native_queued_spin_lock_slowpath() in qspinlock.c is also a traceable out-of-line function called from the bpf_spin_lock() path. The x86 "static inline queued_spin_lock_slowpath" wrapper and native_queued_spin_unlock() in paravirt-spinlock.h are plain inline and are not marked. The end of this series (a833438864c3) removes notrace from inline, so an out-of-line copy of that wrapper in helpers.c would then become traceable. Could the sentence be narrowed, or should these callees be covered as well? --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/46577721107 --===============8360390418620704777==--