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

From: Alexandre Ghiti
Date: Thu Jul 04 2024 - 07:16:37 EST


Hi Björn,

On 03/07/2024 14:41, Björn Töpel wrote:
Hey Alex,

Alexandre Ghiti <alexghiti@xxxxxxxxxxxx> writes:

Like other architectures, use the common cmd_vdso_check to make sure of
that.

Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
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@xxxxxxxxxxxx>

_______________________________________________
linux-riscv mailing list
linux-riscv@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-riscv