lkml.org 
[lkml]   [2007]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: /dev/urandom uses uninit bytes, leaks user data
    On Sat, Dec 15, 2007 at 03:13:19PM +0800, Herbert Xu wrote:
    > John Reiser <jreiser@bitwagon.com> wrote:
    > >
    > > If speed matters that much, then please recoup 33 cycles on x86
    > > by using shifts instead of three divides, such as (gcc 4.1.2):
    > >
    > > add_entropy_words(r, tmp, (bytes + 3) / 4);
    > >
    > > 0x8140689 <xfer_secondary_pool+206>: lea 0x3(%esi),%eax
    > > 0x814068c <xfer_secondary_pool+209>: mov $0x4,%dl
    > > 0x814068e <xfer_secondary_pool+211>: mov %edx,%edi
    > > 0x8140690 <xfer_secondary_pool+213>: cltd
    > > 0x8140691 <xfer_secondary_pool+214>: idiv %edi
    >
    > There ought to be a warning about this sort of thing.

    Indeed. Seems it would be better to adjust the types appropriately.
    Anyway, this is no longer relevant to security@.

    --
    Mathematics is the supreme nostalgia of our time.


    \
     
     \ /
      Last update: 2007-12-15 17:35    [W:2.102 / U:0.620 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site