From 12b5a18bad09b1267c83c0f889e707b16dbb999d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 9 Apr 2021 16:35:39 +0200 Subject: [PATCH 01/11] Update to go1.16.3 Resolves: rhbz#1945768 --- .gitignore | 1 + golang.spec | 13 ++++++++----- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index c0b9742..1067d19 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ /go1.16beta1.src.tar.gz /go1.16rc1.src.tar.gz /go1.16.src.tar.gz +/go1.16.3.src.tar.gz diff --git a/golang.spec b/golang.spec index 81a4843..e51b5b1 100644 --- a/golang.spec +++ b/golang.spec @@ -106,15 +106,14 @@ %endif %global go_api 1.16 -#global go_prerelease {nil} -%global go_version %{go_api}%{?go_prerelease} +%global go_version 1.16.3 # For rpmdev-bumpspec and releng automation -%global baserelease 2 +%global baserelease 1 Name: golang -Version: 1.16 -Release: %{?go_prerelease:0.%{go_prerelease}.}%{baserelease}%{?dist} +Version: %{go_version} +Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain License: BSD and Public Domain @@ -530,6 +529,10 @@ fi %endif %changelog +* Fri Apr 09 2021 Alejandro Sáez - 1.16.3-1 +- Update to go1.16.3 +- Resolves: rhbz#1945768 + * Tue Mar 23 2021 Alejandro Sáez - 1.16-2 - Update to go1.16.2 - Resolves: rhbz#1937435 diff --git a/sources b/sources index a6e7561..ada039f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.src.tar.gz) = 9c43e0ebb2d35c694b652cae8d4040ce3f3c8c014abd9496c92c78cc015ecea5b5331e7c2acf098d0c24dec222454ea09d834df4b6bc90d46e9feeac0ac578bf +SHA512 (go1.16.3.src.tar.gz) = 8808a3112a5bc89799491ed1aa1cb8744a5cc8d3cb5caa2a7dd711405266925093f90d437fccb66a48e5f994c7339077814f495a88baa7961e9cc9b0a6a838c7 From 506a828653648609c2ab8a318388e25fd39d532c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Mon, 10 May 2021 11:07:59 +0200 Subject: [PATCH 02/11] Update to go1.16.4 --- .gitignore | 1 + golang.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1067d19..030e93b 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,4 @@ /go1.16rc1.src.tar.gz /go1.16.src.tar.gz /go1.16.3.src.tar.gz +/go1.16.4.src.tar.gz diff --git a/golang.spec b/golang.spec index e51b5b1..ba4882a 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ %endif %global go_api 1.16 -%global go_version 1.16.3 +%global go_version 1.16.4 # For rpmdev-bumpspec and releng automation %global baserelease 1 @@ -529,6 +529,9 @@ fi %endif %changelog +* Mon May 10 2021 Alejandro Sáez - 1.16.4-1 +- Update to go1.16.4 + * Fri Apr 09 2021 Alejandro Sáez - 1.16.3-1 - Update to go1.16.3 - Resolves: rhbz#1945768 diff --git a/sources b/sources index ada039f..1f4e500 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.3.src.tar.gz) = 8808a3112a5bc89799491ed1aa1cb8744a5cc8d3cb5caa2a7dd711405266925093f90d437fccb66a48e5f994c7339077814f495a88baa7961e9cc9b0a6a838c7 +SHA512 (go1.16.4.src.tar.gz) = e1b64610e22e657d9c65094e679cec50f59ff338c0ef102e54debcced1bc032390122456451fffb2d26d45c6db2f55bb9ef7f56ce479f6f1c2c2e6cc49442d86 From 05423e8f8bae2691c738a5e791b053d2a8edaae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Mon, 21 Jun 2021 21:17:50 +0200 Subject: [PATCH 03/11] Removes already merged patch --- golang.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/golang.spec b/golang.spec index cf33276..ccf6e2a 100644 --- a/golang.spec +++ b/golang.spec @@ -158,8 +158,6 @@ Requires: go-srpm-macros Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch Patch3: 0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch -# Scheduled backport for go1.16 https://golang.org/cl/316750 by laboger -# Patch4: ppc64x-linker-fix.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 From 5a1f015009125e0444b853f3a471d870338d2fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 29 Jul 2021 10:26:28 +0200 Subject: [PATCH 04/11] - Fix crash in VDSO calls on ppc64le --- golang.spec | 7 +- ppc64le-vdso-fix.patch | 227 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 ppc64le-vdso-fix.patch diff --git a/golang.spec b/golang.spec index cd1fcb7..6004ffa 100644 --- a/golang.spec +++ b/golang.spec @@ -109,7 +109,7 @@ %global go_version %{go_api}.6 # For rpmdev-bumpspec and releng automation -%global baserelease 1 +%global baserelease 2 Name: golang Version: %{go_version} @@ -158,6 +158,8 @@ Requires: go-srpm-macros Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch Patch3: 0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch +# https://go-review.googlesource.com/c/go/+/334410/ +Patch4: ppc64le-vdso-fix.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -529,6 +531,9 @@ fi %endif %changelog +* Thu Jul 29 2021 Jakub Čajka - 1.16.6-2 +- fix crash in VDSO calls on ppc64le with new kernels + * Wed Jul 14 2021 Mike Rochefort - 1.16.6-1 - Update to go1.16.6 - Security fix for CVE-2021-34558 diff --git a/ppc64le-vdso-fix.patch b/ppc64le-vdso-fix.patch new file mode 100644 index 0000000..0d9fe6f --- /dev/null +++ b/ppc64le-vdso-fix.patch @@ -0,0 +1,227 @@ +From 7cb7ce3cfae172ff7b128592c3ca9ac591b0f7cb Mon Sep 17 00:00:00 2001 +From: Derek Parker +Date: Thu, 17 Jun 2021 20:22:40 +0000 +Subject: [PATCH] [release-branch.go1.16] runtime: fix crash during VDSO calls on PowerPC + +This patch reinstates a fix for PowerPC with regard to making VDSO calls +while receiving a signal, and subsequently crashing. The crash happens +because certain VDSO calls can modify the r30 register, which is where g +is stored. This change was reverted for PowerPC because r30 is supposed +to be a non-volatile register. This is true, but that only makes a +guarantee across function calls, but not "within" a function call. This +patch was seemingly fine before because the Linux kernel still had hand +rolled assembly VDSO function calls, however with a recent change to C +function calls it seems the compiler used can generate instructions +which temporarily clobber r30. This means that when we receive a signal +during one of these calls the value of r30 will not be the g as the +runtime expects, causing a segfault. + +You can see from this assembly dump how the register is clobbered during +the call: + +(the following is from a 5.13rc2 kernel) + +``` +Dump of assembler code for function __cvdso_clock_gettime_data: + 0x00007ffff7ff0700 <+0>: cmplwi r4,15 + 0x00007ffff7ff0704 <+4>: bgt 0x7ffff7ff07f0 <__cvdso_clock_gettime_data+240> + 0x00007ffff7ff0708 <+8>: li r9,1 + 0x00007ffff7ff070c <+12>: slw r9,r9,r4 + 0x00007ffff7ff0710 <+16>: andi. r10,r9,2179 + 0x00007ffff7ff0714 <+20>: beq 0x7ffff7ff0810 <__cvdso_clock_gettime_data+272> + 0x00007ffff7ff0718 <+24>: rldicr r10,r4,4,59 + 0x00007ffff7ff071c <+28>: lis r9,32767 + 0x00007ffff7ff0720 <+32>: std r30,-16(r1) + 0x00007ffff7ff0724 <+36>: std r31,-8(r1) + 0x00007ffff7ff0728 <+40>: add r6,r3,r10 + 0x00007ffff7ff072c <+44>: ori r4,r9,65535 + 0x00007ffff7ff0730 <+48>: lwz r8,0(r3) + 0x00007ffff7ff0734 <+52>: andi. r9,r8,1 + 0x00007ffff7ff0738 <+56>: bne 0x7ffff7ff07d0 <__cvdso_clock_gettime_data+208> + 0x00007ffff7ff073c <+60>: lwsync + 0x00007ffff7ff0740 <+64>: mftb r30 <---- RIGHT HERE +=> 0x00007ffff7ff0744 <+68>: ld r12,40(r6) +``` + +What I believe is happening is that the kernel changed the PowerPC VDSO +calls to use standard C calls instead of using hand rolled assembly. The +hand rolled assembly calls never touched r30, so this change was safe to +roll back. That does not seem to be the case anymore as on the 5.13rc2 +kernel the compiler *is* generating assembly which modifies r30, making +this change again unsafe and causing a crash when the program receives a +signal during these calls (which will happen often due to async +preempt). This change happened here: +https://lwn.net/ml/linux-kernel/235e5571959cfa89ced081d7e838ed5ff38447d2.1601365870.git.christophe.leroy@csgroup.eu/. + +I realize this was reverted due to unexplained hangs in PowerPC +builders, but I think we should reinstate this change and investigate +those issues separately: +https://github.com/golang/go/commit/f4ca3c1e0a2066ca4f7bd6203866d282ed34acf2 + +Fixes #46858 + +Change-Id: Ib18d7bbfc80a1a9cb558f0098878d41081324b52 +GitHub-Last-Rev: c3002bcfca3ef58b27485e31328e6297b7a9dfe7 +GitHub-Pull-Request: golang/go#46767 +Reviewed-on: https://go-review.googlesource.com/c/go/+/328110 +Run-TryBot: Lynn Boger +TryBot-Result: Go Bot +Reviewed-by: Cherry Mui +Trust: Lynn Boger +(cherry picked from commit 16e82be454cbf41299e6a055d54d489ca4612ee0) +--- + +diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go +index 3f70707..89f936e 100644 +--- a/src/runtime/signal_unix.go ++++ b/src/runtime/signal_unix.go +@@ -381,7 +381,7 @@ + //go:nosplit + func sigFetchG(c *sigctxt) *g { + switch GOARCH { +- case "arm", "arm64": ++ case "arm", "arm64", "ppc64", "ppc64le": + if !iscgo && inVDSOPage(c.sigpc()) { + // When using cgo, we save the g on TLS and load it from there + // in sigtramp. Just use that. +diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s +index fd69ee7..7be8c4c 100644 +--- a/src/runtime/sys_linux_ppc64x.s ++++ b/src/runtime/sys_linux_ppc64x.s +@@ -215,15 +215,45 @@ + MOVD (g_sched+gobuf_sp)(R7), R1 // Set SP to g0 stack + + noswitch: +- SUB $16, R1 // Space for results +- RLDICR $0, R1, $59, R1 // Align for C code ++ SUB $16, R1 // Space for results ++ RLDICR $0, R1, $59, R1 // Align for C code + MOVD R12, CTR + MOVD R1, R4 +- BL (CTR) // Call from VDSO +- MOVD $0, R0 // Restore R0 +- MOVD 0(R1), R3 // sec +- MOVD 8(R1), R5 // nsec +- MOVD R15, R1 // Restore SP ++ ++ // Store g on gsignal's stack, so if we receive a signal ++ // during VDSO code we can find the g. ++ // If we don't have a signal stack, we won't receive signal, ++ // so don't bother saving g. ++ // When using cgo, we already saved g on TLS, also don't save ++ // g here. ++ // Also don't save g if we are already on the signal stack. ++ // We won't get a nested signal. ++ MOVBZ runtime·iscgo(SB), R22 ++ CMP R22, $0 ++ BNE nosaveg ++ MOVD m_gsignal(R21), R22 // g.m.gsignal ++ CMP R22, $0 ++ BEQ nosaveg ++ ++ CMP g, R22 ++ BEQ nosaveg ++ MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo ++ MOVD g, (R22) ++ ++ BL (CTR) // Call from VDSO ++ ++ MOVD $0, (R22) // clear g slot, R22 is unchanged by C code ++ ++ JMP finish ++ ++nosaveg: ++ BL (CTR) // Call from VDSO ++ ++finish: ++ MOVD $0, R0 // Restore R0 ++ MOVD 0(R1), R3 // sec ++ MOVD 8(R1), R5 // nsec ++ MOVD R15, R1 // Restore SP + + // Restore vdsoPC, vdsoSP + // We don't worry about being signaled between the two stores. +@@ -235,7 +265,7 @@ + MOVD 32(R1), R6 + MOVD R6, m_vdsoPC(R21) + +-finish: ++return: + MOVD R3, sec+0(FP) + MOVW R5, nsec+8(FP) + RET +@@ -246,7 +276,7 @@ + SYSCALL $SYS_clock_gettime + MOVD 32(R1), R3 + MOVD 40(R1), R5 +- JMP finish ++ JMP return + + TEXT runtime·nanotime1(SB),NOSPLIT,$16-8 + MOVD $1, R3 // CLOCK_MONOTONIC +@@ -282,7 +312,37 @@ + RLDICR $0, R1, $59, R1 // Align for C code + MOVD R12, CTR + MOVD R1, R4 +- BL (CTR) // Call from VDSO ++ ++ // Store g on gsignal's stack, so if we receive a signal ++ // during VDSO code we can find the g. ++ // If we don't have a signal stack, we won't receive signal, ++ // so don't bother saving g. ++ // When using cgo, we already saved g on TLS, also don't save ++ // g here. ++ // Also don't save g if we are already on the signal stack. ++ // We won't get a nested signal. ++ MOVBZ runtime·iscgo(SB), R22 ++ CMP R22, $0 ++ BNE nosaveg ++ MOVD m_gsignal(R21), R22 // g.m.gsignal ++ CMP R22, $0 ++ BEQ nosaveg ++ ++ CMP g, R22 ++ BEQ nosaveg ++ MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo ++ MOVD g, (R22) ++ ++ BL (CTR) // Call from VDSO ++ ++ MOVD $0, (R22) // clear g slot, R22 is unchanged by C code ++ ++ JMP finish ++ ++nosaveg: ++ BL (CTR) // Call from VDSO ++ ++finish: + MOVD $0, R0 // Restore R0 + MOVD 0(R1), R3 // sec + MOVD 8(R1), R5 // nsec +@@ -298,7 +358,7 @@ + MOVD 32(R1), R6 + MOVD R6, m_vdsoPC(R21) + +-finish: ++return: + // sec is in R3, nsec in R5 + // return nsec in R3 + MOVD $1000000000, R4 +@@ -313,7 +373,7 @@ + SYSCALL $SYS_clock_gettime + MOVD 32(R1), R3 + MOVD 40(R1), R5 +- JMP finish ++ JMP return + + TEXT runtime·rtsigprocmask(SB),NOSPLIT|NOFRAME,$0-28 + MOVW how+0(FP), R3 +@@ -366,7 +426,7 @@ + // this might be called in external code context, + // where g is not set. + MOVBZ runtime·iscgo(SB), R6 +- CMP R6, $0 ++ CMP R6, $0 + BEQ 2(PC) + BL runtime·load_g(SB) + From de67d2cc083a9cea31138245ff299730a54412ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 10 Sep 2021 20:00:57 +0200 Subject: [PATCH 05/11] Update to go1.16.8 Remove patch: ppc64le-vdso-fix.patch Related: rhbz#1937911 Related: rhbz#1999415 --- .gitignore | 1 + golang.spec | 12 ++- ppc64le-vdso-fix.patch | 227 ----------------------------------------- sources | 2 +- 4 files changed, 10 insertions(+), 232 deletions(-) delete mode 100644 ppc64le-vdso-fix.patch diff --git a/.gitignore b/.gitignore index 72c275e..9a2c8c8 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,4 @@ /go1.16.4.src.tar.gz /go1.16.5.src.tar.gz /go1.16.6.src.tar.gz +/go1.16.8.src.tar.gz diff --git a/golang.spec b/golang.spec index 6004ffa..c94655d 100644 --- a/golang.spec +++ b/golang.spec @@ -106,10 +106,10 @@ %endif %global go_api 1.16 -%global go_version %{go_api}.6 +%global go_version %{go_api}.8 # For rpmdev-bumpspec and releng automation -%global baserelease 2 +%global baserelease 1 Name: golang Version: %{go_version} @@ -158,8 +158,6 @@ Requires: go-srpm-macros Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch Patch3: 0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch -# https://go-review.googlesource.com/c/go/+/334410/ -Patch4: ppc64le-vdso-fix.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -531,6 +529,12 @@ fi %endif %changelog +* Fri Sep 10 2021 Alejandro Sáez - 1.16.8-1 +- Update to go1.16.8 +- Remove patch: ppc64le-vdso-fix.patch +- Related: rhbz#1937911 +- Related: rhbz#1999415 + * Thu Jul 29 2021 Jakub Čajka - 1.16.6-2 - fix crash in VDSO calls on ppc64le with new kernels diff --git a/ppc64le-vdso-fix.patch b/ppc64le-vdso-fix.patch deleted file mode 100644 index 0d9fe6f..0000000 --- a/ppc64le-vdso-fix.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 7cb7ce3cfae172ff7b128592c3ca9ac591b0f7cb Mon Sep 17 00:00:00 2001 -From: Derek Parker -Date: Thu, 17 Jun 2021 20:22:40 +0000 -Subject: [PATCH] [release-branch.go1.16] runtime: fix crash during VDSO calls on PowerPC - -This patch reinstates a fix for PowerPC with regard to making VDSO calls -while receiving a signal, and subsequently crashing. The crash happens -because certain VDSO calls can modify the r30 register, which is where g -is stored. This change was reverted for PowerPC because r30 is supposed -to be a non-volatile register. This is true, but that only makes a -guarantee across function calls, but not "within" a function call. This -patch was seemingly fine before because the Linux kernel still had hand -rolled assembly VDSO function calls, however with a recent change to C -function calls it seems the compiler used can generate instructions -which temporarily clobber r30. This means that when we receive a signal -during one of these calls the value of r30 will not be the g as the -runtime expects, causing a segfault. - -You can see from this assembly dump how the register is clobbered during -the call: - -(the following is from a 5.13rc2 kernel) - -``` -Dump of assembler code for function __cvdso_clock_gettime_data: - 0x00007ffff7ff0700 <+0>: cmplwi r4,15 - 0x00007ffff7ff0704 <+4>: bgt 0x7ffff7ff07f0 <__cvdso_clock_gettime_data+240> - 0x00007ffff7ff0708 <+8>: li r9,1 - 0x00007ffff7ff070c <+12>: slw r9,r9,r4 - 0x00007ffff7ff0710 <+16>: andi. r10,r9,2179 - 0x00007ffff7ff0714 <+20>: beq 0x7ffff7ff0810 <__cvdso_clock_gettime_data+272> - 0x00007ffff7ff0718 <+24>: rldicr r10,r4,4,59 - 0x00007ffff7ff071c <+28>: lis r9,32767 - 0x00007ffff7ff0720 <+32>: std r30,-16(r1) - 0x00007ffff7ff0724 <+36>: std r31,-8(r1) - 0x00007ffff7ff0728 <+40>: add r6,r3,r10 - 0x00007ffff7ff072c <+44>: ori r4,r9,65535 - 0x00007ffff7ff0730 <+48>: lwz r8,0(r3) - 0x00007ffff7ff0734 <+52>: andi. r9,r8,1 - 0x00007ffff7ff0738 <+56>: bne 0x7ffff7ff07d0 <__cvdso_clock_gettime_data+208> - 0x00007ffff7ff073c <+60>: lwsync - 0x00007ffff7ff0740 <+64>: mftb r30 <---- RIGHT HERE -=> 0x00007ffff7ff0744 <+68>: ld r12,40(r6) -``` - -What I believe is happening is that the kernel changed the PowerPC VDSO -calls to use standard C calls instead of using hand rolled assembly. The -hand rolled assembly calls never touched r30, so this change was safe to -roll back. That does not seem to be the case anymore as on the 5.13rc2 -kernel the compiler *is* generating assembly which modifies r30, making -this change again unsafe and causing a crash when the program receives a -signal during these calls (which will happen often due to async -preempt). This change happened here: -https://lwn.net/ml/linux-kernel/235e5571959cfa89ced081d7e838ed5ff38447d2.1601365870.git.christophe.leroy@csgroup.eu/. - -I realize this was reverted due to unexplained hangs in PowerPC -builders, but I think we should reinstate this change and investigate -those issues separately: -https://github.com/golang/go/commit/f4ca3c1e0a2066ca4f7bd6203866d282ed34acf2 - -Fixes #46858 - -Change-Id: Ib18d7bbfc80a1a9cb558f0098878d41081324b52 -GitHub-Last-Rev: c3002bcfca3ef58b27485e31328e6297b7a9dfe7 -GitHub-Pull-Request: golang/go#46767 -Reviewed-on: https://go-review.googlesource.com/c/go/+/328110 -Run-TryBot: Lynn Boger -TryBot-Result: Go Bot -Reviewed-by: Cherry Mui -Trust: Lynn Boger -(cherry picked from commit 16e82be454cbf41299e6a055d54d489ca4612ee0) ---- - -diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go -index 3f70707..89f936e 100644 ---- a/src/runtime/signal_unix.go -+++ b/src/runtime/signal_unix.go -@@ -381,7 +381,7 @@ - //go:nosplit - func sigFetchG(c *sigctxt) *g { - switch GOARCH { -- case "arm", "arm64": -+ case "arm", "arm64", "ppc64", "ppc64le": - if !iscgo && inVDSOPage(c.sigpc()) { - // When using cgo, we save the g on TLS and load it from there - // in sigtramp. Just use that. -diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s -index fd69ee7..7be8c4c 100644 ---- a/src/runtime/sys_linux_ppc64x.s -+++ b/src/runtime/sys_linux_ppc64x.s -@@ -215,15 +215,45 @@ - MOVD (g_sched+gobuf_sp)(R7), R1 // Set SP to g0 stack - - noswitch: -- SUB $16, R1 // Space for results -- RLDICR $0, R1, $59, R1 // Align for C code -+ SUB $16, R1 // Space for results -+ RLDICR $0, R1, $59, R1 // Align for C code - MOVD R12, CTR - MOVD R1, R4 -- BL (CTR) // Call from VDSO -- MOVD $0, R0 // Restore R0 -- MOVD 0(R1), R3 // sec -- MOVD 8(R1), R5 // nsec -- MOVD R15, R1 // Restore SP -+ -+ // Store g on gsignal's stack, so if we receive a signal -+ // during VDSO code we can find the g. -+ // If we don't have a signal stack, we won't receive signal, -+ // so don't bother saving g. -+ // When using cgo, we already saved g on TLS, also don't save -+ // g here. -+ // Also don't save g if we are already on the signal stack. -+ // We won't get a nested signal. -+ MOVBZ runtime·iscgo(SB), R22 -+ CMP R22, $0 -+ BNE nosaveg -+ MOVD m_gsignal(R21), R22 // g.m.gsignal -+ CMP R22, $0 -+ BEQ nosaveg -+ -+ CMP g, R22 -+ BEQ nosaveg -+ MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo -+ MOVD g, (R22) -+ -+ BL (CTR) // Call from VDSO -+ -+ MOVD $0, (R22) // clear g slot, R22 is unchanged by C code -+ -+ JMP finish -+ -+nosaveg: -+ BL (CTR) // Call from VDSO -+ -+finish: -+ MOVD $0, R0 // Restore R0 -+ MOVD 0(R1), R3 // sec -+ MOVD 8(R1), R5 // nsec -+ MOVD R15, R1 // Restore SP - - // Restore vdsoPC, vdsoSP - // We don't worry about being signaled between the two stores. -@@ -235,7 +265,7 @@ - MOVD 32(R1), R6 - MOVD R6, m_vdsoPC(R21) - --finish: -+return: - MOVD R3, sec+0(FP) - MOVW R5, nsec+8(FP) - RET -@@ -246,7 +276,7 @@ - SYSCALL $SYS_clock_gettime - MOVD 32(R1), R3 - MOVD 40(R1), R5 -- JMP finish -+ JMP return - - TEXT runtime·nanotime1(SB),NOSPLIT,$16-8 - MOVD $1, R3 // CLOCK_MONOTONIC -@@ -282,7 +312,37 @@ - RLDICR $0, R1, $59, R1 // Align for C code - MOVD R12, CTR - MOVD R1, R4 -- BL (CTR) // Call from VDSO -+ -+ // Store g on gsignal's stack, so if we receive a signal -+ // during VDSO code we can find the g. -+ // If we don't have a signal stack, we won't receive signal, -+ // so don't bother saving g. -+ // When using cgo, we already saved g on TLS, also don't save -+ // g here. -+ // Also don't save g if we are already on the signal stack. -+ // We won't get a nested signal. -+ MOVBZ runtime·iscgo(SB), R22 -+ CMP R22, $0 -+ BNE nosaveg -+ MOVD m_gsignal(R21), R22 // g.m.gsignal -+ CMP R22, $0 -+ BEQ nosaveg -+ -+ CMP g, R22 -+ BEQ nosaveg -+ MOVD (g_stack+stack_lo)(R22), R22 // g.m.gsignal.stack.lo -+ MOVD g, (R22) -+ -+ BL (CTR) // Call from VDSO -+ -+ MOVD $0, (R22) // clear g slot, R22 is unchanged by C code -+ -+ JMP finish -+ -+nosaveg: -+ BL (CTR) // Call from VDSO -+ -+finish: - MOVD $0, R0 // Restore R0 - MOVD 0(R1), R3 // sec - MOVD 8(R1), R5 // nsec -@@ -298,7 +358,7 @@ - MOVD 32(R1), R6 - MOVD R6, m_vdsoPC(R21) - --finish: -+return: - // sec is in R3, nsec in R5 - // return nsec in R3 - MOVD $1000000000, R4 -@@ -313,7 +373,7 @@ - SYSCALL $SYS_clock_gettime - MOVD 32(R1), R3 - MOVD 40(R1), R5 -- JMP finish -+ JMP return - - TEXT runtime·rtsigprocmask(SB),NOSPLIT|NOFRAME,$0-28 - MOVW how+0(FP), R3 -@@ -366,7 +426,7 @@ - // this might be called in external code context, - // where g is not set. - MOVBZ runtime·iscgo(SB), R6 -- CMP R6, $0 -+ CMP R6, $0 - BEQ 2(PC) - BL runtime·load_g(SB) - diff --git a/sources b/sources index d551505..2bff3b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.6.src.tar.gz) = 82634763dce636c9e9cba1bbf74a669e8b88e6df095e80672f295edb82cc1fc4b8ffde91a1f56c3470f2c4d9ee0404f65146d7478b645890623f6c463513a61f +SHA512 (go1.16.8.src.tar.gz) = 49b3b341ee3dbf2964f8e938a6d797a48e4b46e19c6c6f240038cd48c8668b76982f0c9c61e38bfdc42eb03db72d125457905cba76589d1d7d2f825bc67587e3 From 6951b42b2e78aa79a9ed5469c1af296bca9891d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 12 Nov 2021 19:01:11 +0100 Subject: [PATCH 06/11] Update to go1.16.10 --- .gitignore | 1 + golang.spec | 8 +++++++- sources | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9a2c8c8..fea2670 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ /go1.16.5.src.tar.gz /go1.16.6.src.tar.gz /go1.16.8.src.tar.gz +/go1.16.10.src.tar.gz diff --git a/golang.spec b/golang.spec index c94655d..f3c53b3 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ %endif %global go_api 1.16 -%global go_version %{go_api}.8 +%global go_version %{go_api}.10 # For rpmdev-bumpspec and releng automation %global baserelease 1 @@ -529,6 +529,12 @@ fi %endif %changelog +* Fri Nov 12 2021 Alejandro Sáez - 1.16.10-1 +- Update to go1.16.10 + +* Mon Sep 13 2021 Alejandro Sáez - 1.16.8-2 +- Fix patch + * Fri Sep 10 2021 Alejandro Sáez - 1.16.8-1 - Update to go1.16.8 - Remove patch: ppc64le-vdso-fix.patch diff --git a/sources b/sources index 2bff3b5..ad03a10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.8.src.tar.gz) = 49b3b341ee3dbf2964f8e938a6d797a48e4b46e19c6c6f240038cd48c8668b76982f0c9c61e38bfdc42eb03db72d125457905cba76589d1d7d2f825bc67587e3 +SHA512 (go1.16.10.src.tar.gz) = d12753bd7973beb7ab047a189bd0d7132b5ab8c35e943b12388289d59f9becaefb858d37cfcb808c1e12f3e06c883ef170d98ed99449e9beda636cab9bfff2b6 From fea239410c1ea0dde3fe57e4048a2727befff82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Tue, 7 Dec 2021 16:27:51 +0100 Subject: [PATCH 07/11] Update to go1.16.11 Related: rhbz#2020739 Related: rhbz#2020728 Related: rhbz#2014923 Related: rhbz#2006045 --- .gitignore | 1 + golang.spec | 9 ++++++++- sources | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fea2670..1b6880e 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ /go1.16.6.src.tar.gz /go1.16.8.src.tar.gz /go1.16.10.src.tar.gz +/go1.16.11.src.tar.gz diff --git a/golang.spec b/golang.spec index f3c53b3..39e6717 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ %endif %global go_api 1.16 -%global go_version %{go_api}.10 +%global go_version %{go_api}.11 # For rpmdev-bumpspec and releng automation %global baserelease 1 @@ -529,6 +529,13 @@ fi %endif %changelog +* Tue Dec 07 2021 Alejandro Sáez - 1.16.11-1 +- Update to go1.16.11 +- Related: rhbz#2020739 +- Related: rhbz#2020728 +- Related: rhbz#2014923 +- Related: rhbz#2006045 + * Fri Nov 12 2021 Alejandro Sáez - 1.16.10-1 - Update to go1.16.10 diff --git a/sources b/sources index ad03a10..c8c9d06 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.10.src.tar.gz) = d12753bd7973beb7ab047a189bd0d7132b5ab8c35e943b12388289d59f9becaefb858d37cfcb808c1e12f3e06c883ef170d98ed99449e9beda636cab9bfff2b6 +SHA512 (go1.16.11.src.tar.gz) = bf3ed7d95945f3afa92478e737e1782078419165f2d9f76b21b8f144c2ba529cf7a3665da1f46c7633721fe5eb67bdf848dd5b30440b6f86a12f5acd2766abbd From beab6942fb4b7f615ba270a69a445590c02f646b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Tue, 21 Dec 2021 10:36:48 +0100 Subject: [PATCH 08/11] Update to go1.16.12 Resolves: rhbz#2030810 Resolves: rhbz#2030804 --- .gitignore | 1 + golang.spec | 7 ++++++- sources | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1b6880e..602b024 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ /go1.16.8.src.tar.gz /go1.16.10.src.tar.gz /go1.16.11.src.tar.gz +/go1.16.12.src.tar.gz diff --git a/golang.spec b/golang.spec index 39e6717..3f514b6 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ %endif %global go_api 1.16 -%global go_version %{go_api}.11 +%global go_version %{go_api}.12 # For rpmdev-bumpspec and releng automation %global baserelease 1 @@ -529,6 +529,11 @@ fi %endif %changelog +* Tue Dec 21 2021 Alejandro Sáez - 1.16.12-1 +- Update to go1.16.12 +- Resolves: rhbz#2030810 +- Resolves: rhbz#2030804 + * Tue Dec 07 2021 Alejandro Sáez - 1.16.11-1 - Update to go1.16.11 - Related: rhbz#2020739 diff --git a/sources b/sources index c8c9d06..9118a69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.11.src.tar.gz) = bf3ed7d95945f3afa92478e737e1782078419165f2d9f76b21b8f144c2ba529cf7a3665da1f46c7633721fe5eb67bdf848dd5b30440b6f86a12f5acd2766abbd +SHA512 (go1.16.12.src.tar.gz) = 01a641b1c52890ff375f62761db4d87f7207297c7971951ba9305aa99313b5ba3014cb7555096a8fd04c97c208d2432d71d94aa9134d1617f8bedb203aa91b58 From aa1fee4c817173dabe056caaf8c31aff11070457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 7 Jan 2022 14:44:47 +0100 Subject: [PATCH 09/11] Update to go1.16.13 --- .gitignore | 1 + golang.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 602b024..9f121bb 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,4 @@ /go1.16.10.src.tar.gz /go1.16.11.src.tar.gz /go1.16.12.src.tar.gz +/go1.16.13.src.tar.gz diff --git a/golang.spec b/golang.spec index 3f514b6..31ff001 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ %endif %global go_api 1.16 -%global go_version %{go_api}.12 +%global go_version %{go_api}.13 # For rpmdev-bumpspec and releng automation %global baserelease 1 @@ -144,8 +144,8 @@ Provides: bundled(golang(github.com/google/pprof)) = 0.0.0.20201203190320.1bf35d Provides: bundled(golang(github.com/ianlancetaylor/demangle)) = 0.0.0.20200824232613.28f6c0f3b639 Provides: bundled(golang(golang.org/x/arch)) = 0.0.0.20201008161808.52c3e6f60cff Provides: bundled(golang(golang.org/x/crypto)) = 0.0.0.20201016220609.9e8e0b390897 -Provides: bundled(golang(golang.org/x/mod)) = 0.4.1 -Provides: bundled(golang(golang.org/x/net)) = 0.0.0.20201209123823.ac852fbbde11 +Provides: bundled(golang(golang.org/x/mod)) = 0.4.2.0.20210325185522.dbbbf8a3c6ea +Provides: bundled(golang(golang.org/x/net)) = 0.0.0.20220106012026.aa5a62bac9b2 Provides: bundled(golang(golang.org/x/sys)) = 0.0.0.20201204225414.ed752295db88 Provides: bundled(golang(golang.org/x/text)) = 0.3.4 Provides: bundled(golang(golang.org/x/tools)) = 0.0.0.20210107193943.4ed967dd8eff @@ -529,6 +529,9 @@ fi %endif %changelog +* Fri Jan 07 2022 Alejandro Sáez - 1.16.13-1 +- Update to go1.16.13 + * Tue Dec 21 2021 Alejandro Sáez - 1.16.12-1 - Update to go1.16.12 - Resolves: rhbz#2030810 diff --git a/sources b/sources index 9118a69..641c0c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.12.src.tar.gz) = 01a641b1c52890ff375f62761db4d87f7207297c7971951ba9305aa99313b5ba3014cb7555096a8fd04c97c208d2432d71d94aa9134d1617f8bedb203aa91b58 +SHA512 (go1.16.13.src.tar.gz) = e168583a6264db5e28af0bc6a5de1e7586e0f4c248b8c387c8dd4a817c4a2bb303532e1f32067db3c565de9c1b39248f59573365c61c2f1116ba73f4af59b6bc From 1546199f331b9dc67cc7a8c4ae40c230cbcd82bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 11 Feb 2022 11:50:42 +0100 Subject: [PATCH 10/11] Update to go1.16.14 --- .gitignore | 1 + golang.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9f121bb..60e0b21 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,4 @@ /go1.16.11.src.tar.gz /go1.16.12.src.tar.gz /go1.16.13.src.tar.gz +/go1.16.14.src.tar.gz diff --git a/golang.spec b/golang.spec index 31ff001..d06c6f5 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ %endif %global go_api 1.16 -%global go_version %{go_api}.13 +%global go_version %{go_api}.14 # For rpmdev-bumpspec and releng automation %global baserelease 1 @@ -529,6 +529,9 @@ fi %endif %changelog +* Fri Feb 11 2022 Alejandro Sáez - 1.16.14-1 +- Update to go1.16.14 + * Fri Jan 07 2022 Alejandro Sáez - 1.16.13-1 - Update to go1.16.13 diff --git a/sources b/sources index 641c0c0..c63874d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.13.src.tar.gz) = e168583a6264db5e28af0bc6a5de1e7586e0f4c248b8c387c8dd4a817c4a2bb303532e1f32067db3c565de9c1b39248f59573365c61c2f1116ba73f4af59b6bc +SHA512 (go1.16.14.src.tar.gz) = cd613d94d3c476a61bf9c3a7bb4f6f6c55a2b5c2732837e31bff4ca1f96941e42b2daa39ce3a8fced1a3808206c9711fc1c6cfe8c950b93b18179116478eef4e From 77e408a201ed252a5fb7fb6425937c0e6aa73bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Thu, 10 Mar 2022 12:20:23 +0100 Subject: [PATCH 11/11] Update to go1.16.15 --- .gitignore | 1 + golang.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 60e0b21..0ca5b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,4 @@ /go1.16.12.src.tar.gz /go1.16.13.src.tar.gz /go1.16.14.src.tar.gz +/go1.16.15.src.tar.gz diff --git a/golang.spec b/golang.spec index d06c6f5..4f8fd3e 100644 --- a/golang.spec +++ b/golang.spec @@ -106,7 +106,7 @@ %endif %global go_api 1.16 -%global go_version %{go_api}.14 +%global go_version %{go_api}.15 # For rpmdev-bumpspec and releng automation %global baserelease 1 @@ -529,6 +529,9 @@ fi %endif %changelog +* Thu Mar 10 2022 Alejandro Sáez - 1.16.15-1 +- Update to go1.16.15 + * Fri Feb 11 2022 Alejandro Sáez - 1.16.14-1 - Update to go1.16.14 diff --git a/sources b/sources index c63874d..9165d54 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go1.16.14.src.tar.gz) = cd613d94d3c476a61bf9c3a7bb4f6f6c55a2b5c2732837e31bff4ca1f96941e42b2daa39ce3a8fced1a3808206c9711fc1c6cfe8c950b93b18179116478eef4e +SHA512 (go1.16.15.src.tar.gz) = 5b7fd234e6eb3db173ec536ac599a8c640eb4b0e8abeb16f7728efb6d7c927c41a7e8631505ba6983f565f0470a37458e60d8df33089f7ab773c250b44413e66