Commits
Horia Geantă committed 97dc4e4fa4a
LF-63-1 crypto: caam - fix SM test init Commit 77debf316c44 ("LFV-26 crypto: caam - fix Secure Memory driver init") addressed SM driver initialization and also update SM test. However, the fix for SM test is insufficient. There are cases when SM test runs before SM driver, causing a crash due to uninitialized "priv" pointer being dereferenced. The fix consists in the following: 1. Since SM test is a "bare" device driver (doesn't sit on any bus), there is no deferred probing support. Thus we have no choice (*) but to abort SM tests with a notification. (*) We don't want to force SM driver running first by means of init levels etc. Just KISS. 2. SM test driver forced to being built only as a module Since SM test driver's only goal is to run SM tests, it doesn't make any sense to be built-in. Building the driver as a module allows for running the tests several times if needed (multiple modprobe & rmmod cycles). Note: from the perspective of wanting to test repetitively, it would make sense to force module unloading by returning an error code in the module_init function. However, this might affect test scripts (due to error code and/or message output by unsuccessful module loading), so we postpone this change for now. Fixes: d02fe599d7d5 ("MLKU-25-3 crypto: caam - add Secure Memory support") Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Acked-by: Leonard Crestez <leonard.crestez@nxp.com>