]> Cypherpunks repositories - gostls13.git/commit
crypto: add a test for disallowed instructions
authorRoland Shoemaker <roland@golang.org>
Thu, 8 May 2025 23:27:36 +0000 (16:27 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 21 May 2025 22:01:46 +0000 (15:01 -0700)
commit4158ca8d7c521aee5cc48f285f559e74845e973c
treeb2bad6c504512938608bb17b07a5d774bea4a1b3
parent9112511725e37312a95c9d2c33ff94fe2f4da6af
crypto: add a test for disallowed instructions

WORD and BYTE usage in crypto assembly cores is an anti-pattern which
makes extremely sensitive code significantly harder to understand, and
can result in unexpected behavior.

Because of this, we've decided to ban their usage in the crypto/ tree
(as part of the cryptography assembly policy).

This test walks the crypto/ tree looking for assembly files (those with
the filetype .s) and look for lines that match the regular rexpression
"(^|;)\s(BYTE|WORD)\s".

Change-Id: I60b5283e05e8588fa53273904a9611a411741f72
Reviewed-on: https://go-review.googlesource.com/c/go/+/671099
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Auto-Submit: Roland Shoemaker <roland@golang.org>
src/crypto/crypto_test.go