From nobody Thu Apr 2 20:14:48 2026 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 C6C7C3A6F07 for ; Thu, 26 Mar 2026 20:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774557770; cv=none; b=H6RiuoiV24DtwBYDIgn6Pi+B9HFGJOUlIfbr3fCSwsFi7PEg6yjgkBWIypQU8bM3+YtLtGKO3cmqh2IYQvRS3pvQUqWt8OZsqp3gC58LMlkcjyvTDvQAZ3IBWrXSF1tRuKH7PcS10Kdwr75SII+nXCCdD98pIK+TTwzYHDKdCFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774557770; c=relaxed/simple; bh=sjr0pvglsqscc3vE3CGBUirkr1tZeu6bXqIK38JFGYM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lT/BLSPDPaceshs7TpRYrcEuJYpuUEzVB4cAf1CppxmBFyEwMeE4QLDf7/bokvgi+OEyuOjwu5eWNKTGaviOLAFrAq9r75OfAuE4zZ5Jk9+8EGLQQiCw7kGr07fuGtML9S5V0iGYIOz4UyVK3RwgRrNYu80ZoIwRWV0jJq5x/zY= 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=BLXDI7Kn; arc=none smtp.client-ip=209.85.214.180 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="BLXDI7Kn" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2ab39b111b9so6334165ad.1 for ; Thu, 26 Mar 2026 13:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774557768; x=1775162568; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7/EjjtWJV/7DiKNlIfPwibx36CB9xJaEZVo+QaHyNNU=; b=BLXDI7KnGBiXTnPaaLMWueM11ZZ6pG1yCO7KgAayOZ0+FIQoFnhOjlzgf7TCXw+36J FGm3wMyNJi5t9iFmpuXbb9w+twpqB7jTbaX9BIzdoTvxFpjpdgLmRnzYC/0tlbW5RV0S hsXSOddSkZy0CObhAzj3YDvNAoDmWDNrRnXftdcdCBfsSYOgSncLiaXuS5JdcKaAGEA+ zQ0vToYI+4NNvs4eVH9wCecn3UPQ+v1v8PwPMepc82FVBxyGDDsmIa8hH+isY9zMbz0C wTjJN6bN0vcysmEuTWNZSWtgCZea8N+y50ysqI3/NjfRnwtdXZYqlOniX08zbIji38Q5 8ozA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774557768; x=1775162568; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7/EjjtWJV/7DiKNlIfPwibx36CB9xJaEZVo+QaHyNNU=; b=bOTdxy4IO0p/kVBUVOLxMBLywH6w1mNuk77pEoBVPr4umyiKFnyX9D+VHNR1bWgNP1 /LI5UVJ3TLGE35KqH/tK6iqdUdIt9FHUAZBqfNjADLpcLW14U/p/uqQ88FHVtQRHh0xr WIPuVH6My87fgpaRCp7bwUYulTXSrN/U6XqxXkHf91jY6RF/r/8XPlqEVAtITcWZIZKb A2f2mokpgjz71xTml3+E5HMFYcobfz91jEpMUNpgbXXpZ2GQeN6bSmbAiUi56lCtZtj7 V260p4L7k3O97bzduPyCw1UsLObsig9emQKxM33H5xC0spUy6AQ+7T3Gra/1nVd8kqSO i8bg== X-Gm-Message-State: AOJu0YzG4Q91uExu7tHtettOJydYjK1sX/s9BX9mk2ofRbWSAp9KfmwU H6TPR+49ZYQEq8fQoUNACvBT6/gmIdIKnJ0AqHpUvlouskfIrnePNrIj X-Gm-Gg: ATEYQzx3n7Oraq5Vyyt6sS9MUgyplflLKSAaFBj8N3NU5940lZ6xRy9LehDu+hFXAWx wyUxIjMSoPR0/8CtQ3Kcr+uOCyvB+BMe/W//cXVa8wMDho/kvXUEcdQkkwGFtKIAL0S/xVypatu 8xCt6WjzikUuTwnZizDt7QLqV0K4BkGIXhVpQbfro1Kcf6IpFQivFOiAt/mUKOwqgK9HNFgVC7t lvWxMoxyangZOZjmYeCGgNRTkekJB2sWbc60iEki/NPvqWVjshj85Ma+E00BHI7UkdMPtJpVnKB DLaQGNopZjId19VyDwxOJxFYJdySOCznLSGw+c1uTMD/9E/Br1p0gaHUTejlz7muR4RbUgEFnex XIkKkO95mrE4OSw08o16+AbHb2UjVSOTadElXOKW7dk0e/CDUU2DDk0o+etGQI1IN/eshTLc9mH HAfBFz22w1UG+t0OSDK+P45vuXgCgN1qXg4FFRfNKPcPFRrmOAH6DNYt8R4BI2ydzX7xaDqklgU zw= X-Received: by 2002:a17:903:1a23:b0:2b0:3f7f:8115 with SMTP id d9443c01a7336-2b0cdcb7d34mr153505ad.24.1774557768136; Thu, 26 Mar 2026 13:42:48 -0700 (PDT) Received: from mi-HP-ProDesk-680-G6-PCI-Microtower-PC.mioffice.cn ([43.224.245.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b0cbfd17d9sm4004905ad.25.2026.03.26.13.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2026 13:42:47 -0700 (PDT) From: zhidao su X-Google-Original-From: zhidao su To: sched-ext@lists.linux.dev Cc: linux-kernel@vger.kernel.org, tj@kernel.org, void@manifault.com, arighi@nvidia.com, changwoo@igalia.com, peterz@infradead.org, mingo@redhat.com, zhidao su Subject: [PATCH 1/4] tools/sched_ext: compat.bpf.h: fix scx_bpf_dsq_reenq___compat signature Date: Fri, 27 Mar 2026 04:42:35 +0800 Message-ID: <20260326204238.3755737-2-suzhidao@xiaomi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260326204238.3755737-1-suzhidao@xiaomi.com> References: <20260326204238.3755737-1-suzhidao@xiaomi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" scx_bpf_dsq_reenq() is declared with KF_IMPLICIT_ARGS in the kernel BTF, which means the BPF verifier automatically injects the struct bpf_prog_aux *aux parameter. The BPF-side weak symbol declaration must NOT include the implicit parameter. The previous declaration included an explicit aux__prog parameter, which caused BPF programs calling scx_bpf_dsq_reenq() through the compat macro to fail verification on kernels where the kfunc is available. Fix the declaration to match the calling convention expected by the verifier (2 parameters: dsq_id and reenq_flags). Fixes: c50dcf533149 ("selftests/sched_ext: Add tests for SCX_ENQ_IMMED and = scx_bpf_dsq_reenq()") Signed-off-by: zhidao su --- tools/sched_ext/include/scx/compat.bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/sched_ext/include/scx/compat.bpf.h b/tools/sched_ext/inc= lude/scx/compat.bpf.h index 654b566bd94a..6fbacc909b8b 100644 --- a/tools/sched_ext/include/scx/compat.bpf.h +++ b/tools/sched_ext/include/scx/compat.bpf.h @@ -405,7 +405,7 @@ static inline void scx_bpf_reenqueue_local(void) * v6.20: New scx_bpf_dsq_reenq() that allows re-enqueues on more DSQs. Th= is * will eventually deprecate scx_bpf_reenqueue_local(). */ -void scx_bpf_dsq_reenq___compat(u64 dsq_id, u64 reenq_flags, const struct = bpf_prog_aux *aux__prog) __ksym __weak; +void scx_bpf_dsq_reenq___compat(u64 dsq_id, u64 reenq_flags) __ksym __weak; =20 static inline bool __COMPAT_has_generic_reenq(void) { @@ -415,7 +415,7 @@ static inline bool __COMPAT_has_generic_reenq(void) static inline void scx_bpf_dsq_reenq(u64 dsq_id, u64 reenq_flags) { if (bpf_ksym_exists(scx_bpf_dsq_reenq___compat)) - scx_bpf_dsq_reenq___compat(dsq_id, reenq_flags, NULL); + scx_bpf_dsq_reenq___compat(dsq_id, reenq_flags); else if (dsq_id =3D=3D SCX_DSQ_LOCAL && reenq_flags =3D=3D 0) scx_bpf_reenqueue_local(); else --=20 2.43.0