Add support for Big Endian in ACVP tool #2938
Merged
+29
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues:
This was change needed to move forward with ACVP testing on powerpc64 for NetOS.
Description of changes:
Our ACVP tool was not working properly on the PowerPC Big Endian platform that NetOS needs to support. go1.21 has support for
binary.NativeEndian, but we can't use the newer version yet. This uses a workaround withunsafe.Pointeruntil we can upgrade.Call-outs:
This is harder to test, but it might be doable by recompiling the cross compilation tool chain we have here with gccgo enabled. It's harder to branch out the logic within the script to account for the different behavior though, might do so in a follow up PR.
Testing:
Works on the powerpc host NetOS lent us. Built with
gccgofrom gcc-12 with a powerpc64 cross compilation toolchain:By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.