New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crypto/internal/nistec: p256_asm_s390x.s causes SIGFPE: floating-point exception on older s390 #58465
Comments
@laboger Do you know if dropping of support for pre z13 was intentional? |
Our current support matrix says |
@billotosyr or @jonathan-albrecht-ibm can you answer this question? |
Ah, thx, was trying to find that support matrix (probably failed due to #58464). According to https://en.wikipedia.org/wiki/IBM_z196 it is the 2 generations before https://en.wikipedia.org/wiki/IBM_z13_(microprocessor) thus it is a bug on a supported architecture. |
You are correct. Starting with Go1.19, z13 is the minimum machine level for running Go on LoZ. The proximal cause of this change 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 to continue to use the accelerated implementation) to require z13 as the minimum. For many years (five years perhaps?) the minimum had been z12. The support matrix should be updated. |
Ok, then can we:
|
I have updated the wiki (sorry for that oversight). I'll look into your excellent suggestion regarding startup. |
Change https://go.dev/cl/499495 mentions this issue: |
Working on this issue. I have made the code changes to take care of this issue on s390x arch. CL is still under review and once the review comments are fine, this CL will be merged. |
What version of Go are you using (
go version
)?Bug was introduced by: d63865b
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?Older s390 before x13 did not have support for vx. Instructions like VL, etc. where added in x13.
I'm not sure if that is intentional and this requirement is just not documented. Otoh maybe it is ok to switch to the generic version when pu.S390X.HasVX is false.
Can be emulated with: qemu-s390x-static -cpu qemu,vx=off
What did you do?
Try a https request that uses this.
Local small reproducer with instructions on how to emulate: https://github.com/djoreilly/reprod-s390-go-bug
What did you expect to see?
No crash.
What did you see instead?
The text was updated successfully, but these errors were encountered: