File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 952952 }
953953
954954 /* A new feature set is a new operating environment: re-run the power-on
955- * self test, which resets every CAST to run again on the new lanes.
956- * The kernel module suspends signal handling around the self test. */
955+ * self test, then run every CAST on the new lanes now instead of waiting
956+ * for first use, which is what the kernel module does at load. Signals
957+ * stay suspended across both so a CAST cannot be cut short. */
957958 static WC_INLINE void cpuid_recast (void )
958959 {
959960 #if defined(HAVE_FIPS ) && FIPS_VERSION3_GE (7 ,0 ,0 )
963964 return ;
964965 }
965966 ret = wolfCrypt_IntegrityTest_fips ();
967+ if (ret == 0 )
968+ ret = wc_RunAllCast_fips ();
966969 (void )WC_SIG_IGNORE_END ();
967970 if (ret != 0 )
968971 WOLFSSL_MSG ("cpuid: self test failed after a feature change" );
Original file line number Diff line number Diff line change @@ -247,8 +247,9 @@ typedef word32 cpuid_flags_t;
247247 }
248248
249249 /* Public APIs to modify flags. In FIPS builds a call that changes them
250- * re-runs the power-on self test; operations in flight see the module in
251- * its start-up state and fail until it completes. */
250+ * re-runs the power-on self test and every CAST on the new lanes;
251+ * operations in flight see the module in its start-up state and fail
252+ * until it completes. */
252253
253254 #ifdef WOLFSSL_API_PREFIX_MAP
254255 #define cpuid_select_flags wc_cpuid_select_flags
You can’t perform that action at this time.
0 commit comments