lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180612142832.6fe9b9a2@vmware.local.home>
Date:   Tue, 12 Jun 2018 14:28:32 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     "Tobin C. Harding" <me@...in.cc>, "Theodore Ts'o" <tytso@....edu>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Kees Cook <keescook@...omium.org>,
        Anna-Maria Gleixner <anna-maria@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 2/4] random: Return nbytes filled from hw RNG

On Tue, 12 Jun 2018 11:39:56 +0300
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Tue, Jun 12, 2018 at 3:39 AM, Tobin C. Harding <me@...in.cc> wrote:
> > Currently the function get_random_bytes_arch() has return value 'void'.
> > If the hw RNG fails we currently fall back to using get_random_bytes().
> > This defeats the purpose of requesting random material from the hw RNG
> > in the first place.  
> 
> > -               int chunk = min(nbytes, (int)sizeof(unsigned long));
> > +               int chunk = min_t(int, left, (int)sizeof(unsigned long));  
> 
> Isn't this (int) implied when you use min_t(int, ...) ?
> 

I would say so...

 #define min_t(type, x, y)	__careful_cmp((type)(x), (type)(y), <)

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ