There is no good reason for the CRYPTO_FIPS140 kconfig option to exist separately from CRYPTO_FIPS140_MOD. It existed mainly to guard some code in the module loader that was needed only for loading the fips140 module. However, that code has been removed, since an alternate solution that doesn't require changes to the module loader was found. The remaining references to CRYPTO_FIPS140 are in: - scripts/module.lds.S. But the guarded code only affects building the fips140 module, so CRYPTO_FIPS140_MOD should be used here instead. - lib/crypto/, for guarding the Android vendor hooks required by the fips140 module. However, Android vendor hooks are already guarded by ANDROID_VENDOR_HOOKS. The extra guard by CRYPTO_FIPS140 isn't useful, especially since CRYPTO_FIPS140 was effectively hardcoded to y anyway. It did have the side effect of making the hooks be guarded by arm64, which excluded them from builds of arch/x86/purgatory/. However, a cleaner way to accomplish that is to check for __DISABLE_EXPORTS, which handles both arch/x86/purgatory/ and fips140.ko itself. Bug: 188620248 Change-Id: Ic6141cd2a553540c2bf95774e71de7310926e3ce Signed-off-by: Eric Biggers <ebiggers@google.com>
2.6 KiB
2.6 KiB