From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E00044BC92 for ; Mon, 24 Aug 2026 16:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787587329; cv=none; b=VV45KZKFhBBujwtKFh/z6kub23PViv8TaQebO4yrkmCHPVsrBUZbYmkFVn0/b31TfMSDMocauhTCZSOQLtWJ1A8UEf6fgAds3XWpIuYYu9bSW7AJj29iPGUmc0J4T1E583inRGjmLNgEniCMmkNph2pPMuyDGw/a4s6e2TCysng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787587329; c=relaxed/simple; bh=hlHQj2wBnEXqNazzXt582e1KKqFOJQ8OIpxXeXE53ac=; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id; b=E4hi84ARkGDV2kt6SA4zl8M6ncVnJXydiZVdhibvntyDu6/pCPwvtGYnxZNx+iu/a8zZbq1FjrRSMiGGDW3wYY6XnLf8+NUT9h/1522Z8DBiJsV0L9CbiN1Ostp2UlK/4JisLZ9YuOg3yC/gek5SRPH9+ZUmlszYaaHykaclVXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cvBcRIPh; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cvBcRIPh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D46791F000E9; Mon, 24 Aug 2026 16:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787587328; bh=0e4WOglfkFRfxRi5UP6TEfI0eZgNWiB84U6ANdK3O50=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=cvBcRIPh5yEY+CWx4af/7aswczCM09o+m1R7XOc7bBPAiF0muvHH4JDNjX4WhpRNc GaE13HNEA3iiUR8IobWom8jZ0sqk7OHV/2i0ZRzJcI7/kzbe1UP3snza3t4r/PJEnn 6uTkKwLD1WwBHBOZLpmgSSV0P9tHQOgqnaUGOIkmgSkMaPTiD2zPzE5DspVT8GG9ye YEyehs0SGTx9fjhdQXH+e8qmLH02WAfKWTZSO4p/m/0yuvOg/F6n0AO0tYddgEbAiq QUEQAFY0le8BaFi9piFYF96pMn+CYyWGuK2lKAu6FoIOBz3P6oHDORrXr+XhVH2UbH 5zizDMkilElTQ== From: sashiko-bot@kernel.org Subject: Re: [PATCH sched_ext/for-7.4] tools/sched_ext: Skip scx_lib_init_probe() without CONFIG_FUNCTION_TRACER Reply-To: sashiko-reviews@lists.linux.dev To: "Cheng-Yang Chou" Cc: sched-ext@lists.linux.dev In-Reply-To: <20260824155051.20841-1-yphbchou0911@gmail.com> References: <20260824155051.20841-1-yphbchou0911@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 24 Aug 2026 16:02:07 +0000 Message-Id: <20260824160207.D46791F000E9@smtp.kernel.org> Precedence: bulk X-Mailing-List: sched-ext@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Medium] The SCX_OPS_LOAD macro introduces a hard compile-time dependency= on `scx_lib_init_probe` existing in the user's BPF skeleton, which will ca= use a C compiler error for schedulers that do not define this probe. -- --- Patch [1]: [PATCH sched_ext/for-7.4] tools/sched_ext: Skip scx_lib_init= _probe() without CONFIG_FUNCTION_TRACER --- commit fc2df7f154a3b0d6909630ef49d7036552669ee3 Author: Cheng-Yang Chou tools/sched_ext: Skip scx_lib_init_probe() without CONFIG_FUNCTION_TRACER This commit updates the SCX_OPS_LOAD macro to conditionally disable autoload for the scx_lib_init_probe program if function tracing is unavailable. It also modifies the post-load loop to skip programs that have autoload disabled. > diff --git a/tools/sched_ext/include/scx/compat.h b/tools/sched_ext/inclu= de/scx/compat.h > --- a/tools/sched_ext/include/scx/compat.h > +++ b/tools/sched_ext/include/scx/compat.h [ ... ] > /* See SCX_OPS_OPEN() above for backward-compatibility handling. */ > #define SCX_OPS_LOAD(__skel, __ops_name, __scx_name, __uei_name) ({ \ > struct bpf_program *__prog; \ > UEI_SET_SIZE(__skel, __ops_name, __uei_name); \ > + if (!__COMPAT_function_tracer_available()) \ > + bpf_program__set_autoload((__skel)->progs.scx_lib_init_probe, false); \ [Severity: Medium] Will this cause a compile-time failure for out-of-tree schedulers that do not include a scx_lib_init_probe program? Skeletons generated by bpftool only contain fields for BPF programs that are actually present in the BPF object. If a user's scheduler skeleton lacks this specific probe, (__skel)->progs.scx_lib_init_probe won't exist in the generated struct and will trigger a C compiler error when invoking this macro. Could this look up the program dynamically using bpf_object__find_program_by_name() at runtime instead, to avoid breaking compilation for schedulers without this probe? > SCX_BUG_ON(__scx_name##__load((__skel)), "Failed to load skel"); \ [ ... ] --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260824155051.2084= 1-1-yphbchou0911@gmail.com?part=3D1