Re: [PATCH bpf-next v7 9/9] selftests/bpf: add tests to validate KASAN on JIT programs
From: Alexis Lothoré
Date: Wed Aug 26 2026 - 14:24:18 EST
Hi Kumar,
On Mon Aug 24, 2026 at 12:53 AM CEST, Kumar Kartikeya Dwivedi wrote:
> On Mon Aug 24, 2026 at 12:40 AM CEST, Kumar Kartikeya Dwivedi wrote:
>> On Sat Aug 22, 2026 at 12:39 AM CEST, Alexis Lothoré (eBPF Foundation) wrote:
[...]
>>> #171 kasan:OK (SKIP: 16/54)
>>> Summary: 1/38 PASSED, 16 SKIPPED, 0 FAILED
>>>
>>> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@xxxxxxxxxxx>
>>> ---
>>
>> 1. Should this test be made serial to make sure bpf_jit_harden sysctl change
>> doesn't affect other tests?
Indeed, that makes sense, I'll flag it as serial.
>> 2. Clang currently collapses the intended ST/STX distinction for *_on_stack
>> tests: default/v3 emits STX for both pairs, cpuv4 emits ST for both, and the
>> default st_blinded object is already STX and therefore is not blinded. Please
>> check and assert that xlated insns are correct in the test itself if possible.
>> It might be necessary to use asm volatile assembly blocks in case you cannot
>> work around the compiler in C.
Ah, good catch, thanks. For the blinding test, I really checked that the
blinding is inserted, and re-running this again, it looks like I have
been fooled; there's indeed some blinding inserted, but not on ST/STX
> For 2, I guess as a whole you still get coverage, since we run with both cpu
> versions in CI. So it should be fine I guess, for the blinded case too, but
> perhaps it would still make sense and be clearer to verify and only enable st
> case for v4, and force stx to remain stx on v4.
Ok, I'll update the test so that ST/STX/st blinding are correcly skipped
depending on the CPU version.
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com