Bug report: cpu_relax call from vdso space

Denis Ivanov denis.ivanov at cloudbear.ru
Tue Oct 18 09:14:54 PDT 2022


I debugged segmentation fault after nightly regression fails on LTP test 
inotify09 
(https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/inotify/inotify09.c).
In kernel call sequence is following:
__vdso_clock_gettime -> __cvdso_clock_gettime -> 
__cvdso_clock_gettime_data -> __cvdso_clock_gettime_common -> do_hres -> 
cpu_relax

10/18/2022 5:19 PM, Jisheng Zhang пишет:
> On Sat, Oct 15, 2022 at 10:08:55AM +0300, Denis Ivanov wrote:
>> Hello,
>>
>> Segmentation fault may be raised from cpu_relax()
>> (arch/riscv/include/asm/vdso/processor.h).
>>
>> cpu_relax() may be called from vDSO functions (ex: __vdso_clock_gettime).
>> This means that global 'riscv_isa_ext_keys' variable must not be used in
>> cpu_relax() directly.
> Hi,
>
> Could you please share how to reproduce the Segment fault with
> cpu_relax()?
>
> Thanks
>
>> Use of this array was added to cpu_relax() in
>> https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?h=fixes&id=8eb060e10185cfc97ef0200d197ec246ba0f9f8c
>>
>> Denis Ivanov
>>
>>
>> _______________________________________________
>> linux-riscv mailing list
>> linux-riscv at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-riscv



More information about the linux-riscv mailing list