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:   Wed, 06 Nov 2019 09:29:31 -0800
From:   Joe Perches <joe@...ches.com>
To:     Markus Elfring <Markus.Elfring@....de>, linux-s390@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Cc:     Christian Bornträger <borntraeger@...ibm.com>,
        Harald Freudenberger <freude@...ux.ibm.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Ingo Franzki <ifranzki@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: s390/pkey: Use memdup_user() rather than duplicating its
 implementation

On Wed, 2019-11-06 at 14:00 +0100, Markus Elfring wrote:
> > > Reuse existing functionality from memdup_user() instead of keeping
> > > duplicate source code.
> > > 
> > > Generated by: scripts/coccinelle/api/memdup_user.cocci
> …
> > > Fixes: f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d ("s390/pkey: add CCA AES cipher key support")
> > 
> > This doesn't fix anything
> 
> How would you categorise the proposed source code reduction and software reuse?

As inappropriate for a fixes tag.

The fixes tag is "used to make it easy to determine where a bug
originated, which can help review a bug fix"

There is no bug here.

> Will the development opinions vary between contributors?

Ever had a bikeshed?

> > > +	return !ukey || keylen < MINKEYBLOBSIZE || keylen > KEYBLOBBUFSIZE
> > > +	       ? ERR_PTR(-EINVAL)
> > > +	       : memdup_user(ukey, keylen);
> > 
> > This is a very poor use of ternary ?: code.
> 
> The conditional operator is applied once more in the intended way,
> isn't it?

Please take your development efforts to obfuscated c contests.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ