linuxkm/Kbuild and linuxkm/module_hooks.c: refactor wc_linuxkm_pie_reloc_tab to include ground truth segment tag from ELF metadata.

tweaks for ARM32: recognize R_ARM_* relocations, and add -fno-unwind-tables to PIE_FLAGS.

linuxkm/linuxkm_wc_port.h:
* __PIE__: don't declare static pmd_to_page() unless USE_SPLIT_PMD_PTLOCKS.
* add wc_lkm_refcount_to_int() helper with -Wnested-externs suppressed.

wolfcrypt/src/fe_operations.c: in fe_frombytes() and fe_sq2(), use explicit XMEMSET()s to initialize working vars, rather than implicit, to avoid implicit (unshimmable) memset() calls.

wolfcrypt/src/ge_operations.c: fix gate on _wc_curve25519_dummy() to require CURVED25519_ASM.
This commit is contained in:
Daniel Pouzzner
2025-11-14 19:24:53 -06:00
parent 96dde5b4a8
commit 06d3d6d3df
6 changed files with 253 additions and 128 deletions
+16 -7
View File
@@ -710,12 +710,17 @@ void fe_frombytes(fe h,const unsigned char *s)
void fe_invert(fe out,const fe z)
{
fe t0 = {0};
fe t1 = {0};
fe t2 = {0};
fe t3 = {0};
fe t0;
fe t1;
fe t2;
fe t3;
int i = 0;
XMEMSET(&t0, 0, sizeof(t0));
XMEMSET(&t1, 0, sizeof(t1));
XMEMSET(&t2, 0, sizeof(t2));
XMEMSET(&t3, 0, sizeof(t3));
/* pow225521 */
fe_sq(t0,z);
fe_sq(t1,t0); for (i = 1;i < 2;++i) fe_sq(t1,t1);
@@ -1328,11 +1333,15 @@ void fe_sq2(fe h,const fe f)
void fe_pow22523(fe out,const fe z)
{
fe t0 = {0};
fe t1 = {0};
fe t2 = {0};
fe t0;
fe t1;
fe t2;
int i = 0;
XMEMSET(&t0, 0, sizeof(t0));
XMEMSET(&t1, 0, sizeof(t1));
XMEMSET(&t2, 0, sizeof(t2));
fe_sq(t0,z);
fe_sq(t1,t0); for (i = 1;i < 2;++i) fe_sq(t1,t1);
fe_mul(t1,z,t1);