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: <20200608135114.44ae7962@elisabeth>
Date:   Mon, 8 Jun 2020 13:51:14 +0200
From:   Stefano Brivio <sbrivio@...hat.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Yury Norov <yury.norov@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] lib: Add test for bitmap_cut()

On Mon, 8 Jun 2020 14:31:02 +0300
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Mon, Jun 8, 2020 at 1:29 PM Stefano Brivio <sbrivio@...hat.com> wrote:
> > On Mon, 8 Jun 2020 13:12:14 +0300
> > Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:  
> > > On Mon, Jun 08, 2020 at 11:13:29AM +0200, Stefano Brivio wrote:  
> > > > Based on an original patch by Yury Norov: introduce a test for
> > > > bitmap_cut() that also makes sure functionality is as described for
> > > > partially overlapping src and dst.  
> > >  
> > > > Co-authored-by: Yury Norov <yury.norov@...il.com>  
> > >
> > > Co-developed-by (and it requires Yury's SoB as well).  
> >
> > Oops, sorry, I didn't remember this part from submitting-patches.rst
> > correctly. Thanks for pointing this out.
> >
> > Yury, let me know if I should re-post with both Co-authored-by: and  
> 
> Co-developed-by: :-)

Grrr. That! :)

> > Signed-off-by: you -- otherwise I'll repost without both.  
> 
> ...
> 
> > > > +           if (!bitmap_equal(out, t->expected, t->nbits)) {
> > > > +                   pr_err("bitmap_cut failed: expected %*pb, got %*pb\n",
> > > > +                          t->nbits, t->expected, t->nbits, out);
> > > > +           }  
> > >
> > > Perhaps
> > >
> > >       if (bitmap_equal(...))
> > >               continue;
> > >
> > >       ...
> > >
> > > ?  
> >
> > That's five lines instead of four (I can't get pr_err() on one line
> > anyway) and it looks less straightforward: "if it doesn't match we have
> > an error" vs. "if it matches go to next case. We have an error". Any
> > specific reason I'm missing?  
> 
> Actually, please use one of suitable expect_eq_*() macro or add your
> own. Because above has an inconsistent format with the rest.

Whoops, I see now. Yes, expect_eq_bitmap() will do, I'll change this in
v2.

-- 
Stefano

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ