Giter Club home page Giter Club logo

Comments (8)

justsmth avatar justsmth commented on August 15, 2024 1

The change to address this in AWS-LC made it into the release yesterday: https://github.com/aws/aws-lc/releases/tag/v1.31.0

Hopefully, we can get a PR up today for aws-lc-sys to align it with that release.

from aws-lc-rs.

justsmth avatar justsmth commented on August 15, 2024

I believe the problem related to the Cross.toml configuration that you have here. See my comment on your other issue. Since I believe these have the same root cause, I will close this issue.

from aws-lc-rs.

rami3l avatar rami3l commented on August 15, 2024

@justsmth Wait, actually Rustup is now on the same boat (again with rust-lang/rustup#3898) 😅 For cross compilation we have historically used the Docker images provided by rust-lang/rust, and maybe that error was caused by a very outdated version of GCC (we use 8.5.0, and the log above uses 8.3.0)?

The log here is more or less the same thing: https://github.com/rust-lang/rustup/actions/runs/9720503984/job/26831972336?pr=3898

I mean I could try to use cross on our side instead but that migration might not be easy :]

from aws-lc-rs.

rami3l avatar rami3l commented on August 15, 2024

The real problem is, since I have no intention of using fipsmodule (it's not supported for the target in question according to https://aws.github.io/aws-lc-rs/requirements/linux.html), why I'm getting an error on that part of the codebase?

from aws-lc-rs.

justsmth avatar justsmth commented on August 15, 2024

..., why I'm getting an error on that part of the codebase?

It's just due to how the code is structured. Code that is related to the certification has been placed into a "fipsmodule" directory, but the additional "delocation" and runtime checks required for certification are only activated for a "FIPS" build. We have some detail about how a "FIPS" build differs from our default build here: https://github.com/aws/aws-lc/blob/main/crypto/fipsmodule/FIPS.md

from aws-lc-rs.

justsmth avatar justsmth commented on August 15, 2024

This comment might be relevant to this build failure: https://github.com/aws/aws-lc/blob/5a4a7d17d589af6d7110eded4155ebaaf5026029/crypto/fipsmodule/cpucap/cpu_arm_linux.c#L116-L121

I have a fairly simple patch for it, but I need to test it:

---
 crypto/fipsmodule/cpucap/cpu_arm_linux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/crypto/fipsmodule/cpucap/cpu_arm_linux.c b/crypto/fipsmodule/cpucap/cpu_arm_linux.c
index e4ab5ab49..a2c5a1809 100644
--- a/crypto/fipsmodule/cpucap/cpu_arm_linux.c
+++ b/crypto/fipsmodule/cpucap/cpu_arm_linux.c
@@ -118,7 +118,11 @@ void OPENSSL_cpuid_setup(void) {
     // this is now rare (see Chrome's Net.NeedsHWCAP2Workaround metric), but AES
     // and PMULL extensions are very useful, so we still carry the workaround
     // for now.
+#if defined(AT_HWCAP2)
     unsigned long hwcap2 = getauxval(AT_HWCAP2);
+#else
+    unsigned long hwcap2 = 0;
+#endif
     if (hwcap2 == 0) {
       hwcap2 = crypto_get_arm_hwcap2_from_cpuinfo(&cpuinfo);
       g_needs_hwcap2_workaround = hwcap2 != 0;
--

from aws-lc-rs.

rami3l avatar rami3l commented on August 15, 2024

This comment might be relevant to this build failure: https://github.com/aws/aws-lc/blob/5a4a7d17d589af6d7110eded4155ebaaf5026029/crypto/fipsmodule/cpucap/cpu_arm_linux.c#L116-L121

I have a fairly simple patch for it, but I need to test it:

---
 crypto/fipsmodule/cpucap/cpu_arm_linux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/crypto/fipsmodule/cpucap/cpu_arm_linux.c b/crypto/fipsmodule/cpucap/cpu_arm_linux.c
index e4ab5ab49..a2c5a1809 100644
--- a/crypto/fipsmodule/cpucap/cpu_arm_linux.c
+++ b/crypto/fipsmodule/cpucap/cpu_arm_linux.c
@@ -118,7 +118,11 @@ void OPENSSL_cpuid_setup(void) {
     // this is now rare (see Chrome's Net.NeedsHWCAP2Workaround metric), but AES
     // and PMULL extensions are very useful, so we still carry the workaround
     // for now.
+#if defined(AT_HWCAP2)
     unsigned long hwcap2 = getauxval(AT_HWCAP2);
+#else
+    unsigned long hwcap2 = 0;
+#endif
     if (hwcap2 == 0) {
       hwcap2 = crypto_get_arm_hwcap2_from_cpuinfo(&cpuinfo);
       g_needs_hwcap2_workaround = hwcap2 != 0;
--

@justsmth Thanks! The patch looks reasonable to me. Is there a way I can easily test it within the current cargo setup though?

from aws-lc-rs.

justsmth avatar justsmth commented on August 15, 2024

This should be resolved with our latest release: https://github.com/aws/aws-lc-rs/releases/tag/v1.8.1

from aws-lc-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.