Re: [PATCH v2 2/2] tools/sched_ext: scx_sdt: Fix BPF verifier rejection on older LLVMs
From: Zhao mengmeng
Date: Mon Mar 09 2026 - 13:06:44 EST
On March 10, 2026 12:44:56 AM GMT+08:00, Tejun Heo <tj@xxxxxxxxxx> wrote:
>On Mon, Mar 09, 2026 at 12:36:40PM -0400, Emil Tsalapatis wrote:
>> On the other hand, maybe the extra compatibility is worth re-adding
>> cast_kern/cast_user to the code. I am slightly in favor of keeping it
>> as-is to avoid churn, but can easily see why we'd go the other way.
>>
>> @htejun WDYT?
>
>Let's leave it as-is. The main purpose is to serve as an example for future
>arena users. The benefit of keeping it simple trumps over supporting older
>compilers.
>
>thanks.
>
That's reasonable. I was hesitated to send this patch because it actually is a compiler problem, but I also has seen cast_kern/cast_user macros already defined to address the compatible problem. Shall we use __BPF_FEATURE_ADDR_SPACE_CAST to guard the code or check the llvm version before compiling these arena based schedules, or add some information on README? After all, it only demands llvm >=16 in README.md