[PATCH] riscv: Check that vdso does not contain any dynamic relocations

Alexandre Ghiti alex at ghiti.fr
Thu Jul 4 04:16:25 PDT 2024


Hi Björn,

On 03/07/2024 14:41, Björn Töpel wrote:
> Hey Alex,
>
> Alexandre Ghiti <alexghiti at rivosinc.com> writes:
>
>> Like other architectures, use the common cmd_vdso_check to make sure of
>> that.
>>
>> Signed-off-by: Alexandre Ghiti <alexghiti at rivosinc.com>
> Looking in PW, this fails on rv32? Is that a false negative?


I had missed that, thanks.

So it's not a false positive, the check this patch adds actually reveals 
an issue: gcc seems to be smart enough to insert a memset() in 
riscv_vdso_get_cpus(). And this call to memset() inserts a relocation. 
Weirdly, only on rv32.

I managed to fix this by adding:

ccflags-y += -fno-tree-loop-distribute-patterns

I'll send this fix soon.

Thanks,


>
> Other than that,
> Reviewed-by: Björn Töpel <bjorn at rivosinc.com>
>
> _______________________________________________
> 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