lkml.org 
[lkml]   [2002]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Improved add_timer_randomness for __CRIS__ (instead of rdtsc())
Date
> > Put an inline function or macro in asm/timex.h (?) together with an
> > ARCH_HAS_RANDOM_TIMESTAMP define?
>
> I don't think we want to make it specific to random. I think we just
> want to call it hires.
>
> > E.g. like this for i386:
> > #define ARCH_HAS_RANDOM_TIMESTAMP
> > #define RANDOM_TIMESTAMP(time, num) do{\
..
> > And then in random.c:
> > ifdef ARCH_HAS_RANDOM_TIMESTAMP
> > RANDOM_TIMESTAMP(time, num);
> > #else
> > time = jiffies;
> > #endif
>
> Again, too random-specific. And we need a way to get the timescale.
> Perhaps something like:
>
> speed=get_timestamp_khz;
> lowbits=get_hires_timestamp();

But isn't the "num ^= high;" a way to improve the randomness
and the high value doesn't really need to be linear to the time?
Thus it would be random-specific and not just a timestamp.

/Johan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.068 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site