Change-Id: I123db17aab345c82b9fdc47040c34f90d98861be
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/c/photon/+/22473
Reviewed-by: Keerthana K <keerthanak@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/c/photon/+/22880
Reviewed-by: Keerthana K <keerthana.kalyanasundaram@broadcom.com>
Tested-by: Keerthana K <keerthana.kalyanasundaram@broadcom.com>
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,295 +0,0 @@ |
| 1 |
-From a31ce76f47615c99cc429e8ca0c615401a6f0b0e Mon Sep 17 00:00:00 2001 |
|
| 2 |
-From: Keerthana K <keerthanak@vmware.com> |
|
| 3 |
-Date: Wed, 20 Sep 2023 07:38:08 +0000 |
|
| 4 |
-Subject: [PATCH] FIPS canister binary usage |
|
| 5 |
- |
|
| 6 |
-Build with fips canister and skip building crypto algorithms. |
|
| 7 |
-Invoke fips canister integrity check during kernel startup. |
|
| 8 |
- |
|
| 9 |
-This patch can be used at two stages: |
|
| 10 |
- 1. Prerequisite patch for canister creation. |
|
| 11 |
- 2. Binary canister usage time. |
|
| 12 |
- |
|
| 13 |
-Signed-off-by: Alexey Makhalov <amakhalov@vmware.com> |
|
| 14 |
-Signed-off-by: Keerthana K <keerthanak@vmware.com> |
|
| 15 |
-Signed-off-by: Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> |
|
| 16 |
- arch/x86/crypto/Makefile | 4 -- |
|
| 17 |
- crypto/Makefile | 116 +++++++++++++++++++++++++++++++-------- |
|
| 18 |
- init/main.c | 3 + |
|
| 19 |
- lib/crypto/Makefile | 9 --- |
|
| 20 |
- 4 files changed, 95 insertions(+), 37 deletions(-) |
|
| 21 |
- |
|
| 22 |
-diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile |
|
| 23 |
-index 3b1d701a4..3836c4e30 100644 |
|
| 24 |
-+++ b/arch/x86/crypto/Makefile |
|
| 25 |
-@@ -46,10 +46,6 @@ obj-$(CONFIG_CRYPTO_CHACHA20_X86_64) += chacha-x86_64.o |
|
| 26 |
- chacha-x86_64-y := chacha-avx2-x86_64.o chacha-ssse3-x86_64.o chacha_glue.o |
|
| 27 |
- chacha-x86_64-$(CONFIG_AS_AVX512) += chacha-avx512vl-x86_64.o |
|
| 28 |
- |
|
| 29 |
--obj-$(CONFIG_CRYPTO_AES_NI_INTEL) += aesni-intel.o |
|
| 30 |
--aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o |
|
| 31 |
--aesni-intel-$(CONFIG_64BIT) += aesni-intel_avx-x86_64.o aes_ctrby8_avx-x86_64.o |
|
| 32 |
-- |
|
| 33 |
- obj-$(CONFIG_CRYPTO_SHA1_SSSE3) += sha1-ssse3.o |
|
| 34 |
- sha1-ssse3-y := sha1_avx2_x86_64_asm.o sha1_ssse3_asm.o sha1_ssse3_glue.o |
|
| 35 |
- sha1-ssse3-$(CONFIG_AS_SHA1_NI) += sha1_ni_asm.o |
|
| 36 |
-diff --git a/crypto/Makefile b/crypto/Makefile |
|
| 37 |
-index 515ca3a4c..19bf4080d 100644 |
|
| 38 |
-+++ b/crypto/Makefile |
|
| 39 |
-@@ -18,10 +18,8 @@ crypto_algapi-y := algapi.o scatterwalk.o $(crypto_algapi-y) |
|
| 40 |
- obj-$(CONFIG_CRYPTO_ALGAPI2) += crypto_algapi.o |
|
| 41 |
- |
|
| 42 |
- obj-$(CONFIG_CRYPTO_AEAD2) += aead.o |
|
| 43 |
--obj-$(CONFIG_CRYPTO_AEAD2) += geniv.o |
|
| 44 |
- |
|
| 45 |
- obj-$(CONFIG_CRYPTO_SKCIPHER2) += skcipher.o |
|
| 46 |
--obj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o |
|
| 47 |
- obj-$(CONFIG_CRYPTO_ECHAINIV) += echainiv.o |
|
| 48 |
- |
|
| 49 |
- crypto_hash-y += ahash.o |
|
| 50 |
-@@ -44,7 +42,6 @@ rsa_generic-y += rsaprivkey.asn1.o |
|
| 51 |
- rsa_generic-y += rsa.o |
|
| 52 |
- rsa_generic-y += rsa_helper.o |
|
| 53 |
- rsa_generic-y += rsa-pkcs1pad.o |
|
| 54 |
--obj-$(CONFIG_CRYPTO_RSA) += rsa_generic.o |
|
| 55 |
- |
|
| 56 |
- $(obj)/sm2signature.asn1.o: $(obj)/sm2signature.asn1.c $(obj)/sm2signature.asn1.h |
|
| 57 |
- $(obj)/sm2.o: $(obj)/sm2signature.asn1.h |
|
| 58 |
-@@ -53,13 +50,11 @@ sm2_generic-y += sm2signature.asn1.o |
|
| 59 |
- sm2_generic-y += sm2.o |
|
| 60 |
- |
|
| 61 |
- obj-$(CONFIG_CRYPTO_SM2) += sm2_generic.o |
|
| 62 |
--obj-$(CONFIG_CRYPTO_SELF_TEST) += crypto_self_test.o |
|
| 63 |
- |
|
| 64 |
- $(obj)/ecdsasignature.asn1.o: $(obj)/ecdsasignature.asn1.c $(obj)/ecdsasignature.asn1.h |
|
| 65 |
- $(obj)/ecdsa.o: $(obj)/ecdsasignature.asn1.h |
|
| 66 |
- ecdsa_generic-y += ecdsa.o |
|
| 67 |
- ecdsa_generic-y += ecdsasignature.asn1.o |
|
| 68 |
--obj-$(CONFIG_CRYPTO_ECDSA) += ecdsa_generic.o |
|
| 69 |
- |
|
| 70 |
- crypto_acompress-y := acompress.o |
|
| 71 |
- crypto_acompress-y += scompress.o |
|
| 72 |
-@@ -67,22 +62,15 @@ obj-$(CONFIG_CRYPTO_ACOMP2) += crypto_acompress.o |
|
| 73 |
- |
|
| 74 |
- cryptomgr-y := algboss.o testmgr.o |
|
| 75 |
- |
|
| 76 |
--obj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o |
|
| 77 |
- obj-$(CONFIG_CRYPTO_USER) += crypto_user.o |
|
| 78 |
- crypto_user-y := crypto_user_base.o |
|
| 79 |
- crypto_user-$(CONFIG_CRYPTO_STATS) += crypto_user_stat.o |
|
| 80 |
--obj-$(CONFIG_CRYPTO_CMAC) += cmac.o |
|
| 81 |
--obj-$(CONFIG_CRYPTO_HMAC) += hmac.o |
|
| 82 |
- obj-$(CONFIG_CRYPTO_VMAC) += vmac.o |
|
| 83 |
- obj-$(CONFIG_CRYPTO_XCBC) += xcbc.o |
|
| 84 |
- obj-$(CONFIG_CRYPTO_NULL2) += crypto_null.o |
|
| 85 |
- obj-$(CONFIG_CRYPTO_MD4) += md4.o |
|
| 86 |
- obj-$(CONFIG_CRYPTO_MD5) += md5.o |
|
| 87 |
- obj-$(CONFIG_CRYPTO_RMD160) += rmd160.o |
|
| 88 |
--obj-$(CONFIG_CRYPTO_SHA1) += sha1_generic.o |
|
| 89 |
--obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o |
|
| 90 |
--obj-$(CONFIG_CRYPTO_SHA512) += sha512_generic.o |
|
| 91 |
--obj-$(CONFIG_CRYPTO_SHA3) += sha3_generic.o |
|
| 92 |
- obj-$(CONFIG_CRYPTO_SM3) += sm3.o |
|
| 93 |
- obj-$(CONFIG_CRYPTO_SM3_GENERIC) += sm3_generic.o |
|
| 94 |
- obj-$(CONFIG_CRYPTO_STREEBOG) += streebog_generic.o |
|
| 95 |
-@@ -91,21 +79,13 @@ CFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns) # https://gcc.gnu.org/b |
|
| 96 |
- obj-$(CONFIG_CRYPTO_BLAKE2B) += blake2b_generic.o |
|
| 97 |
- CFLAGS_blake2b_generic.o := -Wframe-larger-than=4096 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105930 |
|
| 98 |
- obj-$(CONFIG_CRYPTO_GF128MUL) += gf128mul.o |
|
| 99 |
--obj-$(CONFIG_CRYPTO_ECB) += ecb.o |
|
| 100 |
--obj-$(CONFIG_CRYPTO_CBC) += cbc.o |
|
| 101 |
--obj-$(CONFIG_CRYPTO_CFB) += cfb.o |
|
| 102 |
- obj-$(CONFIG_CRYPTO_PCBC) += pcbc.o |
|
| 103 |
--obj-$(CONFIG_CRYPTO_CTS) += cts.o |
|
| 104 |
- obj-$(CONFIG_CRYPTO_LRW) += lrw.o |
|
| 105 |
--obj-$(CONFIG_CRYPTO_XTS) += xts.o |
|
| 106 |
--obj-$(CONFIG_CRYPTO_CTR) += ctr.o |
|
| 107 |
- obj-$(CONFIG_CRYPTO_XCTR) += xctr.o |
|
| 108 |
- obj-$(CONFIG_CRYPTO_HCTR2) += hctr2.o |
|
| 109 |
- obj-$(CONFIG_CRYPTO_KEYWRAP) += keywrap.o |
|
| 110 |
- obj-$(CONFIG_CRYPTO_ADIANTUM) += adiantum.o |
|
| 111 |
- obj-$(CONFIG_CRYPTO_NHPOLY1305) += nhpoly1305.o |
|
| 112 |
--obj-$(CONFIG_CRYPTO_GCM) += gcm.o |
|
| 113 |
--obj-$(CONFIG_CRYPTO_CCM) += ccm.o |
|
| 114 |
- obj-$(CONFIG_CRYPTO_CHACHA20POLY1305) += chacha20poly1305.o |
|
| 115 |
- obj-$(CONFIG_CRYPTO_AEGIS128) += aegis128.o |
|
| 116 |
- aegis128-y := aegis128-core.o |
|
| 117 |
-@@ -140,7 +120,6 @@ obj-$(CONFIG_CRYPTO_TWOFISH) += twofish_generic.o |
|
| 118 |
- obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o |
|
| 119 |
- obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o |
|
| 120 |
- CFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149 |
|
| 121 |
--obj-$(CONFIG_CRYPTO_AES) += aes_generic.o |
|
| 122 |
- CFLAGS_aes_generic.o := $(call cc-option,-fno-code-hoisting) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356 |
|
| 123 |
- obj-$(CONFIG_CRYPTO_SM4) += sm4.o |
|
| 124 |
- obj-$(CONFIG_CRYPTO_SM4_GENERIC) += sm4_generic.o |
|
| 125 |
-@@ -171,7 +150,6 @@ obj-$(CONFIG_CRYPTO_XXHASH) += xxhash_generic.o |
|
| 126 |
- obj-$(CONFIG_CRYPTO_842) += 842.o |
|
| 127 |
- obj-$(CONFIG_CRYPTO_RNG2) += rng.o |
|
| 128 |
- obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o |
|
| 129 |
--obj-$(CONFIG_CRYPTO_DRBG) += drbg.o |
|
| 130 |
- CFLAGS_jitterentropy.o = -O0 |
|
| 131 |
- KASAN_SANITIZE_jitterentropy.o = n |
|
| 132 |
- UBSAN_SANITIZE_jitterentropy.o = n |
|
| 133 |
-@@ -185,13 +163,11 @@ obj-$(CONFIG_CRYPTO_USER_API_RNG) += algif_rng.o |
|
| 134 |
- obj-$(CONFIG_CRYPTO_USER_API_AEAD) += algif_aead.o |
|
| 135 |
- obj-$(CONFIG_CRYPTO_ZSTD) += zstd.o |
|
| 136 |
- obj-$(CONFIG_CRYPTO_OFB) += ofb.o |
|
| 137 |
--obj-$(CONFIG_CRYPTO_ECC) += ecc.o |
|
| 138 |
- obj-$(CONFIG_CRYPTO_ESSIV) += essiv.o |
|
| 139 |
- obj-$(CONFIG_CRYPTO_CURVE25519) += curve25519-generic.o |
|
| 140 |
- |
|
| 141 |
- ecdh_generic-y += ecdh.o |
|
| 142 |
- ecdh_generic-y += ecdh_helper.o |
|
| 143 |
--obj-$(CONFIG_CRYPTO_ECDH) += ecdh_generic.o |
|
| 144 |
- |
|
| 145 |
- $(obj)/ecrdsa_params.asn1.o: $(obj)/ecrdsa_params.asn1.c $(obj)/ecrdsa_params.asn1.h |
|
| 146 |
- $(obj)/ecrdsa_pub_key.asn1.o: $(obj)/ecrdsa_pub_key.asn1.c $(obj)/ecrdsa_pub_key.asn1.h |
|
| 147 |
-@@ -215,3 +191,95 @@ obj-$(CONFIG_CRYPTO_SIMD) += crypto_simd.o |
|
| 148 |
- # Key derivation function |
|
| 149 |
- # |
|
| 150 |
- obj-$(CONFIG_CRYPTO_KDF800108_CTR) += kdf_sp800108.o |
|
| 151 |
-+obj-$(CONFIG_CRYPTO_FIPS) += fips_canister_wrapper_asm.o fips_canister_wrapper.o fips_canister.o |
|
| 152 |
-+obj-$(CONFIG_CRYPTO_FIPS) += testmgr_fips_canister_wrapper.o aesni-intel_glue_fips_canister_wrapper.o |
|
| 153 |
-+ |
|
| 154 |
-+ifdef CONFIG_CRYPTO_FIPS |
|
| 155 |
-+ifneq ($(CONFIG_CRYPTO_FIPS),y) |
|
| 156 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_FIPS=y) |
|
| 157 |
-+endif |
|
| 158 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AEAD)),y) |
|
| 159 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_AEAD=y) |
|
| 160 |
-+endif |
|
| 161 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AEAD2)),y) |
|
| 162 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_AEAD2=y) |
|
| 163 |
-+endif |
|
| 164 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SEQIV)),y) |
|
| 165 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_SEQIV=y) |
|
| 166 |
-+endif |
|
| 167 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_RSA)),y) |
|
| 168 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_RSA=y) |
|
| 169 |
-+endif |
|
| 170 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_MANAGER)),y) |
|
| 171 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_MANAGER=y) |
|
| 172 |
-+endif |
|
| 173 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_MANAGER2)),y) |
|
| 174 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_MANAGER2=y) |
|
| 175 |
-+endif |
|
| 176 |
-+ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS |
|
| 177 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_MANAGER_DISABLE_TESTS to be unset) |
|
| 178 |
-+endif |
|
| 179 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_HMAC)),y) |
|
| 180 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_HMAC=y) |
|
| 181 |
-+endif |
|
| 182 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SHA256)),y) |
|
| 183 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_SHA256=y) |
|
| 184 |
-+endif |
|
| 185 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SHA512)),y) |
|
| 186 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_SHA512=y) |
|
| 187 |
-+endif |
|
| 188 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AES)),y) |
|
| 189 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_AES=y) |
|
| 190 |
-+endif |
|
| 191 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECB)),y) |
|
| 192 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_ECB=y) |
|
| 193 |
-+endif |
|
| 194 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CBC)),y) |
|
| 195 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_CBC=y) |
|
| 196 |
-+endif |
|
| 197 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_XTS)),y) |
|
| 198 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_XTS=y) |
|
| 199 |
-+endif |
|
| 200 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CTR)),y) |
|
| 201 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_CTR=y) |
|
| 202 |
-+endif |
|
| 203 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_DRBG)),y) |
|
| 204 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_DRBG=y) |
|
| 205 |
-+endif |
|
| 206 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_DRBG_HASH)),y) |
|
| 207 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_DRBG_HASH=y) |
|
| 208 |
-+endif |
|
| 209 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_DRBG_CTR)),y) |
|
| 210 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_DRBG_CTR=y) |
|
| 211 |
-+endif |
|
| 212 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECC)),y) |
|
| 213 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_ECC=y) |
|
| 214 |
-+endif |
|
| 215 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECDH)),y) |
|
| 216 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_ECDH=y) |
|
| 217 |
-+endif |
|
| 218 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AES_NI_INTEL)),y) |
|
| 219 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_AES_NI_INTEL=y) |
|
| 220 |
-+endif |
|
| 221 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CFB)),y) |
|
| 222 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_CFB=y) |
|
| 223 |
-+endif |
|
| 224 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CMAC)),y) |
|
| 225 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_CMAC=y) |
|
| 226 |
-+endif |
|
| 227 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CTS)),y) |
|
| 228 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_CTS=y) |
|
| 229 |
-+endif |
|
| 230 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECDSA)),y) |
|
| 231 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_ECDSA=y) |
|
| 232 |
-+endif |
|
| 233 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CCM)),y) |
|
| 234 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_CCM=y) |
|
| 235 |
-+endif |
|
| 236 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_GCM)),y) |
|
| 237 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_GCM=y) |
|
| 238 |
-+endif |
|
| 239 |
-+ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SHA3)),y) |
|
| 240 |
-+ $(error FIPS canister requires CONFIG_CRYPTO_SHA3=y) |
|
| 241 |
-+endif |
|
| 242 |
-+endif |
|
| 243 |
-diff --git a/init/main.c b/init/main.c |
|
| 244 |
-index fe378351e..962edcc54 100644 |
|
| 245 |
-+++ b/init/main.c |
|
| 246 |
-@@ -882,6 +882,8 @@ static int __init early_randomize_kstack_offset(char *buf) |
|
| 247 |
- early_param("randomize_kstack_offset", early_randomize_kstack_offset);
|
|
| 248 |
- #endif |
|
| 249 |
- |
|
| 250 |
-+extern int fips_integrity_init(void); |
|
| 251 |
-+ |
|
| 252 |
- void __init __weak arch_call_rest_init(void) |
|
| 253 |
- {
|
|
| 254 |
- rest_init(); |
|
| 255 |
-@@ -983,6 +985,7 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void) |
|
| 256 |
- /* Architectural and non-timekeeping rng init, before allocator init */ |
|
| 257 |
- random_init_early(command_line); |
|
| 258 |
- |
|
| 259 |
-+ fips_integrity_init(); |
|
| 260 |
- /* |
|
| 261 |
- * These use large bootmem allocations and must precede |
|
| 262 |
- * kmem_cache_init() |
|
| 263 |
-diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile |
|
| 264 |
-index c852f067a..33d229c6d 100644 |
|
| 265 |
-+++ b/lib/crypto/Makefile |
|
| 266 |
-@@ -7,9 +7,6 @@ libcryptoutils-y := memneq.o utils.o |
|
| 267 |
- obj-y += chacha.o |
|
| 268 |
- obj-$(CONFIG_CRYPTO_LIB_CHACHA_GENERIC) += libchacha.o |
|
| 269 |
- |
|
| 270 |
--obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o |
|
| 271 |
--libaes-y := aes.o |
|
| 272 |
-- |
|
| 273 |
- obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o |
|
| 274 |
- libarc4-y := arc4.o |
|
| 275 |
- |
|
| 276 |
-@@ -37,12 +34,6 @@ libpoly1305-y := poly1305-donna32.o |
|
| 277 |
- libpoly1305-$(CONFIG_ARCH_SUPPORTS_INT128) := poly1305-donna64.o |
|
| 278 |
- libpoly1305-y += poly1305.o |
|
| 279 |
- |
|
| 280 |
--obj-$(CONFIG_CRYPTO_LIB_SHA1) += libsha1.o |
|
| 281 |
--libsha1-y := sha1.o |
|
| 282 |
-- |
|
| 283 |
--obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o |
|
| 284 |
--libsha256-y := sha256.o |
|
| 285 |
-- |
|
| 286 |
- ifneq ($(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS),y) |
|
| 287 |
- libblake2s-y += blake2s-selftest.o |
|
| 288 |
- libchacha20poly1305-y += chacha20poly1305-selftest.o |
|
| 289 |
-2.41.0 |
| 290 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,295 @@ |
| 0 |
+From a31ce76f47615c99cc429e8ca0c615401a6f0b0e Mon Sep 17 00:00:00 2001 |
|
| 1 |
+From: Keerthana K <keerthanak@vmware.com> |
|
| 2 |
+Date: Wed, 20 Sep 2023 07:38:08 +0000 |
|
| 3 |
+Subject: [PATCH] FIPS canister binary usage |
|
| 4 |
+ |
|
| 5 |
+Build with fips canister and skip building crypto algorithms. |
|
| 6 |
+Invoke fips canister integrity check during kernel startup. |
|
| 7 |
+ |
|
| 8 |
+This patch can be used at two stages: |
|
| 9 |
+ 1. Prerequisite patch for canister creation. |
|
| 10 |
+ 2. Binary canister usage time. |
|
| 11 |
+ |
|
| 12 |
+Signed-off-by: Alexey Makhalov <amakhalov@vmware.com> |
|
| 13 |
+Signed-off-by: Keerthana K <keerthanak@vmware.com> |
|
| 14 |
+Signed-off-by: Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> |
|
| 15 |
+--- |
|
| 16 |
+ arch/x86/crypto/Makefile | 4 -- |
|
| 17 |
+ crypto/Makefile | 116 +++++++++++++++++++++++++++++++-------- |
|
| 18 |
+ init/main.c | 3 + |
|
| 19 |
+ lib/crypto/Makefile | 9 --- |
|
| 20 |
+ 4 files changed, 95 insertions(+), 37 deletions(-) |
|
| 21 |
+ |
|
| 22 |
+diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile |
|
| 23 |
+index 3b1d701a4..3836c4e30 100644 |
|
| 24 |
+--- a/arch/x86/crypto/Makefile |
|
| 25 |
+@@ -46,10 +46,6 @@ obj-$(CONFIG_CRYPTO_CHACHA20_X86_64) += chacha-x86_64.o |
|
| 26 |
+ chacha-x86_64-y := chacha-avx2-x86_64.o chacha-ssse3-x86_64.o chacha_glue.o |
|
| 27 |
+ chacha-x86_64-$(CONFIG_AS_AVX512) += chacha-avx512vl-x86_64.o |
|
| 28 |
+ |
|
| 29 |
+-obj-$(CONFIG_CRYPTO_AES_NI_INTEL) += aesni-intel.o |
|
| 30 |
+-aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o |
|
| 31 |
+-aesni-intel-$(CONFIG_64BIT) += aesni-intel_avx-x86_64.o aes_ctrby8_avx-x86_64.o |
|
| 32 |
+- |
|
| 33 |
+ obj-$(CONFIG_CRYPTO_SHA1_SSSE3) += sha1-ssse3.o |
|
| 34 |
+ sha1-ssse3-y := sha1_avx2_x86_64_asm.o sha1_ssse3_asm.o sha1_ssse3_glue.o |
|
| 35 |
+ sha1-ssse3-$(CONFIG_AS_SHA1_NI) += sha1_ni_asm.o |
|
| 36 |
+diff --git a/crypto/Makefile b/crypto/Makefile |
|
| 37 |
+index 515ca3a4c..19bf4080d 100644 |
|
| 38 |
+--- a/crypto/Makefile |
|
| 39 |
+@@ -18,10 +18,8 @@ crypto_algapi-y := algapi.o scatterwalk.o $(crypto_algapi-y) |
|
| 40 |
+ obj-$(CONFIG_CRYPTO_ALGAPI2) += crypto_algapi.o |
|
| 41 |
+ |
|
| 42 |
+ obj-$(CONFIG_CRYPTO_AEAD2) += aead.o |
|
| 43 |
+-obj-$(CONFIG_CRYPTO_AEAD2) += geniv.o |
|
| 44 |
+ |
|
| 45 |
+ obj-$(CONFIG_CRYPTO_SKCIPHER2) += skcipher.o |
|
| 46 |
+-obj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o |
|
| 47 |
+ obj-$(CONFIG_CRYPTO_ECHAINIV) += echainiv.o |
|
| 48 |
+ |
|
| 49 |
+ crypto_hash-y += ahash.o |
|
| 50 |
+@@ -44,7 +42,6 @@ rsa_generic-y += rsaprivkey.asn1.o |
|
| 51 |
+ rsa_generic-y += rsa.o |
|
| 52 |
+ rsa_generic-y += rsa_helper.o |
|
| 53 |
+ rsa_generic-y += rsa-pkcs1pad.o |
|
| 54 |
+-obj-$(CONFIG_CRYPTO_RSA) += rsa_generic.o |
|
| 55 |
+ |
|
| 56 |
+ $(obj)/sm2signature.asn1.o: $(obj)/sm2signature.asn1.c $(obj)/sm2signature.asn1.h |
|
| 57 |
+ $(obj)/sm2.o: $(obj)/sm2signature.asn1.h |
|
| 58 |
+@@ -53,13 +50,11 @@ sm2_generic-y += sm2signature.asn1.o |
|
| 59 |
+ sm2_generic-y += sm2.o |
|
| 60 |
+ |
|
| 61 |
+ obj-$(CONFIG_CRYPTO_SM2) += sm2_generic.o |
|
| 62 |
+-obj-$(CONFIG_CRYPTO_SELF_TEST) += crypto_self_test.o |
|
| 63 |
+ |
|
| 64 |
+ $(obj)/ecdsasignature.asn1.o: $(obj)/ecdsasignature.asn1.c $(obj)/ecdsasignature.asn1.h |
|
| 65 |
+ $(obj)/ecdsa.o: $(obj)/ecdsasignature.asn1.h |
|
| 66 |
+ ecdsa_generic-y += ecdsa.o |
|
| 67 |
+ ecdsa_generic-y += ecdsasignature.asn1.o |
|
| 68 |
+-obj-$(CONFIG_CRYPTO_ECDSA) += ecdsa_generic.o |
|
| 69 |
+ |
|
| 70 |
+ crypto_acompress-y := acompress.o |
|
| 71 |
+ crypto_acompress-y += scompress.o |
|
| 72 |
+@@ -67,22 +62,15 @@ obj-$(CONFIG_CRYPTO_ACOMP2) += crypto_acompress.o |
|
| 73 |
+ |
|
| 74 |
+ cryptomgr-y := algboss.o testmgr.o |
|
| 75 |
+ |
|
| 76 |
+-obj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o |
|
| 77 |
+ obj-$(CONFIG_CRYPTO_USER) += crypto_user.o |
|
| 78 |
+ crypto_user-y := crypto_user_base.o |
|
| 79 |
+ crypto_user-$(CONFIG_CRYPTO_STATS) += crypto_user_stat.o |
|
| 80 |
+-obj-$(CONFIG_CRYPTO_CMAC) += cmac.o |
|
| 81 |
+-obj-$(CONFIG_CRYPTO_HMAC) += hmac.o |
|
| 82 |
+ obj-$(CONFIG_CRYPTO_VMAC) += vmac.o |
|
| 83 |
+ obj-$(CONFIG_CRYPTO_XCBC) += xcbc.o |
|
| 84 |
+ obj-$(CONFIG_CRYPTO_NULL2) += crypto_null.o |
|
| 85 |
+ obj-$(CONFIG_CRYPTO_MD4) += md4.o |
|
| 86 |
+ obj-$(CONFIG_CRYPTO_MD5) += md5.o |
|
| 87 |
+ obj-$(CONFIG_CRYPTO_RMD160) += rmd160.o |
|
| 88 |
+-obj-$(CONFIG_CRYPTO_SHA1) += sha1_generic.o |
|
| 89 |
+-obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o |
|
| 90 |
+-obj-$(CONFIG_CRYPTO_SHA512) += sha512_generic.o |
|
| 91 |
+-obj-$(CONFIG_CRYPTO_SHA3) += sha3_generic.o |
|
| 92 |
+ obj-$(CONFIG_CRYPTO_SM3) += sm3.o |
|
| 93 |
+ obj-$(CONFIG_CRYPTO_SM3_GENERIC) += sm3_generic.o |
|
| 94 |
+ obj-$(CONFIG_CRYPTO_STREEBOG) += streebog_generic.o |
|
| 95 |
+@@ -91,21 +79,13 @@ CFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns) # https://gcc.gnu.org/b |
|
| 96 |
+ obj-$(CONFIG_CRYPTO_BLAKE2B) += blake2b_generic.o |
|
| 97 |
+ CFLAGS_blake2b_generic.o := -Wframe-larger-than=4096 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105930 |
|
| 98 |
+ obj-$(CONFIG_CRYPTO_GF128MUL) += gf128mul.o |
|
| 99 |
+-obj-$(CONFIG_CRYPTO_ECB) += ecb.o |
|
| 100 |
+-obj-$(CONFIG_CRYPTO_CBC) += cbc.o |
|
| 101 |
+-obj-$(CONFIG_CRYPTO_CFB) += cfb.o |
|
| 102 |
+ obj-$(CONFIG_CRYPTO_PCBC) += pcbc.o |
|
| 103 |
+-obj-$(CONFIG_CRYPTO_CTS) += cts.o |
|
| 104 |
+ obj-$(CONFIG_CRYPTO_LRW) += lrw.o |
|
| 105 |
+-obj-$(CONFIG_CRYPTO_XTS) += xts.o |
|
| 106 |
+-obj-$(CONFIG_CRYPTO_CTR) += ctr.o |
|
| 107 |
+ obj-$(CONFIG_CRYPTO_XCTR) += xctr.o |
|
| 108 |
+ obj-$(CONFIG_CRYPTO_HCTR2) += hctr2.o |
|
| 109 |
+ obj-$(CONFIG_CRYPTO_KEYWRAP) += keywrap.o |
|
| 110 |
+ obj-$(CONFIG_CRYPTO_ADIANTUM) += adiantum.o |
|
| 111 |
+ obj-$(CONFIG_CRYPTO_NHPOLY1305) += nhpoly1305.o |
|
| 112 |
+-obj-$(CONFIG_CRYPTO_GCM) += gcm.o |
|
| 113 |
+-obj-$(CONFIG_CRYPTO_CCM) += ccm.o |
|
| 114 |
+ obj-$(CONFIG_CRYPTO_CHACHA20POLY1305) += chacha20poly1305.o |
|
| 115 |
+ obj-$(CONFIG_CRYPTO_AEGIS128) += aegis128.o |
|
| 116 |
+ aegis128-y := aegis128-core.o |
|
| 117 |
+@@ -140,7 +120,6 @@ obj-$(CONFIG_CRYPTO_TWOFISH) += twofish_generic.o |
|
| 118 |
+ obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o |
|
| 119 |
+ obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o |
|
| 120 |
+ CFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149 |
|
| 121 |
+-obj-$(CONFIG_CRYPTO_AES) += aes_generic.o |
|
| 122 |
+ CFLAGS_aes_generic.o := $(call cc-option,-fno-code-hoisting) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356 |
|
| 123 |
+ obj-$(CONFIG_CRYPTO_SM4) += sm4.o |
|
| 124 |
+ obj-$(CONFIG_CRYPTO_SM4_GENERIC) += sm4_generic.o |
|
| 125 |
+@@ -171,7 +150,6 @@ obj-$(CONFIG_CRYPTO_XXHASH) += xxhash_generic.o |
|
| 126 |
+ obj-$(CONFIG_CRYPTO_842) += 842.o |
|
| 127 |
+ obj-$(CONFIG_CRYPTO_RNG2) += rng.o |
|
| 128 |
+ obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o |
|
| 129 |
+-obj-$(CONFIG_CRYPTO_DRBG) += drbg.o |
|
| 130 |
+ CFLAGS_jitterentropy.o = -O0 |
|
| 131 |
+ KASAN_SANITIZE_jitterentropy.o = n |
|
| 132 |
+ UBSAN_SANITIZE_jitterentropy.o = n |
|
| 133 |
+@@ -185,13 +163,11 @@ obj-$(CONFIG_CRYPTO_USER_API_RNG) += algif_rng.o |
|
| 134 |
+ obj-$(CONFIG_CRYPTO_USER_API_AEAD) += algif_aead.o |
|
| 135 |
+ obj-$(CONFIG_CRYPTO_ZSTD) += zstd.o |
|
| 136 |
+ obj-$(CONFIG_CRYPTO_OFB) += ofb.o |
|
| 137 |
+-obj-$(CONFIG_CRYPTO_ECC) += ecc.o |
|
| 138 |
+ obj-$(CONFIG_CRYPTO_ESSIV) += essiv.o |
|
| 139 |
+ obj-$(CONFIG_CRYPTO_CURVE25519) += curve25519-generic.o |
|
| 140 |
+ |
|
| 141 |
+ ecdh_generic-y += ecdh.o |
|
| 142 |
+ ecdh_generic-y += ecdh_helper.o |
|
| 143 |
+-obj-$(CONFIG_CRYPTO_ECDH) += ecdh_generic.o |
|
| 144 |
+ |
|
| 145 |
+ $(obj)/ecrdsa_params.asn1.o: $(obj)/ecrdsa_params.asn1.c $(obj)/ecrdsa_params.asn1.h |
|
| 146 |
+ $(obj)/ecrdsa_pub_key.asn1.o: $(obj)/ecrdsa_pub_key.asn1.c $(obj)/ecrdsa_pub_key.asn1.h |
|
| 147 |
+@@ -215,3 +191,95 @@ obj-$(CONFIG_CRYPTO_SIMD) += crypto_simd.o |
|
| 148 |
+ # Key derivation function |
|
| 149 |
+ # |
|
| 150 |
+ obj-$(CONFIG_CRYPTO_KDF800108_CTR) += kdf_sp800108.o |
|
| 151 |
++obj-$(CONFIG_CRYPTO_FIPS) += fips_canister_wrapper_asm.o fips_canister_wrapper.o fips_canister.o |
|
| 152 |
++obj-$(CONFIG_CRYPTO_FIPS) += testmgr_fips_canister_wrapper.o aesni-intel_glue_fips_canister_wrapper.o |
|
| 153 |
++ |
|
| 154 |
++ifdef CONFIG_CRYPTO_FIPS |
|
| 155 |
++ifneq ($(CONFIG_CRYPTO_FIPS),y) |
|
| 156 |
++ $(error FIPS canister requires CONFIG_CRYPTO_FIPS=y) |
|
| 157 |
++endif |
|
| 158 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AEAD)),y) |
|
| 159 |
++ $(error FIPS canister requires CONFIG_CRYPTO_AEAD=y) |
|
| 160 |
++endif |
|
| 161 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AEAD2)),y) |
|
| 162 |
++ $(error FIPS canister requires CONFIG_CRYPTO_AEAD2=y) |
|
| 163 |
++endif |
|
| 164 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SEQIV)),y) |
|
| 165 |
++ $(error FIPS canister requires CONFIG_CRYPTO_SEQIV=y) |
|
| 166 |
++endif |
|
| 167 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_RSA)),y) |
|
| 168 |
++ $(error FIPS canister requires CONFIG_CRYPTO_RSA=y) |
|
| 169 |
++endif |
|
| 170 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_MANAGER)),y) |
|
| 171 |
++ $(error FIPS canister requires CONFIG_CRYPTO_MANAGER=y) |
|
| 172 |
++endif |
|
| 173 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_MANAGER2)),y) |
|
| 174 |
++ $(error FIPS canister requires CONFIG_CRYPTO_MANAGER2=y) |
|
| 175 |
++endif |
|
| 176 |
++ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS |
|
| 177 |
++ $(error FIPS canister requires CONFIG_CRYPTO_MANAGER_DISABLE_TESTS to be unset) |
|
| 178 |
++endif |
|
| 179 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_HMAC)),y) |
|
| 180 |
++ $(error FIPS canister requires CONFIG_CRYPTO_HMAC=y) |
|
| 181 |
++endif |
|
| 182 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SHA256)),y) |
|
| 183 |
++ $(error FIPS canister requires CONFIG_CRYPTO_SHA256=y) |
|
| 184 |
++endif |
|
| 185 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SHA512)),y) |
|
| 186 |
++ $(error FIPS canister requires CONFIG_CRYPTO_SHA512=y) |
|
| 187 |
++endif |
|
| 188 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AES)),y) |
|
| 189 |
++ $(error FIPS canister requires CONFIG_CRYPTO_AES=y) |
|
| 190 |
++endif |
|
| 191 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECB)),y) |
|
| 192 |
++ $(error FIPS canister requires CONFIG_CRYPTO_ECB=y) |
|
| 193 |
++endif |
|
| 194 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CBC)),y) |
|
| 195 |
++ $(error FIPS canister requires CONFIG_CRYPTO_CBC=y) |
|
| 196 |
++endif |
|
| 197 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_XTS)),y) |
|
| 198 |
++ $(error FIPS canister requires CONFIG_CRYPTO_XTS=y) |
|
| 199 |
++endif |
|
| 200 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CTR)),y) |
|
| 201 |
++ $(error FIPS canister requires CONFIG_CRYPTO_CTR=y) |
|
| 202 |
++endif |
|
| 203 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_DRBG)),y) |
|
| 204 |
++ $(error FIPS canister requires CONFIG_CRYPTO_DRBG=y) |
|
| 205 |
++endif |
|
| 206 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_DRBG_HASH)),y) |
|
| 207 |
++ $(error FIPS canister requires CONFIG_CRYPTO_DRBG_HASH=y) |
|
| 208 |
++endif |
|
| 209 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_DRBG_CTR)),y) |
|
| 210 |
++ $(error FIPS canister requires CONFIG_CRYPTO_DRBG_CTR=y) |
|
| 211 |
++endif |
|
| 212 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECC)),y) |
|
| 213 |
++ $(error FIPS canister requires CONFIG_CRYPTO_ECC=y) |
|
| 214 |
++endif |
|
| 215 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECDH)),y) |
|
| 216 |
++ $(error FIPS canister requires CONFIG_CRYPTO_ECDH=y) |
|
| 217 |
++endif |
|
| 218 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_AES_NI_INTEL)),y) |
|
| 219 |
++ $(error FIPS canister requires CONFIG_CRYPTO_AES_NI_INTEL=y) |
|
| 220 |
++endif |
|
| 221 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CFB)),y) |
|
| 222 |
++ $(error FIPS canister requires CONFIG_CRYPTO_CFB=y) |
|
| 223 |
++endif |
|
| 224 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CMAC)),y) |
|
| 225 |
++ $(error FIPS canister requires CONFIG_CRYPTO_CMAC=y) |
|
| 226 |
++endif |
|
| 227 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CTS)),y) |
|
| 228 |
++ $(error FIPS canister requires CONFIG_CRYPTO_CTS=y) |
|
| 229 |
++endif |
|
| 230 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_ECDSA)),y) |
|
| 231 |
++ $(error FIPS canister requires CONFIG_CRYPTO_ECDSA=y) |
|
| 232 |
++endif |
|
| 233 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_CCM)),y) |
|
| 234 |
++ $(error FIPS canister requires CONFIG_CRYPTO_CCM=y) |
|
| 235 |
++endif |
|
| 236 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_GCM)),y) |
|
| 237 |
++ $(error FIPS canister requires CONFIG_CRYPTO_GCM=y) |
|
| 238 |
++endif |
|
| 239 |
++ifneq ($(subst Y,y,$(CONFIG_CRYPTO_SHA3)),y) |
|
| 240 |
++ $(error FIPS canister requires CONFIG_CRYPTO_SHA3=y) |
|
| 241 |
++endif |
|
| 242 |
++endif |
|
| 243 |
+diff --git a/init/main.c b/init/main.c |
|
| 244 |
+index fe378351e..962edcc54 100644 |
|
| 245 |
+--- a/init/main.c |
|
| 246 |
+@@ -882,6 +882,8 @@ static int __init early_randomize_kstack_offset(char *buf) |
|
| 247 |
+ early_param("randomize_kstack_offset", early_randomize_kstack_offset);
|
|
| 248 |
+ #endif |
|
| 249 |
+ |
|
| 250 |
++extern int fips_integrity_init(void); |
|
| 251 |
++ |
|
| 252 |
+ void __init __weak arch_call_rest_init(void) |
|
| 253 |
+ {
|
|
| 254 |
+ rest_init(); |
|
| 255 |
+@@ -983,6 +985,7 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void) |
|
| 256 |
+ /* Architectural and non-timekeeping rng init, before allocator init */ |
|
| 257 |
+ random_init_early(command_line); |
|
| 258 |
+ |
|
| 259 |
++ fips_integrity_init(); |
|
| 260 |
+ /* |
|
| 261 |
+ * These use large bootmem allocations and must precede |
|
| 262 |
+ * kmem_cache_init() |
|
| 263 |
+diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile |
|
| 264 |
+index c852f067a..33d229c6d 100644 |
|
| 265 |
+--- a/lib/crypto/Makefile |
|
| 266 |
+@@ -7,9 +7,6 @@ libcryptoutils-y := memneq.o utils.o |
|
| 267 |
+ obj-y += chacha.o |
|
| 268 |
+ obj-$(CONFIG_CRYPTO_LIB_CHACHA_GENERIC) += libchacha.o |
|
| 269 |
+ |
|
| 270 |
+-obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o |
|
| 271 |
+-libaes-y := aes.o |
|
| 272 |
+- |
|
| 273 |
+ obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o |
|
| 274 |
+ libarc4-y := arc4.o |
|
| 275 |
+ |
|
| 276 |
+@@ -37,12 +34,6 @@ libpoly1305-y := poly1305-donna32.o |
|
| 277 |
+ libpoly1305-$(CONFIG_ARCH_SUPPORTS_INT128) := poly1305-donna64.o |
|
| 278 |
+ libpoly1305-y += poly1305.o |
|
| 279 |
+ |
|
| 280 |
+-obj-$(CONFIG_CRYPTO_LIB_SHA1) += libsha1.o |
|
| 281 |
+-libsha1-y := sha1.o |
|
| 282 |
+- |
|
| 283 |
+-obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o |
|
| 284 |
+-libsha256-y := sha256.o |
|
| 285 |
+- |
|
| 286 |
+ ifneq ($(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS),y) |
|
| 287 |
+ libblake2s-y += blake2s-selftest.o |
|
| 288 |
+ libchacha20poly1305-y += chacha20poly1305-selftest.o |
|
| 289 |
+-- |
|
| 290 |
+2.41.0 |
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
Summary: Kernel |
| 22 | 22 |
Name: linux-esx |
| 23 | 23 |
Version: 6.1.62 |
| 24 |
-Release: 5%{?dist}
|
|
| 24 |
+Release: 6%{?dist}
|
|
| 25 | 25 |
License: GPLv2 |
| 26 | 26 |
URL: http://www.kernel.org |
| 27 | 27 |
Group: System Environment/Kernel |
| ... | ... |
@@ -57,9 +57,9 @@ Source8: https://sourceforge.net/projects/e1000/files/ice%20stable/%{ice_v
|
| 57 | 57 |
%if 0%{?fips}
|
| 58 | 58 |
Source9: check_fips_canister_struct_compatibility.inc |
| 59 | 59 |
|
| 60 |
-%define fips_canister_version 5.0.0-6.1.62-2%{?dist}-secure
|
|
| 60 |
+%define fips_canister_version 5.0.0-6.1.62-7%{?dist}-secure
|
|
| 61 | 61 |
Source16: fips-canister-%{fips_canister_version}.tar.bz2
|
| 62 |
-%define sha512 fips-canister=212844b76c93cb7b07d630c558a2968740ab1eec80209ea7f407f3f32a21135e6be74fd5622a252601495d4b3e2fe952c2a17f8501724ea1c804ca6078eef4f8 |
|
| 62 |
+%define sha512 fips-canister=e63f5200a669cc40952fc1cfea499d4bc029999098f8252d2c5ffac08392aefe3d57aa68226079dffa4e0f5ddd26c83f85fcebcb21bfd0935aecc8a02f1714a9 |
|
| 63 | 63 |
|
| 64 | 64 |
Source18: speedup-algos-registration-in-non-fips-mode.patch |
| 65 | 65 |
%endif |
| ... | ... |
@@ -219,7 +219,7 @@ Patch505: 0001-changes-to-build-with-jitterentropy-v3.4.1.patch |
| 219 | 219 |
|
| 220 | 220 |
%if 0%{?fips}
|
| 221 | 221 |
# FIPS canister usage patch |
| 222 |
-Patch508: 6.1.62-2-0001-FIPS-canister-binary-usage.patch |
|
| 222 |
+Patch508: 6.1.62-7-0001-FIPS-canister-binary-usage.patch |
|
| 223 | 223 |
Patch509: 0001-scripts-kallsyms-Extra-kallsyms-parsing.patch |
| 224 | 224 |
Patch510: FIPS-do-not-allow-not-certified-algos-in-fips-2.patch |
| 225 | 225 |
%endif |
| ... | ... |
@@ -548,6 +548,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
|
| 548 | 548 |
%{_usrsrc}/linux-headers-%{uname_r}
|
| 549 | 549 |
|
| 550 | 550 |
%changelog |
| 551 |
+* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-6 |
|
| 552 |
+- Update canister to 5.0.0-6.1.62-7 |
|
| 551 | 553 |
* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-5 |
| 552 | 554 |
- Update canister to 5.0.0-6.1.62-2 |
| 553 | 555 |
* Wed Dec 20 2023 Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> 6.1.62-4 |
| ... | ... |
@@ -14,7 +14,7 @@ |
| 14 | 14 |
Summary: Kernel |
| 15 | 15 |
Name: linux-rt |
| 16 | 16 |
Version: 6.1.62 |
| 17 |
-Release: 4%{?dist}
|
|
| 17 |
+Release: 5%{?dist}
|
|
| 18 | 18 |
License: GPLv2 |
| 19 | 19 |
URL: http://www.kernel.org |
| 20 | 20 |
Group: System Environment/Kernel |
| ... | ... |
@@ -58,9 +58,9 @@ Source9: https://sourceforge.net/projects/e1000/files/ice%20stable/%{ice_version
|
| 58 | 58 |
%if 0%{?fips}
|
| 59 | 59 |
Source10: check_fips_canister_struct_compatibility.inc |
| 60 | 60 |
|
| 61 |
-%define fips_canister_version 5.0.0-6.1.62-2%{?dist}-secure
|
|
| 61 |
+%define fips_canister_version 5.0.0-6.1.62-7%{?dist}-secure
|
|
| 62 | 62 |
Source16: fips-canister-%{fips_canister_version}.tar.bz2
|
| 63 |
-%define sha512 fips-canister=212844b76c93cb7b07d630c558a2968740ab1eec80209ea7f407f3f32a21135e6be74fd5622a252601495d4b3e2fe952c2a17f8501724ea1c804ca6078eef4f8 |
|
| 63 |
+%define sha512 fips-canister=e63f5200a669cc40952fc1cfea499d4bc029999098f8252d2c5ffac08392aefe3d57aa68226079dffa4e0f5ddd26c83f85fcebcb21bfd0935aecc8a02f1714a9 |
|
| 64 | 64 |
%endif |
| 65 | 65 |
|
| 66 | 66 |
Source19: spec_install_post.inc |
| ... | ... |
@@ -184,7 +184,7 @@ Patch1005: 0001-changes-to-build-with-jitterentropy-v3.4.1.patch |
| 184 | 184 |
|
| 185 | 185 |
%if 0%{?fips}
|
| 186 | 186 |
# FIPS canister usage patch |
| 187 |
-Patch1008: 6.1.62-2-0001-FIPS-canister-binary-usage.patch |
|
| 187 |
+Patch1008: 6.1.62-7-0001-FIPS-canister-binary-usage.patch |
|
| 188 | 188 |
Patch1009: 0001-scripts-kallsyms-Extra-kallsyms-parsing.patch |
| 189 | 189 |
Patch1010: FIPS-do-not-allow-not-certified-algos-in-fips-2.patch |
| 190 | 190 |
%endif |
| ... | ... |
@@ -506,6 +506,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
|
| 506 | 506 |
%{_usrsrc}/linux-headers-%{uname_r}
|
| 507 | 507 |
|
| 508 | 508 |
%changelog |
| 509 |
+* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-5 |
|
| 510 |
+- Update canister to 5.0.0-6.1.62-7 |
|
| 509 | 511 |
* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-4 |
| 510 | 512 |
- Update canister to 5.0.0-6.1.62-2 |
| 511 | 513 |
* Wed Dec 20 2023 Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> 6.1.62-3 |
| ... | ... |
@@ -14,7 +14,7 @@ |
| 14 | 14 |
Summary: Kernel |
| 15 | 15 |
Name: linux-secure |
| 16 | 16 |
Version: 6.1.62 |
| 17 |
-Release: 9%{?kat_build:.kat}%{?dist}
|
|
| 17 |
+Release: 10%{?kat_build:.kat}%{?dist}
|
|
| 18 | 18 |
License: GPLv2 |
| 19 | 19 |
URL: http://www.kernel.org |
| 20 | 20 |
Group: System Environment/Kernel |
| ... | ... |
@@ -40,9 +40,9 @@ Source5: linux-sbat.csv.in |
| 40 | 40 |
%if 0%{?fips}
|
| 41 | 41 |
Source9: check_fips_canister_struct_compatibility.inc |
| 42 | 42 |
|
| 43 |
-%define fips_canister_version 5.0.0-6.1.62-2%{dist}-secure
|
|
| 43 |
+%define fips_canister_version 5.0.0-6.1.62-7%{dist}-secure
|
|
| 44 | 44 |
Source16: fips-canister-%{fips_canister_version}.tar.bz2
|
| 45 |
-%define sha512 fips-canister=212844b76c93cb7b07d630c558a2968740ab1eec80209ea7f407f3f32a21135e6be74fd5622a252601495d4b3e2fe952c2a17f8501724ea1c804ca6078eef4f8 |
|
| 45 |
+%define sha512 fips-canister=e63f5200a669cc40952fc1cfea499d4bc029999098f8252d2c5ffac08392aefe3d57aa68226079dffa4e0f5ddd26c83f85fcebcb21bfd0935aecc8a02f1714a9 |
|
| 46 | 46 |
%endif |
| 47 | 47 |
|
| 48 | 48 |
%if 0%{?canister_build}
|
| ... | ... |
@@ -155,7 +155,7 @@ Patch505: 0001-changes-to-build-with-jitterentropy-v3.4.1.patch |
| 155 | 155 |
|
| 156 | 156 |
%if 0%{?fips}
|
| 157 | 157 |
# FIPS canister usage patch |
| 158 |
-Patch508: 6.1.62-2-0001-FIPS-canister-binary-usage.patch |
|
| 158 |
+Patch508: 6.1.62-7-0001-FIPS-canister-binary-usage.patch |
|
| 159 | 159 |
Patch509: 0001-scripts-kallsyms-Extra-kallsyms-parsing.patch |
| 160 | 160 |
Patch510: FIPS-do-not-allow-not-certified-algos-in-fips-2.patch |
| 161 | 161 |
%endif |
| ... | ... |
@@ -164,7 +164,7 @@ Patch510: FIPS-do-not-allow-not-certified-algos-in-fips-2.patch |
| 164 | 164 |
# Below patches are common for fips and canister_build flags |
| 165 | 165 |
# 0001-FIPS-canister-binary-usage.patch is renamed as <ver-rel>-0001-FIPS-canister-binary-usage.patch |
| 166 | 166 |
# in both places until final canister binary is released |
| 167 |
-Patch10000: 6.1.62-2-0001-FIPS-canister-binary-usage.patch |
|
| 167 |
+Patch10000: 6.1.62-7-0001-FIPS-canister-binary-usage.patch |
|
| 168 | 168 |
Patch10001: 0001-scripts-kallsyms-Extra-kallsyms-parsing.patch |
| 169 | 169 |
# Below patches are specific to canister_build flag |
| 170 | 170 |
Patch10003: 0002-FIPS-canister-creation.patch |
| ... | ... |
@@ -468,6 +468,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
|
| 468 | 468 |
%endif |
| 469 | 469 |
|
| 470 | 470 |
%changelog |
| 471 |
+* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-10 |
|
| 472 |
+- Update canister to 5.0.0-6.1.62-7 |
|
| 471 | 473 |
* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-9 |
| 472 | 474 |
- Include a RSA patch to canister that verifies whether public exponent is in prescribed range |
| 473 | 475 |
* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-8 |
| ... | ... |
@@ -25,7 +25,7 @@ |
| 25 | 25 |
Summary: Kernel |
| 26 | 26 |
Name: linux |
| 27 | 27 |
Version: 6.1.62 |
| 28 |
-Release: 4%{?acvp_build:.acvp}%{?dist}
|
|
| 28 |
+Release: 5%{?acvp_build:.acvp}%{?dist}
|
|
| 29 | 29 |
License: GPLv2 |
| 30 | 30 |
URL: http://www.kernel.org/ |
| 31 | 31 |
Group: System Environment/Kernel |
| ... | ... |
@@ -70,9 +70,9 @@ Source13: https://sourceforge.net/projects/e1000/files/ice%20stable/%{ice_
|
| 70 | 70 |
%if 0%{?fips}
|
| 71 | 71 |
Source9: check_fips_canister_struct_compatibility.inc |
| 72 | 72 |
|
| 73 |
-%define fips_canister_version 5.0.0-6.1.62-2%{?dist}-secure
|
|
| 73 |
+%define fips_canister_version 5.0.0-6.1.62-7%{?dist}-secure
|
|
| 74 | 74 |
Source16: fips-canister-%{fips_canister_version}.tar.bz2
|
| 75 |
-%define sha512 fips-canister=212844b76c93cb7b07d630c558a2968740ab1eec80209ea7f407f3f32a21135e6be74fd5622a252601495d4b3e2fe952c2a17f8501724ea1c804ca6078eef4f8 |
|
| 75 |
+%define sha512 fips-canister=e63f5200a669cc40952fc1cfea499d4bc029999098f8252d2c5ffac08392aefe3d57aa68226079dffa4e0f5ddd26c83f85fcebcb21bfd0935aecc8a02f1714a9 |
|
| 76 | 76 |
%endif |
| 77 | 77 |
|
| 78 | 78 |
Source18: spec_install_post.inc |
| ... | ... |
@@ -221,7 +221,7 @@ Patch505: 0001-changes-to-build-with-jitterentropy-v3.4.1.patch |
| 221 | 221 |
|
| 222 | 222 |
%if 0%{?fips}
|
| 223 | 223 |
# FIPS canister usage patch |
| 224 |
-Patch508: 6.1.62-2-0001-FIPS-canister-binary-usage.patch |
|
| 224 |
+Patch508: 6.1.62-7-0001-FIPS-canister-binary-usage.patch |
|
| 225 | 225 |
Patch509: 0001-scripts-kallsyms-Extra-kallsyms-parsing.patch |
| 226 | 226 |
Patch510: FIPS-do-not-allow-not-certified-algos-in-fips-2.patch |
| 227 | 227 |
%endif |
| ... | ... |
@@ -799,6 +799,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
|
| 799 | 799 |
%{_datadir}/bash-completion/completions/bpftool
|
| 800 | 800 |
|
| 801 | 801 |
%changelog |
| 802 |
+* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-5 |
|
| 803 |
+- Update canister to 5.0.0-6.1.62-7 |
|
| 802 | 804 |
* Wed Dec 20 2023 Keerthana K <keerthanak@vmware.com> 6.1.62-4 |
| 803 | 805 |
- Update canister to 5.0.0-6.1.62-2 |
| 804 | 806 |
* Wed Dec 20 2023 Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> 6.1.62-3 |