The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org,
	corbet@lwn.net, herbert@gondor.apana.org.au, davem@davemloft.net,
	sm@eperm.de
Subject: [PATCH v3] crypto: Add a flag allowing the self-tests to be disabled at runtime.
Date: Tue,  3 May 2016 10:00:16 +0100	[thread overview]
Message-ID: <1462266017-28022-1-git-send-email-rjones@redhat.com> (raw)

v2 -> v3:

 - Ignore the flag if FIPS mode is enabled.

v1 -> v2:

 - Use printk_once.  Because the serial console is so slow, printing
   the message multiple times actually consumed about 6ms extra later
   on during the boot.

- - -

I'm trying to reduce the time taken in the kernel in initcalls, with
my aim being to reduce the current ~700ms spent in initcalls before
userspace, down to something like 100ms.  All times on my Broadwell-U
laptop, under virtualization.  The purpose of this is to be able to
launch VMs around containers with minimal overhead, like Intel Clear
Containers, but using standard distro kernels and qemu.

Currently the kernel spends 28ms (on my laptop) running crypto
algorithm self-tests.  Although it's possibe to disable these at
compile time, Fedora kernel maintainers want to maintain a single
kernel image for all uses.

So this commit adds a runtime flag which callers can set to skip the
self-tests in the fast container/virtualization case.

Rich.

             reply	other threads:[~2016-05-03  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03  9:00 Richard W.M. Jones [this message]
2016-05-03  9:00 ` [PATCH v3] crypto: Add a flag allowing the self-tests to be disabled at runtime Richard W.M. Jones
2016-05-05  6:46   ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462266017-28022-1-git-send-email-rjones@redhat.com \
    --to=rjones@redhat.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sm@eperm.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox