[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120706130127.GB10798@thunk.org>
Date: Fri, 6 Jul 2012 09:01:27 -0400
From: Theodore Ts'o <tytso@....edu>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Matt Mackall <mpm@...enic.com>,
Linux Kernel Developers List <linux-kernel@...r.kernel.org>,
w@....eu, ewust@...ch.edu, zakir@...ch.edu, greg@...ah.com,
nadiah@...ucsd.edu, jhalderm@...ch.edu, tglx@...utronix.de,
davem@...emloft.net, stable@...nel.org
Subject: Re: [PATCH 01/10] random: make 'add_interrupt_randomness()' do
something sane
On Thu, Jul 05, 2012 at 07:59:00PM -0700, Linus Torvalds wrote:
> On Thu, Jul 5, 2012 at 4:21 PM, Theodore Ts'o <tytso@....edu> wrote:
> > On Thu, Jul 05, 2012 at 05:31:22PM -0500, Matt Mackall wrote:
> >>
> >> It's better to mix and not credit than to not mix at all. Instead just
> >> check the fast count against HZ before the credit.
> >
> > I'm not sure what you mean by this?
>
> So what I think Matt meant was to check number of timer interrupts
> against the fast count.
>
> IOW, always call "add_interrupt_randomness()", but then in that
> function, when you determine the amount of entropy, check if there
> were non-timer interrupts in the last HZ cycle. If there were purely
> timer interrupts, you can still mix in the cycle information, but it's
> likely to be fairly weak.
I'm going to have to plead ignorance to how the timer code works these
days. With the advent of clockevents and NOHZ, it's gotten a lot more
complicated. What in the world is "fast count"? I've grepped for it,
and I can't find it.
I can simply not credit entropy of the timer is on the irq, but I
think you and Matt were suggesting more subtle. I just have no idea
how to tell if there were non-timer interrupts during the last HZ
cycle. Can you give me a hint?
Thanks,
- ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists