diff mbox series

Documentation: crypto: add info about "fips=" boot option

Message ID 20210330040001.31524-1-rdunlap@infradead.org
State New
Headers show
Series Documentation: crypto: add info about "fips=" boot option | expand

Commit Message

Randy Dunlap March 30, 2021, 4 a.m. UTC
Having just seen a report of using "fips=1" on the kernel command line,
I could not find it documented anywhere, so add some help for it.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: linux-crypto@vger.kernel.org
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
---
Updates/corrections welcome.

 Documentation/admin-guide/kernel-parameters.txt |   15 ++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Herbert Xu March 30, 2021, 4:37 a.m. UTC | #1
On Mon, Mar 29, 2021 at 09:00:01PM -0700, Randy Dunlap wrote:
>
> +			If fips_enabled = 1, some crypto tests are skipped.

I don't think any tests are skipped.  It does however disable
many algorithms by essentially failing them at the testing stage.

Cheers,
Herbert Xu March 30, 2021, 5:02 a.m. UTC | #2
On Mon, Mar 29, 2021 at 10:00:45PM -0700, Randy Dunlap wrote:
> On 3/29/21 9:37 PM, Herbert Xu wrote:
> > On Mon, Mar 29, 2021 at 09:00:01PM -0700, Randy Dunlap wrote:
> >>
> >> +			If fips_enabled = 1, some crypto tests are skipped.
> > 
> > I don't think any tests are skipped.  It does however disable
> > many algorithms by essentially failing them at the testing stage.
> 
> That statement was based on crypto/testmgr.c (in 4 places):
> 
> 		if (fips_enabled && template[i].fips_skip)
> 			continue;

By skipping the test, the algorithm effectively fails the self-test
and therefore is disabled.

Cheers,
diff mbox series

Patch

--- linux-next-20210329.orig/Documentation/admin-guide/kernel-parameters.txt
+++ linux-next-20210329/Documentation/admin-guide/kernel-parameters.txt
@@ -1370,6 +1370,21 @@ 
 			See Documentation/admin-guide/sysctl/net.rst for
 			fb_tunnels_only_for_init_ns
 
+	fips=		Format: { 0 | 1}
+			Use to disable (0) or enable (1) FIPS mode.
+			If enabled, any process that is waiting on the
+			'fips_fail_notif_chain' will be notified of fips
+			failures.
+			This setting can also be modified via sysctl at
+			/proc/sysctl/crypto/fips_enabled, i.e.,
+			crypto.fips_enabled.
+			If fips_enabled = 1, some crypto tests are skipped.
+			It can also effect which ECC curve is used.
+			If fips_enabled = 1 and a test fails, it will cause a
+			kernel panic.
+			If fips_enabled = 1, RSA test requires a key size of
+			2K or larger.
+
 	floppy=		[HW]
 			See Documentation/admin-guide/blockdev/floppy.rst.