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: <1549666628.10972.51.camel@intel.com>
Date:   Fri, 8 Feb 2019 22:57:09 +0000
From:   "Derrick, Jonathan" <jonathan.derrick@...el.com>
To:     "hch@...radead.org" <hch@...radead.org>,
        "zub@...ux.fjfi.cvut.cz" <zub@...ux.fjfi.cvut.cz>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "sbauer@...donthack.me" <sbauer@...donthack.me>,
        "jonas.rabenstein@...dium.uni-erlangen.de" 
        <jonas.rabenstein@...dium.uni-erlangen.de>,
        "axboe@...nel.dk" <axboe@...nel.dk>
Subject: Re: [PATCH v4 03/16] block: sed-opal: unify space check in
 add_token_*

On Mon, 2019-02-04 at 22:07 +0100, David Kozub wrote:
> On Mon, 4 Feb 2019, Christoph Hellwig wrote:
> 
> > On Fri, Feb 01, 2019 at 09:50:10PM +0100, David Kozub wrote:
> > > From: Jonas Rabenstein <jonas.rabenstein@...dium.uni-erlangen.de>
> > > 
> > > All add_token_* functions have a common set of conditions that have to
> > > be checked. Use a common function for those checks in order to avoid
> > > different behaviour as well as code duplication.
> > > 
> > > Co-authored-by: David Kozub <zub@...ux.fjfi.cvut.cz>
> > > Signed-off-by: Jonas Rabenstein <jonas.rabenstein@...dium.uni-erlangen.de>
> > > Signed-off-by: David Kozub <zub@...ux.fjfi.cvut.cz>
> > > Reviewed-by: Scott Bauer <sbauer@...donthack.me>
> > > ---
> > >  block/sed-opal.c | 30 +++++++++++++++++++++---------
> > >  1 file changed, 21 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/block/sed-opal.c b/block/sed-opal.c
> > > index 5c123a5b4ab1..980705681806 100644
> > > --- a/block/sed-opal.c
> > > +++ b/block/sed-opal.c
> > > @@ -510,15 +510,29 @@ static int opal_discovery0(struct opal_dev *dev, void *data)
> > >  	return opal_discovery0_end(dev);
> > >  }
> > > 
> > > -static void add_token_u8(int *err, struct opal_dev *cmd, u8 tok)
> > > +static size_t remaining_size(struct opal_dev *cmd)
> > > +{
> > > +	return IO_BUFFER_LENGTH - cmd->pos;
> > > +}
> > 
> > This function seem a little pointless to me, at least as of this patch
> > where it only has a single user just below.
> 
> It is eventually used for the second time in 11/16 block: sed-opal: ioctl 
> for writing to shadow mbr.
> 
> If you feel strongly about this I can exclude it from this commit and 
> introduce it in 11/16 (where it then will called from here and from 
> write_shadow_mbr).
> 
> Best regards,
> David
I'd prefer this option where we refactor later

Otherwise looks good
Reviewed-by Jon Derrick <jonathan.derrick@...el.com>
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (3278 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ