This is needed for some binary analysis programs (BOLT, in this case) to
find all the code. A little ugly since we're putting labels that are
named as if they are local only in the global symbol table, but whatever,
there is plenty ugly and weird stuff in these assembly functions...
Previously, they were in .text, which while not ideal, works just fine. The
wrinkle is that since they were all in the same segment, no relocations were
generated for references to them. Which again works just fine, until you
try to rewrite binaries. In our case, using BOLT to add Spectre V1/V2
mitigations. Moving them to .rodata is cleaner and forces the assembler
to generate the relocations that BOLT needs.
As far as I know, `libc` is available for every target now. Especially
since the introduction of `bssl::Result` we hardly reference these
types, other than `size_t`. This will help get rid of crypto/crypto.c.
192-bit key support still exists in AES implementation for ARMv8.
Remove it, and leave comments documenting where code was removed.
As far as I can tell 192-bit keys are not supported in either the ARMv4
or vector-permutation based ARMv7 implementations.
This continues the work in
- 1103cf29df
- b3e91be71e
- and #707.
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
When cross-compiling to i686-unknown-linux-gnu from
x86_64-unknown-linux-gnu I found that this header wasn't found and the
build broken. Avoid that happening by only including this header when
we don't already know what it will tell us.
SGX targets don't necessarily have file I/O and some embedded targets
don't either.
Do this in a minimal-effort way since this test file should get
replaced soon anyway.
Embed test data files into test executables so that file I/O isn't
necessary during tests. This allows the tests to run on platforms that
don't have file I/O. It also makes it easier to run the tests on a
separate (virtual) machine from the build machine since the test
automation no longer needs to keep track of the test files.
This is another attempt for ring to support fuchsia, by directly
calling `zx_cprng_draw` to generate random byte strings. This avoids
having to pull in an extra dependency (which #634 did). With this
change, all the ring tests pass on fuchsia.
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
Closes#428
Testing with API 24 images because there are no API 26 ARM images available.
I agree to license my contributions to each file under the terms given
at the top of each file I changed.
Some of the targets in Rust's `cross` toolchains have old libc headers
that don't have sys/auxv.h, and we want to do this in Rust anyway.
Unfortunately, in the process of doing so, I found out that
`libc::getauxval()` isn't available in enough places either, so we skip
dealing with *that* too.
Rename some GCM assembly functions so that all functions that do the
same thing the same way have the same name, to make the dispatching
logic simpler.
Thread CPU feature caching witnesses through the GCM dispatching logic
to make feature detection less error-prone.
Start an internal Rust API for feature detection.
The "Submodules and file naming" section ended with three backticks (` ``` `), which caused the next section to be unformatted instead of using proper Markdown formatting.