Skip to content

Commit d5142d8

Browse files
authored
Merge pull request #7234 from douzzer/20240208-test-config-and-linuxkm-tweaks
20240208-test-config-and-linuxkm-tweaks
2 parents 9f0aa38 + 63fe12e commit d5142d8

16 files changed

Lines changed: 308 additions & 181 deletions

File tree

configure.ac

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ then
720720
# this set is also enabled by enable-all-crypto:
721721
test "$enable_atomicuser" = "" && enable_atomicuser=yes
722722
test "$enable_aesgcm" = "" && enable_aesgcm=yes
723+
test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
723724
test "$enable_aesccm" = "" && enable_aesccm=yes
724725
test "$enable_aesctr" = "" && enable_aesctr=yes
725726
test "$enable_aeseax" = "" && enable_aeseax=yes
@@ -745,7 +746,6 @@ then
745746
test "$enable_psk" = "" && enable_psk=yes
746747
test "$enable_cmac" = "" && enable_cmac=yes
747748
test "$enable_siphash" = "" && enable_siphash=yes
748-
test "$enable_aesxts" = "" && enable_aesxts=yes
749749
test "$enable_ocsp" = "" && enable_ocsp=yes
750750
test "$enable_ocspstapling" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling=yes
751751
test "$enable_ocspstapling2" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling2=yes
@@ -787,6 +787,7 @@ then
787787
test "$enable_session_ticket" = "" && enable_session_ticket=yes
788788
test "$enable_earlydata" = "" && enable_earlydata=yes
789789
test "$enable_ech" = "" && enable_ech=yes
790+
test "$enable_srtp" = "" && enable_srtp=yes
790791

791792
if test "$ENABLED_32BIT" != "yes"
792793
then
@@ -796,7 +797,6 @@ then
796797

797798
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
798799
then
799-
test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
800800
test "$enable_compkey" = "" && enable_compkey=yes
801801
test "$enable_quic" = "" && test "$enable_cryptonly" != "yes" && enable_quic=yes
802802
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_IO -DHAVE_IO_TIMEOUT"
@@ -861,7 +861,8 @@ then
861861
fi
862862
fi
863863

864-
if test "$ENABLED_FIPS" = "no" || test "$ENABLED_FIPS" = "dev"; then
864+
if test "$ENABLED_FIPS" = "no" || test "$FIPS_VERSION" = "dev"; then
865+
test "$enable_aesxts" = "" && enable_aesxts=yes
865866
test "$enable_aessiv" = "" && enable_aessiv=yes
866867
fi
867868

@@ -908,6 +909,7 @@ if test "$ENABLED_ALL_CRYPT" = "yes"
908909
then
909910
test "$enable_atomicuser" = "" && enable_atomicuser=yes
910911
test "$enable_aesgcm" = "" && enable_aesgcm=yes
912+
test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
911913
test "$enable_aesccm" = "" && enable_aesccm=yes
912914
test "$enable_aesctr" = "" && enable_aesctr=yes
913915
test "$enable_aeseax" = "" && enable_aeseax=yes
@@ -933,7 +935,6 @@ then
933935
test "$enable_psk" = "" && enable_psk=yes
934936
test "$enable_cmac" = "" && enable_cmac=yes
935937
test "$enable_siphash" = "" && enable_siphash=yes
936-
test "$enable_aesxts" = "" && enable_aesxts=yes
937938
test "$enable_ocsp" = "" && enable_ocsp=yes
938939
test "$enable_ocspstapling" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling=yes
939940
test "$enable_ocspstapling2" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling2=yes
@@ -959,6 +960,7 @@ then
959960
test "$enable_cryptocb" = "" && enable_cryptocb=yes
960961
test "$enable_anon" = "" && enable_anon=yes
961962
test "$enable_ssh" = "" && test "$enable_hmac" != "no" && enable_ssh=yes
963+
test "$enable_srtp_kdf" = "" && enable_srtp_kdf=yes
962964

963965
if test "$ENABLED_32BIT" != "yes"
964966
then
@@ -968,7 +970,6 @@ then
968970

969971
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
970972
then
971-
test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
972973
test "$enable_compkey" = "" && enable_compkey=yes
973974
fi
974975

@@ -1001,7 +1002,8 @@ then
10011002
fi
10021003
fi
10031004

1004-
if test "$ENABLED_FIPS" = "no" || test "$ENABLED_FIPS" = "dev"; then
1005+
if test "$ENABLED_FIPS" = "no" || test "$FIPS_VERSION" = "dev"; then
1006+
test "$enable_aesxts" = "" && enable_aesxts=yes
10051007
test "$enable_aessiv" = "" && enable_aessiv=yes
10061008
fi
10071009

@@ -4848,13 +4850,6 @@ AC_ARG_ENABLE([xts],
48484850
[ ENABLED_AESXTS=$enableval ]
48494851
)
48504852

4851-
AS_IF([test "x$ENABLED_AESXTS" = "xyes"],
4852-
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"])
4853-
AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_INTELASM" = "xyes"],
4854-
[AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
4855-
AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"],
4856-
[AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
4857-
48584853
# Web Server Build
48594854
AC_ARG_ENABLE([webserver],
48604855
[AS_HELP_STRING([--enable-webserver],[Enable Web Server (default: disabled)])],
@@ -4953,6 +4948,9 @@ AS_CASE([$FIPS_VERSION],
49534948
AS_IF([test "$ENABLED_AESCCM" != "yes" && (test "$FIPS_VERSION" != "dev" || test "$enable_aesccm" != "no")],
49544949
[ENABLED_AESCCM="yes"; AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"])
49554950
4951+
AS_IF([test "$ENABLED_AESXTS" = "yes" && (test "$FIPS_VERSION" != "dev" || test "$enable_aesxts" != "yes")],
4952+
[ENABLED_AESXTS="no"])
4953+
49564954
AS_IF([test "$ENABLED_RSAPSS" != "yes" && (test "$FIPS_VERSION" != "dev" || test "$enable_rsapss" != "no")],
49574955
[ENABLED_RSAPSS="yes"; AM_CFLAGS="$AM_CFLAGS -DWC_RSA_PSS"])
49584956
@@ -4994,7 +4992,8 @@ AS_CASE([$FIPS_VERSION],
49944992
AS_IF([(test "$ENABLED_AESCCM" = "yes" && test "$HAVE_AESCCM_PORT" != "yes") ||
49954993
(test "$ENABLED_AESCTR" = "yes" && test "$HAVE_AESCTR_PORT" != "yes") ||
49964994
(test "$ENABLED_AESGCM" = "yes" && test "$HAVE_AESGCM_PORT" != "yes") ||
4997-
(test "$ENABLED_AESOFB" = "yes" && test "$HAVE_AESOFB_PORT" != "yes")],
4995+
(test "$ENABLED_AESOFB" = "yes" && test "$HAVE_AESOFB_PORT" != "yes") ||
4996+
(test "$ENABLED_AESXTS" = "yes" && test "$HAVE_AESXTS_PORT" != "yes")],
49984997
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT -DHAVE_AES_ECB"])
49994998
],
50004999

@@ -5100,6 +5099,14 @@ AS_CASE([$SELFTEST_VERSION],
51005099
])
51015100

51025101

5102+
AS_IF([test "x$ENABLED_AESXTS" = "xyes"],
5103+
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"])
5104+
AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_INTELASM" = "xyes"],
5105+
[AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
5106+
AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"],
5107+
[AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
5108+
5109+
51035110
# Set SHA-3 flags
51045111
if test "$ENABLED_SHA3" != "no" && test "$ENABLED_32BIT" = "no"
51055112
then
@@ -8043,7 +8050,7 @@ if test "$ENABLED_LINUXKM_LKCAPI_REGISTER" != "none"
80438050
then
80448051
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER"
80458052

8046-
if test "$ENABLED_AESGCM" != "no" && test "$ENABLED_AESGCM_STREAM" = "no" && test "$ENABLED_AESNI" = "no" && test "$ENABLED_ARMASM" = "no" && test "$ENABLED_FIPS" = "no"; then
8053+
if test "$ENABLED_AESGCM" != "no" && test "$ENABLED_AESGCM_STREAM" = "no" && test "$ENABLED_ARMASM" = "no" && test "$ENABLED_FIPS" = "no"; then
80478054
ENABLED_AESGCM_STREAM=yes
80488055
fi
80498056

linuxkm/linuxkm_wc_port.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
#include <linux/kernel.h>
121121
#include <linux/ctype.h>
122122

123-
#ifdef CONFIG_FORTIFY_SOURCE
123+
#if defined(CONFIG_FORTIFY_SOURCE) || defined(DEBUG_LINUXKM_FORTIFY_OVERLAY)
124124
#ifdef __PIE__
125125
/* the inline definitions in fortify-string.h use non-inline
126126
* fortify_panic().
@@ -345,6 +345,8 @@
345345
fail_clause \
346346
} \
347347
}
348+
#endif
349+
#ifndef SAVE_VECTOR_REGISTERS2
348350
#ifdef DEBUG_VECTOR_REGISTER_ACCESS_FUZZING
349351
#define SAVE_VECTOR_REGISTERS2() ({ \
350352
int _fuzzer_ret = SAVE_VECTOR_REGISTERS2_fuzzer(); \
@@ -363,6 +365,8 @@
363365
#include <asm/fpsimd.h>
364366
#ifndef SAVE_VECTOR_REGISTERS
365367
#define SAVE_VECTOR_REGISTERS(fail_clause) { int _svr_ret = save_vector_registers_arm(); if (_svr_ret != 0) { fail_clause } }
368+
#endif
369+
#ifndef SAVE_VECTOR_REGISTERS2
366370
#define SAVE_VECTOR_REGISTERS2() save_vector_registers_arm()
367371
#endif
368372
#ifndef RESTORE_VECTOR_REGISTERS

0 commit comments

Comments
 (0)