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]
Date:   Tue, 5 Oct 2021 19:47:42 +0900
From:   Daniel Palmer <daniel@...f.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Bartosz Golaszewski <brgl@...ev.pl>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Marc Zyngier <maz@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] gpiolib: Move setting the flow handler and don't set
 it at all if there is a parent domain

Hi Linus,

On Mon, 4 Oct 2021 at 07:16, Linus Walleij <linus.walleij@...aro.org> wrote:
> If Marc says this is the way to go I think it is the way to go!

To be completely transparent, moving irq_domain_set_info() is from Marc.
Not setting the handler is from me.

>
> >         kfree(parent_arg);
> > +
> > +       if (!ret) {
>
> Please just exit on error so invert this.

Ok.

> if (ret)
>   return ret;
>
> and just de-indent the below code (easier to follow)
>
> > +               /* If there is a parent domain leave the flow handler alone */
> > +               if (d->parent)
>
> Should we print an error if girq->handler is not NULL and we find
> a parent domain, like
> if (d->parent && girq->handler)
>   dev_err(dev, "parent domain and flow handler both specified\n");

I think that would help catch situations where these changes would
break stuff. I want to avoid breaking other people's stuff for my
hobby project.

However, I've noticed we can't get to the "if (d->parent)" if there is
no parent as irq_domain_alloc_irqs_parent() will return -ENOSYS if
d->parent is null.
So the logic isn't right there. I think the idea is right but now I
can't figure out what we should actually check to know whether we need
to set the handler or not.
I'm hoping Marc will chip in when he has some time. :)

Cheers,

Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ