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:   Tue, 7 Apr 2020 11:29:54 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "Markus.Elfring@....de" <Markus.Elfring@....de>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>
CC:     "jic23@...nel.org" <jic23@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [v2] iio: core: move 'indio_dev->info' null check first

On Tue, 2020-04-07 at 11:01 +0000, Ardelean, Alexandru wrote:
> [External]
> 
> On Tue, 2020-04-07 at 12:42 +0200, Markus Elfring wrote:
> > [External]
> > 
> > > So, over time I got the habit of mentioning 'Doesn't fix anything.'
> > 
> > I suggest to reconsider such information once more.
> > We come along different interpretations for remarkable software adjustments.
> > 
> > 
> > > if the patch doesn't fix anything.
> > 
> > Do you improve the input parameter validation a bit in principle here?
> 
> I thought that was obvious from the rest of the description + patch.
> I guess it isn't.
> 
> I'll see.

So, how about this:
---------------------------------------------
    Doesn't fix anything. Just moves this to be the first check, as it's very
    simple and fails the registration earlier, instead of potentially
    initializing the 'indio_dev->label' and checking for duplicate indexes, and
    then failing with this simple-check.
    
    This is a minor optimization, since '__iio_device_register()' will waste
    fewer validation cycles in case 'indio_dev->info' is NULL.
---------------------------------------------
?    


> 
> > Regards,
> > Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ