]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: testmgr - add panic_on_fail module parameter
authorEric Biggers <ebiggers@google.com>
Sun, 31 Mar 2019 20:09:14 +0000 (13:09 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 8 Apr 2019 06:42:55 +0000 (14:42 +0800)
commitbe3d8af610bac6338369738340f026df2ff038ba
tree51f0004dac37be337d0bf12a43b7f7b35663d94d
parent35a9a1e400efaca9f0165fc6c5f91f4bbfa7bfee
crypto: testmgr - add panic_on_fail module parameter

Add a module parameter cryptomgr.panic_on_fail which causes the kernel
to panic if any crypto self-tests fail.

Use cases:

- More easily detect crypto self-test failures by boot testing,
  e.g. on KernelCI.
- Get a bug report if syzkaller manages to use the template system to
  instantiate an algorithm that fails its self-tests.

The command-line option "fips=1" already does this, but it also makes
other changes not wanted for general testing, such as disabling
"unapproved" algorithms.  panic_on_fail just does what it says.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/testmgr.c