From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Gerd Stolpmann <info@gerd-stolpmann.de>
Subject: Re: [uml-devel] Strange behaviour of hwrng
Date: Fri, 21 Oct 2005 20:42:29 +0200 [thread overview]
Message-ID: <200510212042.29634.blaisorblade@yahoo.it> (raw)
In-Reply-To: <1129919051.27787.42.camel@localhost.localdomain>
On Friday 21 October 2005 20:24, Gerd Stolpmann wrote:
> Hi list,
>
> I recently tested the hwrng driver. In principal, it works, but it
> sometimes eats up all host CPU time. In particular, I can see that the
> UML system does a (blocking) read on /dev/hwrng,
Could you please elaborate on that? Who is doing the read, the rng tools?
Also, are they doing only a single read (in which case, it's we the ones who
are looping and we're broken) or they are astonished by our -EAGAIN and keep
trying (in which case, they are broken)?
Actually, from looking at the code (arch/um/drivers/random.c:rng_dev_read())
it appears that we _do_ loop ourselves, if the read is blocking. Not sure how
to handle that.
We could return maybe -EIO, possibly when a rate limit is exceeded (not
trivial to do, though - I must learn using timers first).
> and that the host
> system loops while reading from /dev/random which almost always returns
> -EAGAIN. (Found that out with strace, in the hope the output is
> correct.)
Well, if the host hasn't enough entropy, it's reasonable for it to return
-EAGAIN.
And we should do the same (the loop is actually executed by the UML code,
right?).
However, probably the tools inside UML don't expect a lot to get -EAGAIN from
an hardware generator. So possibly they are not ready to handle that well.
> Nevertheless rngd seems to work, because when killing with SIGUSR1 it
> shows some reasonable statistics.
> My test setup is as follows:
> - Host system: 2.6.12.6 with SKAS3 v8.2 patch
> - UML system: 2.6.14-rc5, in SKAS3 mode.
> Using rngd from Debian Sarge.
> TLS is disabled.
> Let me know if you need more information.
> Gerd
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-10-21 18:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-21 18:24 [uml-devel] Strange behaviour of hwrng Gerd Stolpmann
2005-10-21 18:42 ` Blaisorblade [this message]
2005-10-21 19:06 ` Gerd Stolpmann
2005-10-22 0:52 ` Blaisorblade
2005-10-22 3:11 ` Jeff Dike
2005-10-22 11:29 ` Blaisorblade
2005-10-22 16:16 ` Gerd Stolpmann
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=200510212042.29634.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=info@gerd-stolpmann.de \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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