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] [day] [month] [year] [list]
Message-ID: <9d435e66-bb58-409e-aa30-9b89cb18dd9c@moroto.mountain>
Date: Fri, 22 Mar 2024 15:58:35 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Kent Gibson <warthog618@...il.com>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
	Linus Walleij <linus.walleij@...aro.org>,
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Alexey Dobriyan <adobriyan@...il.com>,
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
	stable@...r.kernel.org, Stefan Wahren <wahrenst@....net>
Subject: Re: [PATCH] gpio: cdev: sanitize the label before requesting the
 interrupt

On Fri, Mar 22, 2024 at 07:54:19PM +0800, Kent Gibson wrote:
> On Fri, Mar 22, 2024 at 12:31:36PM +0300, Dan Carpenter wrote:
> > On Fri, Mar 22, 2024 at 08:46:50AM +0100, Bartosz Golaszewski wrote:
> > > On Fri, Mar 22, 2024 at 2:30 AM Kent Gibson <warthog618@...il.com> wrote:
> > > >
> > > > On Wed, Mar 20, 2024 at 01:59:44PM +0100, Bartosz Golaszewski wrote:
> > > > > From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> > > > >
> > > > > Let's replace all "/" with "-".
> > > > >
> > > >
> > > > I actually prefer the ":" you originally suggested, as it more clearly
> > > > indicates a tier separation, whereas a hyphen is commonly used for
> > > > multi-word names. And as the hyphen is more commonly used the sanitized
> > > > name is more likely to conflict.
> > > >
> > >
> > > Sounds good, will do.
> > > > >
> > > > > +     label = make_irq_label(le->label);
> > > > > +     if (!label)
> > > > > +             goto out_free_le;
> > > > > +
> > > >
> > > > Need to set ret = -ENOMEM before the goto, else you will return 0.
> > > >
> > >
> > > Eek, right, thanks.
> >
> > Smatch has a warning about this, btw.
> > drivers/gpio/gpiolib-cdev.c:2221 lineevent_create() warn: missing error code 'ret'
> >
> 
> And that triggered a "what the hell does that mean" warning in my
> wetware error parser ;-).
> 
> That could be better worded - it isn't "missing", it hasn't been
> appropriately set. So maybe "unset error code"?
> 

It's kind of a pain to change the warning message after the fact because
then they show up as new warnings for everyone...  I maybe should poll
people to see if they care about the hassel of it.

> > The other warning here is:
> > drivers/gpio/gpiolib-cdev.c:2269 lineevent_create() warn: 'irq' from request_threaded_irq() not released on lines: 2258.
> >
> 
> Looks like a false positive to me - as per the comment in the code, that path
> (2258) results in lineevent_release() being called and that releases the irq.

Ah right.  Thanks!

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ