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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 May 2018 09:35:25 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Shreeya Patel <shreeya.patel23498@...il.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Jane Wan <Jane.Wan@...ia.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Marek Vasut <marek.vasut@...il.com>, ties.bos@...ia.com,
        prabhakar.kushwaha@....com,
        "open list:MEMORY TECHNOLOGY..." <linux-mtd@...ts.infradead.org>,
        jagdish.gediya@....com, Richard Weinberger <richard@....at>,
        Shawn Guo <shawnguo@...nel.org>,
        Brian Norris <computersforpeace@...il.com>,
        David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH v5 2/2] mtd: rawnand: use bit-wise majority to recover
 the contents of ONFI parameter

On Mon, 14 May 2018 20:54:36 +0300
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Thu, May 10, 2018 at 3:03 PM, Boris Brezillon
> <boris.brezillon@...tlin.com> wrote:
> 
> >> +#define GET_BIT(bit, val)   (((val) >> (bit)) & 0x01)  
> >
> > Not sure we need that macro, see below.  
> 
> +1. We have too many nice helpers for bit manipulations
> (for_each_set_bit() as an example).
> 
> 
> >                         for (k = 0; k < nbufs; k++) {
> >                                 const u8 *srcbuf = srcbufs[j];
> >
> >                                 if (srcbuf[i] & BIT(k))
> >                                         m++;
> >                         }  
> 
> ...which is effectively hweightXX().

No it's not.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ