[PATCH v6 5/5] riscv: Add and use alignment-ignorant memcpy
Evan Green
evan@rivosinc.com
Mon Aug 7 22:30:53 GMT 2023
On Mon, Aug 7, 2023 at 3:21 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Evan Green:
>
> > Right, this is what we had in the previous iteration of this series,
> > and it did work ok. But it wasn't as good since it meant ifunc
> > selectors always got stuck in the null/fallback case and were forced
> > to make the syscall. With this mechanism they get to take advantage of
> > the vDSO.
>
> The system call is only required when the IFUNC resolver is called in
> advance of relocation. In most cases, the ELF dependencies work as
> expected and ensure that the object containing the IFUNC resolver is
> already relocation, and use of the fallback is avoided.
Ah that's true, we did have to go through some hoops with LD_BIND_NOW
and LD_PRELOAD to observe problems. So the cases where the
__riscv_hwprobe_early() approach doesn't get to use the vDSO isn't
"always" as I stated above but "certain exotic cases". I'm still
leaning towards the ifunc parameter (now with inline helper in the
header), but could be convinced to go back to the _early() function if
there's some advantage to it.
-Evan
>
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list