17 Jun, 2010

2 commits


28 May, 2010

1 commit

  • This patch moves the definition of struct rnd_state and the inline
    __seed() function to linux/random.h. It renames the static __random32()
    function to prandom32() and exports it for use in modules.

    prandom32() is useful as a privately-seeded pseudo random number generator
    that can give the same result every time it is initialized.

    For FCoE FC-BB-6 VN2VN mode self-selected unique FC address generation, we
    need an pseudo-random number generator seeded with the 64-bit world-wide
    port name. A truly random generator or one seeded with randomness won't
    do because the same sequence of numbers should be generated each time we
    boot or the link comes up.

    A prandom32_seed() inline function is added to the header file. It is
    inlined not for speed, but so the function won't be expanded in the base
    kernel, but only in the module that uses it.

    Signed-off-by: Joe Eykholt
    Acked-by: Matt Mackall
    Cc: Theodore Ts'o
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Eykholt
     

31 Jul, 2008

1 commit

  • The rationale is:
    * use u32 consistently
    * no need to do LCG on values from (better) get_random_bytes
    * use more data from get_random_bytes for secondary seeding
    * don't reduce state space on srandom32()
    * enforce state variable initialization restrictions

    Note: the second paper has a version of random32() with even longer period
    and a version of random64() if needed.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Andrew Morton

    Stephen Hemminger
     

04 Apr, 2008

1 commit

  • - Let it update the state of all CPUs. The network stack goes
    into pains to feed the current IP addresses in, but it is not very
    effective if that is only done for some random CPU instead of all.
    So change it to feed bits into all CPUs. I decided to do that lockless
    because well somewhat random results are ok.

    v2: Drop rename so that this patch doesn't depend on x86 maintainers

    Signed-off-by: Andi Kleen
    Signed-off-by: David S. Miller

    Andi Kleen
     

04 Dec, 2006

1 commit


17 Oct, 2006

1 commit

  • Make net_random() more widely available by calling it random32

    akpm: hopefully this will permit the removal of carta_random32. That needs
    confirmation from Stephane - this code looks somewhat more computationally
    expensive, and has a different (ie: callee-stateful) interface.

    [akpm@osdl.org: lots of build fixes, cleanups]
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller
    Cc: Stephane Eranian
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger