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]
Date:   Mon, 8 Jun 2020 15:08:22 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Alexander Gordeev <agordeev@...ux.ibm.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-s390@...r.kernel.org, Stable <stable@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yury Norov <yury.norov@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Amritha Nambiar <amritha.nambiar@...el.com>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Kees Cook <keescook@...omium.org>,
        Matthew Wilcox <willy@...radead.org>,
        Miklos Szeredi <mszeredi@...hat.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        "Tobin C . Harding" <tobin@...nel.org>,
        Vineet Gupta <vineet.gupta1@...opsys.com>,
        Will Deacon <will.deacon@....com>,
        Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH RESEND2] lib: fix bitmap_parse() on 64-bit big endian archs

On Mon, Jun 8, 2020 at 3:03 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Mon, Jun 8, 2020 at 1:26 PM Alexander Gordeev <agordeev@...ux.ibm.com> wrote:

...

> Can't we simple do
>
>         int chunk_index = 0;
>         ...
>         do {
> #if defined(CONFIG_64BIT) && defined(__BIG_ENDIAN)
>                end = bitmap_get_x32_reverse(start, end,
> bitmap[chunk_index ^ 1]);
> #else
>                end = bitmap_get_x32_reverse(start, end, bitmap[chunk_index]);
> #endif
>         ...
>         } while (++chunk_index);
>
> ?

And moreover, we simple can replace bitmap by maskp here, and drop it
from definition block.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ