[PATCH bpf-next v12 1/5] bpf: Move constants blinding out of arch-specific JITs

Xu Kuohai xukuohai at huaweicloud.com
Thu Apr 9 05:27:59 PDT 2026


On 4/4/2026 12:04 AM, Emil Tsalapatis wrote:
>>   	/* Pass 3: Adjust jump offset and write final image */
>>   	if (build_body(&ctx, extra_pass) ||
>> -		WARN_ON_ONCE(ctx.idx != ctx.epilogue_offset)) {
>> -		prog = orig_prog;
>> +		WARN_ON_ONCE(ctx.idx != ctx.epilogue_offset))
> This thunk is slightly different now, the WARN_ON_ONCE() won't be checked
> if build_body() succeeds.

Sorry, I do not see the difference here. The WARN_ON_ONCE() is still checked
when build_body() returns 0 (succeeds) due to the '||' evaluation.

> Do we even need it? AFAICT the only case it
> wouldn't trigger if build_body() fails is if it did so at the very last
> instruction. Alternatively, should we check it if build_body() succeeds
> instead to retain the old behavior?
>
>>   		goto out_free_hdr;
>> -	}
>>   




More information about the linux-arm-kernel mailing list