]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
linux: sparc: Fix clone for LEON/sparcv8 (BZ 31394)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 2 Sep 2024 19:58:51 +0000 (16:58 -0300)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 7 Nov 2024 19:56:35 +0000 (20:56 +0100)
The sparc clone mitigation (faeaa3bc9f76030) added the use of
flushw, which is not support by LEON/sparcv8.  As discussed on
the libc-alpha, 'ta 3' is a working alternative [1].

[1] https://sourceware.org/pipermail/libc-alpha/2024-August/158905.html

Checked with a build for sparcv8-linux-gnu targetting leon.

Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
(cherry picked from commit 5e8cfc5d625e6dd000a0371d21d792836ea7951a)

sysdeps/unix/sysv/linux/sparc/sparc32/clone.S

index c9cf9bb055bc0c5cba57d14cbe27d44877e28dd3..c84244f56bd396ac8f1adc468b7181feb5c31bd9 100644 (file)
 ENTRY (__clone)
        save    %sp,-96,%sp
        save    %sp,-96,%sp
+#ifdef __sparcv9
        flushw
+#else
+       ta 3
+#endif
        restore
        cfi_def_cfa_register(%fp)
        cfi_window_save