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=1796104046; b=dL+Kt+u0URr5d2/EwB7//l33L8UBinoY0P1JX+D46ChgHyiDLF6P+XiSEom2YRFO07Cb oMJIWe7u9hcg13nx1suwf8Fz2shGcu7K7wBaj9BdnrIr9/+fneyLLSVThuQ29K0WAEbqQ GQarLJvs5wPN+/xW4orm7Ux0D+uYvMJ8QP5ACVdPboe1PCSgJQejQjnQoLUPg5wCnnFMi hnRYClBu/4avatWhDqCckHvvsmiqwpAMfYNRm4Dtbymnx9aCNgZgUnXLvTX78ebOnqfyN uDLsDnXGGe7JUtSFF1Flo7wjRjklwq0cAdszLjiAq5ZCVAFoE/o6Vpupwu6kO3Zi0wg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796104046; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=gb800qsJRHdxzm1+4ta6rofHEiYBdjAdVQhPKfVSumM=; b=T+nsoUllMe0UmRDj2bMLJLt2c7uSObQK955D7Of7/a2byBS5uvrZx1/ZHbFgw+cdsKGj JZYG+0ph6R0y8fB18OkF9mN/k95DY/DtOYVaTxbkGrIxbBA7ocXPXP3COdjXuBm6jSdvA a9OoAwrO4Sn3OIiqApJ25Tm2LYk1M9Xr3O2cQfVjjBkemjRpP939JAMeHlMiAP9VIf/OJ ji20GYX6GGQVUBUa+LGnYsyxD9n364ZlgkfOb1cAS+De+9jRaeN3BwT/Tr+01YO5gu7kB OFtM2ELAIr7yN4rvLj5ZXvLdrF8IxN76vzzqvE7iLKt4rTR8CZCRZKZBeQPsCoKSTMQ== 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=iVlyvivA; 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 49014606A31A for ; Tue, 1 Dec 2026 05:47:25 +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=iVlyvivA Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCBE81F00897; Tue, 1 Dec 2026 05:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796104045; bh=gb800qsJRHdxzm1+4ta6rofHEiYBdjAdVQhPKfVSumM=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=iVlyvivAYWrjqXB9s+JOnhaSxnemA6lqnIyRzbSmhSms4gjjZnVExEEsVcGkCKSV7 fsqJG9vEfjpVRTVUmXRbVpTCXM31zAFQHSXeaZeptCPP4ki5CJScmxKKFtr2+Mux4Q qcTccgs62VqDji2EFqbVEq9aTQvFcbZmKXAp1D4FE+ZmY3+Nde1IkMoswULUQaaUok x/ZRKII2/uaIjOXNpkNFQ54KvP/1RU3BA/RfJfp9FY0eh8U5bi1ZFU6Jw0OR59Dhdz IWpQRtuS04z8QEO8MwBsdXWRPjlJj3FLgq9Iv/JrL1G/zrZ1p3REHwKYS8Cj3MuWpw dk0iIJj9+HABQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH bpf-next v1 58/73] bpf: Check that a helper whose callback may unwind has an unwind label Reply-To: sashiko-reviews@lists.linux.dev To: "Kumar Kartikeya Dwivedi" , bpf@vger.kernel.org In-Reply-To: <2907dc24ce96eb35a94b4d43a2b89928b3284905.1796099738.git.memxor@gmail.com> References: <2907dc24ce96eb35a94b4d43a2b89928b3284905.1796099738.git.memxor@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 05:47:25 +0000 X-Mailing-List: bpf@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: cb_pads placed in per_pass resets check_cb_pad() cache every pass -- commit 380cfb3192a5afe13d0abaeae652daee9480f8e4 Author: Kumar Kartikeya Dwivedi bpf: Check that a helper whose callback may unwind has an unwind label This commit checks at program load time that helpers, kfuncs, and map callback ops listed as having an unwind label have a bpf_call_cb() exception table entry. > diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h > index c500504cbfe17..6efe11f458b7e 100644 > --- a/include/linux/bpf_verifier.h > +++ b/include/linux/bpf_verifier.h > @@ -1902,6 +1902,9 @@ struct bpf_verifier_env { > bool run_over_budget; /* in one of its functions, see find_failing_pat= h() */ > bool restart; /* see bpf_flow_next_is_no_bound() */ > bool guards_late; /* see bpf_flow_needs_guard() */ > + /* the helpers and kfuncs whose unwind label was found, see check_cb_pa= d() */ > + unsigned long cb_pads[8]; > + u8 cb_pad_cnt; > bool pads_late; /* a global subprog unwinds: see settle_late_unwinds(= ) */ > bool faults_late; /* a site is not what it seemed: see check_arena_sit= e() */ > bool pad_releases; /* see release_frame_resources() */ [Severity: Low] Should cb_pads and cb_pad_cnt be placed outside the per_pass group in struct bpf_verifier_env? check_cb_pad() caches verified functions so each is checked once per load, but fields in per_pass are restored from the initial snapshot by check_funcs() -> restore_snapshot(env, initial) at the start of every verifier pass and path-sensitive run, resetting cb_pad_cnt to 0 and repeating the kallsyms and exception table scan on each pass. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/cover.1796099737.gi= t.memxor@gmail.com?part=3D58