linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sandy Harris <sandyinchina@gmail.com>
To: Jason Cooper <jason@lakedaemon.net>
Cc: "Theodore Ts\\'o" <tytso@mit.edu>,
	"H. Peter Anvin" <hpa@zytor.com>, John Denker <jsd@av8n.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-crypto@vger.kernel.org
Subject: Re: [PATCH 1/7] A couple of generated files
Date: Sat, 7 Nov 2015 13:50:52 -0500	[thread overview]
Message-ID: <CACXcFmkw0O3Od7oAYz8+ZSrRaT-L1kDL=2yStLvKbwOt1QGR2A@mail.gmail.com> (raw)
In-Reply-To: <20151107165343.GA29133@io.lakedaemon.net>

Jason Cooper <jason@lakedaemon.net> wrote:

> I know we talked  about this series offlist, but we need to fill in
> folks who are seeing it for the first time.  Usually, this is done with
> a coverletter (--coverletter for git format-patch).

Yes, your help plus the O'Reilly book got me using git without
too many errors, but I'm still getting things wrong & missing
the cover letter was one.

> No need to resend
> before receiving feedback, but would you mind replying with a
> description of the problem you're attempting to solve and how the series
> solves it?

There are two groups of changes, each controlled by a config
variable. Default for both is 'n'.

CONFIG_RANDOM_INIT: initialise the pools with data from
/dev/urandom on the machine that compiles the kernel.
Comments for the generator program scripts/gen_random.c
have details.

The main change in random.c is adding conditionals
to make it use the random data if CONFIG_RANDOM_INIT
is set. There is also a trivial fix updating a reference to an
obsoleted in a comment, and I added some sanity-check
#if tests for odd #define parameter values.

This is a fairly simple change. I do not think it needs a config
variable; it should just be the default. However I put it under
config control for testing.

CONFIG_RANDOM_GCM controls a much larger and
less clearly desirable set of changes. It switches
compilation between random.c and and a heavily
modified version random_gcm.c

This uses the hash from AES-GCM instead of SHA-1,
and that allows a lot of other changes. The main
design goal was to decouple the two output pools
so that heavy use of the nonblocking pool cannot
deplete entropy in the input pool. The nonblocking
pool usually rekeys from the blocking pool instead.
random_gcm.c has extensive comments on both
the rationale for this approach & the details of my
implementation.

random_gcm.c is not close to being a finished
product, in particular my code is not yet well
integrated with existing driver code.

Most of the code was developed and has been
fairly well tested outside the kernel.
Test program is at:
https://github.com/sandy-harris/random.test

I just dropped a large chunk of that code into
a copy of random.c, made modifications to
make the style match better & to get it to
compile in the kernel context, then deleted
a few chunks of existing driver code and
replaced them with calls to my stuff.

Proper integration would involve both
replacing more of the existing code with
new and moving a few important bits of
the existing code into some of my functions.
In particular, my stuff does not yet block
in the right places.

  reply	other threads:[~2015-11-07 18:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07 14:30 [PATCH 1/7] A couple of generated files Sandy Harris
2015-11-07 14:30 ` [PATCH 2/7] Two new CONFIG options for the random(4) driver Sandy Harris
2015-11-07 14:30 ` [PATCH 3/7] Initialise pools randomly if CONFIG_RANDOM_INIT=y Sandy Harris
2015-11-07 16:54   ` Jason Cooper
2015-11-07 17:08   ` kbuild test robot
2015-11-07 14:30 ` [PATCH 4/7] Different version of driver using hash from AES-GCM Compiled if CONFIG_RANDOM_GCM=y Sandy Harris
2015-11-07 14:30 ` [PATCH 5/7] Conditionals for CONFIG_RANDOM_INIT and CONFIG_RANDOM_GCM Sandy Harris
2015-11-07 17:11   ` kbuild test robot
2015-11-07 14:30 ` [PATCH 6/7] Produces generated/random_init.h for random driver Sandy Harris
2015-11-07 14:30 ` [PATCH 7/7] Create generated/random_init.h, used by " Sandy Harris
2015-11-07 16:00   ` kbuild test robot
2015-11-07 21:18   ` kbuild test robot
2015-11-08 11:14   ` kbuild test robot
2015-11-07 16:53 ` [PATCH 1/7] A couple of generated files Jason Cooper
2015-11-07 18:50   ` Sandy Harris [this message]
2016-03-02  3:15     ` Sandy Harris
2015-11-07 17:01 ` Jason Cooper
2015-11-07 17:50   ` Sandy Harris

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='CACXcFmkw0O3Od7oAYz8+ZSrRaT-L1kDL=2yStLvKbwOt1QGR2A@mail.gmail.com' \
    --to=sandyinchina@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jason@lakedaemon.net \
    --cc=jsd@av8n.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).