# git rev-parse -q --verify a88603f4b92ecef9e2359e40bcb99ad399d85dd7^{commit} a88603f4b92ecef9e2359e40bcb99ad399d85dd7 already have revision, skipping fetch # git checkout -q -f -B kisskb a88603f4b92ecef9e2359e40bcb99ad399d85dd7 # git clean -qxdf # < git log -1 # commit a88603f4b92ecef9e2359e40bcb99ad399d85dd7 # Author: Michael Ellerman # Date: Thu Jul 29 22:56:36 2021 +1000 # # powerpc/vdso: Don't use r30 to avoid breaking Go lang # # The Go runtime uses r30 for some special value called 'g'. It assumes # that value will remain unchanged even when calling VDSO functions. # Although r30 is non-volatile across function calls, the callee is free # to use it, as long as the callee saves the value and restores it before # returning. # # It used to be true by accident that the VDSO didn't use r30, because the # VDSO was hand-written asm. When we switched to building the VDSO from C # the compiler started using r30, at least in some builds, leading to # crashes in Go. eg: # # ~/go/src$ ./all.bash # Building Go cmd/dist using /usr/lib/go-1.16. (go1.16.2 linux/ppc64le) # Building Go toolchain1 using /usr/lib/go-1.16. # go build os/exec: /usr/lib/go-1.16/pkg/tool/linux_ppc64le/compile: signal: segmentation fault # go build reflect: /usr/lib/go-1.16/pkg/tool/linux_ppc64le/compile: signal: segmentation fault # go tool dist: FAILED: /usr/lib/go-1.16/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/...: exit status 1 # # There are patches in flight to fix Go[1], but until they are released # and widely deployed we can workaround it in the VDSO by avoiding use of # r30. # # Note this only works with GCC, clang does not support -ffixed-rN. # # 1: https://go-review.googlesource.com/c/go/+/328110 # # Fixes: ab037dd87a2f ("powerpc/vdso: Switch VDSO to generic C implementation.") # Cc: stable@vger.kernel.org # v5.11+ # Reported-by: Paul Menzel # Tested-by: Paul Menzel # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20210729131244.2595519-1-mpe@ellerman.id.au # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-ld --version # < git log --format=%s --max-count=1 a88603f4b92ecef9e2359e40bcb99ad399d85dd7 # < make -s -j 48 ARCH=m68k O=/kisskb/build/powerpc-fixes_m68k-defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- defconfig # < make -s -j 48 ARCH=m68k O=/kisskb/build/powerpc-fixes_m68k-defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- help # make -s -j 48 ARCH=m68k O=/kisskb/build/powerpc-fixes_m68k-defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- olddefconfig # make -s -j 48 ARCH=m68k O=/kisskb/build/powerpc-fixes_m68k-defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- /kisskb/src/arch/m68k/mvme147/config.c: In function 'mvme147_hwclk': /kisskb/src/arch/m68k/mvme147/config.c:174:2: warning: #warning check me! [-Wcpp] #warning check me! ^~~~~~~ /kisskb/src/arch/m68k/mvme16x/config.c: In function 'mvme16x_hwclk': /kisskb/src/arch/m68k/mvme16x/config.c:439:2: warning: #warning check me! [-Wcpp] #warning check me! ^~~~~~~ In file included from /kisskb/src/drivers/net/ethernet/8390/xsurf100.c:48: /kisskb/src/drivers/net/ethernet/8390/lib8390.c:995:27: warning: '____alloc_ei_netdev' defined but not used [-Wunused-function] static struct net_device *____alloc_ei_netdev(int size) ^~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/8390/lib8390.c:957:13: warning: '__ei_set_multicast_list' defined but not used [-Wunused-function] static void __ei_set_multicast_list(struct net_device *dev) ^~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/8390/lib8390.c:857:33: warning: '__ei_get_stats' defined but not used [-Wunused-function] static struct net_device_stats *__ei_get_stats(struct net_device *dev) ^~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/8390/lib8390.c:512:13: warning: '__ei_poll' defined but not used [-Wunused-function] static void __ei_poll(struct net_device *dev) ^~~~~~~~~ /kisskb/src/drivers/net/ethernet/8390/lib8390.c:303:20: warning: '__ei_start_xmit' defined but not used [-Wunused-function] static netdev_tx_t __ei_start_xmit(struct sk_buff *skb, ^~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/8390/lib8390.c:257:13: warning: '__ei_tx_timeout' defined but not used [-Wunused-function] static void __ei_tx_timeout(struct net_device *dev, unsigned int txqueue) ^~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/8390/lib8390.c:233:12: warning: '__ei_close' defined but not used [-Wunused-function] static int __ei_close(struct net_device *dev) ^~~~~~~~~~ /kisskb/src/drivers/net/ethernet/8390/lib8390.c:204:12: warning: '__ei_open' defined but not used [-Wunused-function] static int __ei_open(struct net_device *dev) ^~~~~~~~~ Completed OK # rm -rf /kisskb/build/powerpc-fixes_m68k-defconfig_m68k-gcc8 # Build took: 0:02:09.670327