[PATCH] powerpc/vdso: allow r30 in vDSO code generation of getrandom
Christophe Leroy
christophe.leroy at csgroup.eu
Thu Sep 26 04:48:31 AEST 2024
Le 25/09/2024 à 20:38, Jason A. Donenfeld a écrit :
> On Wed, Sep 25, 2024 at 07:50:22PM +0200, Jason A. Donenfeld wrote:
>> For gettimeofday, -ffixed-r30 was passed to work around a bug in Go
>> code, where the vDSO trampoline forgot to save and restore this register
>> across function calls. But Go requires a different trampoline for every
>> call, and there's no reason that new Go code needs to be broken and add
>> more bugs. So remove -ffixed-r30 for getrandom.
>
> Strangely, I am _unable to_ make the Go code not crash with this patch
> applied. I'm not quite sure what I'm doing wrong yet, or if this points
> to another issue.
Do you mean that without this patch the Go code works and with this
patch it crashes ? That's strange taken into account that the chacha
function plays up with r30 regardless of this patch.
Christophe
More information about the Linuxppc-dev
mailing list