13 Commits

Author SHA1 Message Date
Brian Smith
88596b8d33 Merge BoringSSL c1d8c5b: Handle errors from close in perlasm scripts. 2019-07-02 10:00:48 -10:00
David Benjamin
c1d8c5b0e0 Handle errors from close in perlasm scripts.
If the xlate filter script fails, the outer script swallows the error,
unless we check the return value of close.

Change-Id: Ib506bb745a5d27b9d1df9329535bf81ad090f41f
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35724
Reviewed-by: Adam Langley <agl@google.com>
2019-04-26 18:03:21 +00:00
Adam Langley
c1615719ce Add test of assembly code dispatch.
The first attempt involved using Linux's support for hardware
breakpoints to detect when assembly code was run. However, this doesn't
work with SDE, which is a problem.

This version has the assembly code update a global flags variable when
it's run, but only in non-FIPS and non-debug builds.

Update-Note: Assembly files now pay attention to the NDEBUG preprocessor
symbol. Ensure the build passes the symbol in. (If release builds fail
to link due to missing BORINGSSL_function_hit, this is the cause.)

Change-Id: I6b7ced442b7a77d0b4ae148b00c351f68af89a6e
Reviewed-on: https://boringssl-review.googlesource.com/c/33384
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2019-01-22 20:22:53 +00:00
Brian Smith
b9b2e57a59 Remove dead code in aesni-gcm-x86_64.pl. 2018-11-27 00:56:43 -10:00
Dylan MacKenzie
b5153f0e38 Remove 192-bit key support from AES-NI assembly.
Since *ring* does not support AES with 192-bit keys, we can remove some
unused assembly code.

Comments are added to indicate that 192-bit key support was willfully
removed.

This extends the work done in commits
1103cf29dfbbf51f0dd8fb757084caa052863869 and
b3e91be71edde28f5d2884d3c3c34260b6a79378.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2018-10-24 20:00:56 -10:00
Brian Smith
3cd39b12a8 Merge BoringSSL 0967853: Add CFI start/end for _aesni_ctr32[_ghash]_6x 2018-04-30 14:04:18 -10:00
Brian Smith
ab5feaa912 Merge BoringSSL ee2c1f3: aesni-gcm-x86_64.pl: sync CFI directives from upstream. 2018-04-30 14:03:57 -10:00
Brian Smith
cde1e66f9a Merge BoringSSL d4e3795: x86_64 assembly pack: "optimize" for Knights Landing, add AVX-512 results. 2018-04-29 09:15:58 -10:00
Brian Smith
affdca5d1c Merge BoringSSL 0648129: Move modes/ into the FIPS module. 2018-01-09 16:56:49 -10:00
Adam Langley
0967853d68 Add CFI start/end for _aesni_ctr32[_ghash]_6x
These functions don't appear to do any stack manipulation thus all they
need are start/end directives in order for the correct CFI tables to be
emitted.

Change-Id: I4c94a9446030d363fa4bcb7c8975c689df3d21dc
Reviewed-on: https://boringssl-review.googlesource.com/22765
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2017-11-09 00:31:14 +00:00
Adam Langley
ee2c1f3e68 aesni-gcm-x86_64.pl: sync CFI directives from upstream.
Change-Id: Id70cfc78c8d103117d4c2195206b023a5d51edc3
Reviewed-on: https://boringssl-review.googlesource.com/22764
Commit-Queue: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2017-11-09 00:18:23 +00:00
David Benjamin
d4e37951b4 x86_64 assembly pack: "optimize" for Knights Landing, add AVX-512 results.
The changes to the assembly files are synced from upstream's
64d92d74985ebb3d0be58a9718f9e080a14a8e7f. cpu-intel.c is translated to C
from that commit and d84df594404ebbd71d21fec5526178d935e4d88d.

Change-Id: I02c8f83aa4780df301c21f011ef2d8d8300e2f2a
Reviewed-on: https://boringssl-review.googlesource.com/18411
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2017-07-26 22:01:37 +00:00
Adam Langley
0648129566 Move modes/ into the FIPS module
The changes to delocate.go are needed because modes/ does things like
return the address of a module function. Both of these need to be
changed from referencing the GOT to using local symbols.

Rather than testing whether |ghash| is |gcm_ghash_avx|, we can just keep
that information in a flag.

The test for |aesni_ctr32_encrypt_blocks| is more problematic, but I
believe that it's superfluous and can be dropped: if you passed in a
stream function that was semantically different from
|aesni_ctr32_encrypt_blocks| you would already have a bug because
|CRYPTO_gcm128_[en|de]crypt_ctr32| will handle a block at the end
themselves, and assume a big-endian, 32-bit counter anyway.

Change-Id: I68a84ebdab6c6006e11e9467e3362d7585461385
Reviewed-on: https://boringssl-review.googlesource.com/15064
Reviewed-by: Adam Langley <agl@google.com>
2017-04-21 17:46:37 +00:00