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=1796139997; b=eaVNLA+GYZZNKtaJbmkMvSLVy+D/crp2s0HT9F6UXiqTz7woFnFHossg4ufb3wfQEZEL LPdxS6XpjyX2F1SdrAEXsh3S66l5vGq5+DUM6w4GuHBGMNLtkw87S1LrsGRRg4OpMDFMU giMQYQZ7D7H+enwwNZk6axOfnnFirhxp3tcD9eSOVKSrfZlDBodb4b0tgT2Th+8Uynxlr LPcWj9K+rYpQ4oX5fVg0H58hiYzkHNiqzYVx2RqVS7ttaYBH7L4AH+bK4hn1PqhQjkavH eR9UxtEWnZY0vRx8vplCXKYeA+6MmDoGkN3pYjaeozC+b1S224AffokvC+aiYihi/Fw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796139997; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=+zfSK+droCabkqRveqBQU2VsTq0e5yU2/Dp6WzUHcHI=; b=kCOg6ZdC3ZTOyj0htl9yFz0yqDylTIOXV7IcuSJm35Hig8WcPj/ttZScgBfH4KXzV2ak qpATazWsP1wbZl9MiIE5A9qkP3ignWmZz306K/fzaFRPZ6pauUx7LFicLfIpQfyjByFtj kOjgKwwwjoP3zoI2RdlXTCyI/bSA8sDB2R8smwGeUM+sKzWGH50Ek1qbH24E6bfD474NX R63UcriKh3R5maGJYrDP38hWcwCTPJDTc67BTNzOa25FCAs8+SdYUXc6bJdfdGgXm/EiC VulcegY5sfAkMLkm6NVKO87v47HEbBu63hbyky8ty3/Ny41FBeOSAeqb8yRKp1ghrvQ== 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=QyB48wp1; 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 099B6606A322; Tue, 1 Dec 2026 15:46:36 +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=QyB48wp1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46A091F00899; Tue, 1 Dec 2026 15:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796139996; bh=+zfSK+droCabkqRveqBQU2VsTq0e5yU2/Dp6WzUHcHI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=QyB48wp1oYdVkbsEX0ZrPlamn54clgwzfltGaoOoK3Tkn6iaompYCrkXJ1ogG+nni 4gfdtIx81YMwBkourfrjnYjWo8ufnDUkFLEe800V7bdkzuMiCq6m3N7Efc/olIgzO1 TI9eG40TWXRdkfLhg99zeSWLqh3rJNc0Uf/3Kg04jE7z4sG+wxY7fDkav2iCNWvR0/ fkXlPB8GJW7naWJGM7+Q8fPgIubNWzsFeN98i80JSmskA1gAOH3K/EdJ757x6Ak6D9 jF4wdmGHF15nLUegkAinpmKgMUBQ9d55hikeTOPXg3EmBiWfZofgVvdarYBfubU06u UeCu2uqSCZfmw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH bpf-next v5 1/5] bpf: Avoid per-CPU private stack in preemptible tracing progs Reply-To: sashiko-reviews@lists.linux.dev To: "Mike Bazov" , bpf@vger.kernel.org Cc: linux-trace-kernel@vger.kernel.org In-Reply-To: <20261201-bpf-preempt-v2-r2-v5-1-a6bb30daae35@sentinelone.com> References: <20261201-bpf-preempt-v2-r2-v5-0-a6bb30daae35@sentinelone.com> <20261201-bpf-preempt-v2-r2-v5-1-a6bb30daae35@sentinelone.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 15:46:35 +0000 X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] bpf: missing Fixes trailer for commit a76ab5731e32 in commit message -- commit b9bc691f12fd2d87c140aae92f53de48b0e0b644 Author: Mike Bazov > bpf: Avoid per-CPU private stack in preemptible tracing progs > > A per-CPU private stack is only safe if a program never runs in two > tasks at once on one CPU. Commit a76ab5731e32 ("bpf: Find eligible > subprogs for private stack support") gave one to tracing, raw_tp and > tracepoint programs, but they run preemptibly, and two tasks can > already be inside one of them on a CPU: > > - Two raw_tp dispatchers that tail-call the same handler each pass > their own per-CPU recursion check, so both tasks run the handler. > - A tracepoint program attached to a syscall tracepoint and to a > regular tracepoint can be entered by a second task through the > regular one, which only checks bpf_prog_active. > > The second task then overwrites the preempted task's stack. Neither case > can be seen when the program is loaded, so never give these program > types a private stack. > > check_recursion() told tracing programs apart by whether they can get a > private stack. Make it check the program type instead, so that > recursive subprograms stay rejected in these program types. > > Move the selftests that relied on these program types having a private > stack to kprobe.multi and perf_event programs. The stack argument test > keeps a raw_tp copy, which still runs the program. > > Trade-offs: > > - These programs use the kernel stack again. > - A program with two 2000-byte frames no longer loads: "combined stack > size of 2 calls is 4000. Too large". > - Unwinding on a private stack is no longer tested at run time: raw_tp > was the only such program type that BPF_PROG_TEST_RUN runs. > > Signed-off-by: Mike Bazov [Severity: Low] Should this bug fix include a Fixes tag for the commit that enabled private stacks for these program types: Fixes: a76ab5731e32 ("bpf: Find eligible subprogs for private stack suppo= rt") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-bpf-preemp= t-v2-r2-v5-0-a6bb30daae35@sentinelone.com?part=3D1