Re: /dev/urandom uses uninit bytes, leaks user data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 15, 2007 at 03:13:19PM +0800, Herbert Xu wrote:
> John Reiser <[email protected]> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux