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-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0DWkfQcZpmyfKcdNt1MHf8ha6a9L2LmLt1Tv-j0HDr3w@mail.gmail.com>
Date:   Thu, 5 Aug 2021 14:03:40 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     "Michael S. Tsirkin" <mst@...hat.com>,
        Viresh Kumar <vireshk@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Cornelia Huck <cohuck@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" 
        <virtualization@...ts.linux-foundation.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Marc Zyngier <maz@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Stratos Mailing List <stratos-dev@...lists.linaro.org>,
        "Enrico Weigelt, metux IT consult" <info@...ux.net>,
        Jason Wang <jasowang@...hat.com>
Subject: Re: [Stratos-dev] [PATCH V4 2/2] gpio: virtio: Add IRQ support

On Thu, Aug 5, 2021 at 1:26 PM Viresh Kumar via Stratos-dev
<stratos-dev@...lists.linaro.org> wrote:
>
> On 03-08-21, 17:01, Arnd Bergmann wrote:
> > As far as I can tell, the update_irq_type() message would lead to the
> > interrupt getting delivered when it was armed and is now getting disabled,
> > but I don't see why we would call update_irq_type() as a result of the
> > eventq notification.
>
> Based on discussion we had today (offline), I changed the design a bit
> and used handle_level_irq() instead, as it provides consistent calls
> to mask/unmask(), which simplified the whole thing a bit.

The new flow looks much nicer to me, without the workqueue, and
doing the requeue directly in the unmask() operation.

I don't quite understand the purpose of the type_pending and
mask_pending flags yet, can you explain what they actually
do?

Also, I have no idea about whether using the handle_level_irq()
function is actually correct here. I suppose if necessary, the driver
could provide its own irq.handler callback in place of that.

> Also I have broken the rule from specs, maybe we should update spec
> with that, where the specs said that the buffer must not be queued
> before enabling the interrupt. I just queue the buffer unconditionally
> now from unmask().
>
> I am not sure but there may be some race around the "queued" flag and
> I wonder if we can land in a scenario where the buffer is left
> un-queued somehow, while an interrupt is enabled.

Can that be integrated with the "masked" state now? It looks like
the two flags are always opposites now.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ