]> Cypherpunks repositories - gostls13.git/commit
runtime: handle SIGPE exception for p256 crypto package on s390x
authorroot <vishwanatha.hd@ibm.com>
Wed, 31 May 2023 12:06:02 +0000 (12:06 +0000)
committerCherry Mui <cherryyz@google.com>
Tue, 1 Aug 2023 17:36:28 +0000 (17:36 +0000)
commit6fe976545d646a3f076a84a7ca22be63df8da718
treed2b0dc3e960ef93093bba97da61d94c1184122f8
parentb6898dde3d7488cfa41b4f126f6fed49d2918ea5
runtime: handle SIGPE exception for p256 crypto package on s390x

Older s390x before z13 did not have support to carry out floating point operations i.e. they didn't have the support for vector instructions like VX/VL, etc.

Starting with Go1.19, z13 is the minimum hardware level for running Go on LoZ (s390x). The main cause of this issue was the refactoring of elliptic curve to internal/nistec. The new code structures made it difficult to dynamically switch implementations at runtime, so it became necessary (in order machines to continue to use the accelerated implementation) to require z13 as the minimum hardware.

Hence, Go programs, when run on unsupported hardware, should crash on startup instead of crashing out in crypto code.

Fixes: #58465
Change-Id: I7c1a816205d19b5ddd2f1464839d16fa96815384
Reviewed-on: https://go-review.googlesource.com/c/go/+/499495
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Bypass: Cherry Mui <cherryyz@google.com>
src/runtime/asm_s390x.s
src/runtime/os_linux_s390x.go