Hi, On 11/5/2024 10:34 AM, Hou Tao wrote: > Hi Ilya, > > On 11/4/2024 6:07 PM, Ilya Leoshkevich wrote: >> On Mon, 2024-11-04 at 09:34 +0800, Hou Tao wrote: >>> Hi, >>> >>> On 11/3/2024 2:04 PM, Byeonguk Jeong wrote: >>>> Hi, >>>> >>>> The selftest "verifier_bits_iter/bad words" has been failed with >>>> retval 115, while I did not touched anything but a comment. >>>> >>>> Do you have any idea why it failed? I am not sure whether it >>>> indicates >>>> any bugs in the kernel. >>>> >>>> Best, >>>> Byeonguk >>> Sorry for the inconvenience. It seems the test case >>> "verifier_bits_iter/bad words" is flaky. It may fail randomly, such >>> as >>> in [1]. I think calling bpf_probe_read_kernel_common() on 3GB addr >>> under >>> s390 host may succeed and the content of the memory address will >>> decide >>> whether the test case will succeed or not. Do not know the reason why >>> reading 3GB address succeeds under s390. Hope to get some insight >>> from >>> Ilya. I think we could fix the failure first by using NULL as the >>> address of bad words just like null_pointer test case does. Will >>> merge >>> the test in bad_words into the null_pointer case. >> Hi, >> >> s390 kernel runs in a completely separate address space, there is no >> user/kernel split at TASK_SIZE. The same address may be valid in both >> the kernel and the user address spaces, there is no way to tell by >> looking at it. The config option related to this property is >> ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE. >> >> Also, unfortunately, 0 is a valid address in the s390 kernel address >> space. > Thanks for the detailed explanation. It seems both arm and x86 have > select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE. >> I wonder if we could use -4095 as an address that cannot be >> dereferenced on all platforms? > I have tested it in both arm64 and x86-64 that reading from -4095 by > using copy_from_kernel_nofault() will return -EFAULT . For s390, I hope > the bpf CI could help to test it. Will post a fix patch later. On s390 host, it seems that using copy_from_kernel_nofault() to read from -4095 returns -EFAULT as well [1], so the suggestion works. Thanks again for the suggestion. [1] https://github.com/kernel-patches/bpf/actions/runs/11677589805/job/32515868794 >> Best regards, >> Ilya > > .