-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/asm: aes related tests fail with SIGILL on z13 #63387
Comments
cc @golang/s390x |
Hi All.. |
@jcajka Thanks for identifying the bug on z13.. I went through the code and I have identified the fix. As part of adding assembly instruction mnemonics to the s390x.s files,"KMCTR" instruction was added. But, it looks like the instruction encoding for operands was not handled properly. The operands were encoded in a reverse order when compared to what was expected. I have fixed the issue and tested it both on z13 and latest z15 machines. Its working fine. I will raise a CL to incorporate my changes. Thanks.. |
@srinivas-pokala thank you for quick response. Just for record, did it had any adverse effect on the z14+ or did the encoding changed between z13 and z14? |
@jcajka , for the AES-GCM test "TestAESGCM" which contain's two implementations. First implementation (gcmAsm) uses KMCTR instruction to encrypt using AES in counter mode and the KIMD instruction for GHASH. |
Change https://go.dev/cl/535675 mentions this issue: |
For the record just tested the CL, it fixes the issue for me. Thank you for quick fix. |
As the freeze is approaching IMHO this seems to me as rather serious issue(effectively dropping z13) to make it in to the 1.22. If fix can't make it in to the 1.22, could the breaking change be reverted? CC'ing for visibility @srinivas-pokala @laboger @alexsaezm |
@jcajka thank's for bringing the note, we are working on code review to get it merged asap before the freeze else will revert the breaking change. |
@jcajka @randall77 So, from s390x arch perspective, I approve the changes. Request you to consider this and merge this CL asap before the code freeze happens, since its breaking the z13 build. |
@Vishwanatha-HD Probably better to comment on the CL, there are a few unresolved things over there. I think we'd all want this fixed once that CL is ready. |
What version of Go are you using (
go version
)?master branch
Does this issue reproduce with the latest release?
No
What operating system and processor architecture are you using (
go env
)?linux/s390x
What did you do?
GOROOT_BOOTSTRAP=... ./all.bash
What did you expect to see?
All tests passing
What did you see instead?
Example of one of the failures.
Tests crypto/cipher, crypto/tls, net/http, net/http/httptest, net/smtp and cmd/go started to fail with SIGILL on z13 since commit a40404da74. It seems to me as some part of the aes optimizations is using features that are present only on z14 and newer now, but I can't find, missed any reference in the Principles of Operation.
The text was updated successfully, but these errors were encountered: