From: Dave Taht <dave.taht@bufferbloat.net>
To: openwrt-devel@lists.openwrt.org, cerowrt-devel@lists.bufferbloat.net
Subject: [Cerowrt-devel] getting more randomness by improving MIPS get_cycles()
Date: Sun, 8 Sep 2013 12:04:27 -0700 [thread overview]
Message-ID: <20130908190427.GA14461@lists.bufferbloat.net> (raw)
In light of the whole nsa hoo-ra (stuff like this)
https://plus.google.com/u/0/117091380454742934025/posts/SDcoemc9V3J
Ted Tso has pointed out to me that apparently mips' does not have a working
generic get_cycles() call, but instead returns 0 in all cases.
e.g: In arch/mips/include/asm/timex.h:
typedef unsigned int cycles_t;
static inline cycles_t get_cycles(void)
{
return 0;
}
Um.....
get_cycles() is used in innumerable places in random.c.
This is double plus ungood... I am REALLY hoping I'm merely misreading
the code...
An example:
(see drivers/char/random.c for how often it is used)
/*
* Add device- or boot-specific data to the input and nonblocking
* pools to help initialize them to unique values.
*
* None of this adds any entropy, it is meant to avoid the
* problem of the nonblocking pool having similar initial state
* across largely identical devices.
*/
void add_device_randomness(const void *buf, unsigned int size)
{
unsigned long time = get_cycles() ^ jiffies;
...
So, what blocks having a working get_cycles in common mips architectures?
next reply other threads:[~2013-09-08 19:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-08 19:04 Dave Taht [this message]
2013-09-09 15:16 ` Stephen Hemminger
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
List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130908190427.GA14461@lists.bufferbloat.net \
--to=dave.taht@bufferbloat.net \
--cc=cerowrt-devel@lists.bufferbloat.net \
--cc=openwrt-devel@lists.openwrt.org \
/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