]> git.dujemihanovic.xyz Git - linux.git/commitdiff
powerpc/vdso: allow r30 in vDSO code generation of getrandom
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 25 Sep 2024 17:50:22 +0000 (19:50 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 30 Sep 2024 09:19:43 +0000 (19:19 +1000)
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.

Fixes: 8072b39c3a75 ("powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO64")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240925175021.1526936-2-Jason@zx2c4.com
arch/powerpc/kernel/vdso/Makefile

index 56fb1633529a728799e45c3152026cab7c100f4c..31ca5a5470047e7ac0a0f8194fd59c6a3b453b4d 100644 (file)
@@ -22,7 +22,7 @@ endif
 
 ifneq ($(c-getrandom-y),)
   CFLAGS_vgetrandom-32.o += -include $(c-getrandom-y)
-  CFLAGS_vgetrandom-64.o += -include $(c-getrandom-y) $(call cc-option, -ffixed-r30)
+  CFLAGS_vgetrandom-64.o += -include $(c-getrandom-y)
 endif
 
 # Build rules