From: dsaxena@plexity.net
To: linux-kernel@vger.kernel.org
Cc: jgarzik@pobox.net, akpm@osdl.org, tony@atomide.com
Subject: [patch 0/5] RNG cleanup & new drivers attempt #1
Date: Wed, 19 Oct 2005 01:19:06 -0700 [thread overview]
Message-ID: <20051019081906.615365000@omelas> (raw)
This patch set is my first pass at adding support for some more
RNG drivers to the kernel. My basic goal was to keep the same
user space interface as exists, but not have to reproduce all
the same 100 lines of user space interface code across every new
driver (as we currently do with watchdogs...)
The new code separate the HW specifc driver from the user
interface code and just adds a few function pointers so that
the two can talk to each other. I opted out of using a sysfs
class and all that complication b/c there will be one and only
one RNG device at a time from all the HW I can see.
I've added drivers for Intels' IXP4xx and for the TI OMAP,
though the later has not been tested (it builds) as I don't
have the hardware. Same goes for x86...builds but no HW for
me to test locally. Freescale MPC8xxx is next but that requires
a bit more work.
As for the discussion on moving the implementation completely
out of the kernel, it is not completely doable. While we
can do it for simple HW such as the IXP and X86, there are
some cases that basically require us to have kernel code:
- On systems like OMAP, we want to be able to suspend/resume
the RNG device and the device clocks and that needs to be done
from kernel space as part of the PM path.
- On the MPC8xxx, the RNG is just part of a large crypto unit
that also does SHA-1 and MD5 along with some other operations
for which I'd like to see (and will probably write) a driver. The
RNG commands are queued in a chain along with the other units and
trying to get user space to share that queue will just be a mess.
So..we might as well keep them all in the kernel instead of having
to know about some HW and not know about others.
Some of the things on my TODO list:
- Allow a fastpath where we don't even have the user space portion
and the HW drivers just feed the entropy pool directly. While
this bypasses the FIPS tests and such, there are some applications
where this is OK or where we really don't want the extra proccess
context switching. This is specially true on ARM. I'll have to add
IRQ driven support to the drivers to that, but that's trivial. There
is also some HW (MPC8xxx for example) that does periodic self-tests
in HW and lists itself as "FIPs-compliant" and will trigger an error if
data should no longer be trusted and in that case doing a software
test might also be undesirable. But...we should let the user decide
at build time (or runtime?).
- Since I'm adding IRQ support, go ahead and add poll(2) support so
that when we do have a user space daemon, it's not constantly
poking at us.
~Deepak
(This is my first time using the magical quilt mail scripts so apologies
in advance if anything breaks)
--
Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net
Even a stopped clock gives the right time twice a day.
next reply other threads:[~2005-10-19 9:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-19 8:19 dsaxena [this message]
2005-10-19 8:19 ` [patch 1/5] Remove existing hw_random implementation dsaxena
2005-10-19 8:19 ` [patch 2/5] Core HW RNG support dsaxena
2005-10-24 10:45 ` Pavel Machek
2005-10-19 8:19 ` [patch 3/5] Intel IXP4xx driver dsaxena
2005-10-19 8:19 ` [patch 4/5] x86 driver dsaxena
2005-10-19 8:19 ` [patch 5/5] TI OMAP driver dsaxena
2005-10-19 9:36 ` Eric Piel
2005-10-19 9:44 ` Deepak Saxena
2005-10-21 16:35 ` Tony Lindgren
2005-10-21 18:00 ` Tony Lindgren
2005-10-21 19:10 ` Tony Lindgren
2005-10-23 18:12 ` Deepak Saxena
2005-10-19 15:01 ` [patch 0/5] RNG cleanup & new drivers attempt #1 Jeff Garzik
2005-10-19 17:25 ` Deepak Saxena
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=20051019081906.615365000@omelas \
--to=dsaxena@plexity.net \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tony@atomide.com \
/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