Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken link and misplaced comment in common.c #1865

Closed
SWilson4 opened this issue Jul 26, 2024 · 0 comments · Fixed by #1869
Closed

Broken link and misplaced comment in common.c #1865

SWilson4 opened this issue Jul 26, 2024 · 0 comments · Fixed by #1869
Assignees

Comments

@SWilson4
Copy link
Member

The link in the following comment is broken:

#if defined(OQS_DIST_X86_64_BUILD)
/* set_available_cpu_extensions_x86_64() has been written using:
* https://github.com/google/cpu_features/blob/master/src/cpuinfo_x86.c
*/
#include "x86_64_helpers.h"
static void set_available_cpu_extensions(void) {

The comment currently on line 108 refers to the code currently at line 113 and should be moved for clarity.

liboqs/src/common/common.c

Lines 107 to 114 in 4cc8884

static void set_available_cpu_extensions(void) {
/* mark that this function has been called */
cpu_ext_data[OQS_CPU_EXT_ARM_AES] = 1;
cpu_ext_data[OQS_CPU_EXT_ARM_SHA2] = 1;
cpu_ext_data[OQS_CPU_EXT_ARM_SHA3] = macos_feature_detection("hw.optional.armv8_2_sha3");
cpu_ext_data[OQS_CPU_EXT_ARM_NEON] = macos_feature_detection("hw.optional.neon");
cpu_ext_data[OQS_CPU_EXT_INIT] = 1;
}

Reported by @trailofbits in Week 1 of their audit of liboqs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant