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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <904d4156a45a6f74ffdb4ef260498d91671b351c.camel@analog.com>
Date:   Wed, 8 May 2019 11:34:42 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "ardeleanalex@...il.com" <ardeleanalex@...il.com>,
        "andriy.shevchenko@...ux.intel.com" 
        <andriy.shevchenko@...ux.intel.com>
CC:     "namhyung@...nel.org" <namhyung@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jonathan.cameron@...wei.com" <jonathan.cameron@...wei.com>,
        "mingo@...nel.org" <mingo@...nel.org>
Subject: Re: [PATCH 1/2] lib: add __sysfs_match_string_with_gaps() helper

On Mon, 2019-05-06 at 17:46 +0300, andriy.shevchenko@...ux.intel.com wrote:
> [External]
> 
> 
> On Mon, May 06, 2019 at 04:45:43PM +0300, Alexandru Ardelean wrote:
> > On Fri, Apr 26, 2019 at 5:27 PM andriy.shevchenko@...ux.intel.com
> > <andriy.shevchenko@...ux.intel.com> wrote:
> > > 
> > > On Fri, Apr 26, 2019 at 12:29:11PM +0300, Alexandru Ardelean wrote:
> > > 
> > > > Hmm, I actually did not give much thought to that -1.
> > > > I'll check into this and see about a V3.
> > > > It may make more sense to just fix the original
> > > > `__sysfs_match_string()`, but I'll need to go through the users of
> > > > this function and see.
> > > 
> > > I was thinking about existing users of such (with "gaps") cases.
> > > Not all of them have NULL there and would like to avoid some members.
> > > Though, I think that we may ignore NULL items if -1 is supplied.
> > > 
> > > Think as well about ARRAY_SIZE() as given to that.
> > > 
> > 
> > I am a bit vague on what you are proposing.
> > Is it:
> > 
> > a) Leave __sysfs_match_string() as-is and introduce a new
> > `__sysfs_match_string_with_gaps()` helper/variant ?
> > b) Fix __sysfs_match_string() to break/exit on the first NULL, only if
> > -1 is provided ?
> > 
> > Either is fine, but I wanted to clarify.
> 
> The current logic something like "-1 to go till first NULL" and
> ARRAY_SIZE() in
> *some* cases is basically the synonym to above.
> 
> What I meant is to check if there is *any* case where ARRAY_SIZE()
> behaves in
> the same way as -1. Those cases should be fixed accordingly.
> 
> Otherwise, the b) is what would be preferred according to the discussion.
> 

Ack.

I sent a series.
I guess this is the noisiest I've ever been.
And I feel a bit bad/guilty [for generating that much noise], but I'll
probably grab a beer later to treat it.

I'll probably learn something from this.
Guilt-tripped experiences are pretty learnful.

Thanks
Alex

> > > And consider to fix match_string() accordingly.
> 
> --
> With Best Regards,
> Andy Shevchenko
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ