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:   Fri, 21 May 2021 13:54:14 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     khsieh@...eaurora.org
Cc:     agross@...nel.org, bjorn.andersson@...aro.org, robdclark@...il.com,
        sean@...rly.run, vkoul@...nel.org, abhinavk@...eaurora.org,
        aravindh@...eaurora.org, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/2] drm/msm/dp: handle irq_hpd with sink_count = 0 correctly

Quoting khsieh@...eaurora.org (2021-05-21 12:45:35)
> On 2021-05-21 12:18, Stephen Boyd wrote:
> > Quoting khsieh@...eaurora.org (2021-05-21 08:21:58)
> >> >
> >> > Ok. So you're saying that we want to put both events on the queue
> >> > regardless, and put IRQ_HPD there first because we want to check the
> >> > status bit? Doesn't reading the status bit require the dongle to be
> >> > connected though? So if an unplug came in along with an irq_hpd we may
> >> > queue both the irq_hpd and the unplug, but when it comes time to
> >> > process
> >> > the irq_hpd in the kthread the link will be gone and so trying the dpcd
> >> > read for the link status will fail?
> >> >
> >> yes,
> >> we had a previous bug with this scenarios already.
> >> https://partnerissuetracker.corp.google.com/issues/170598152
> >> At this case, dongle produce two interrupts, irq_hpd followed by
> >> unplug
> >> immediately (not presented at isr status register at same time), at
> >> the
> >> time dongle unplugged form DTU.
> >> But due to dp ctrl reset at handling irq_hpd which cause unplug mask
> >> bit
> >> be cleared so that unplug interrupt got lost.
> >>
> >
> > Again, wouldn't that be too late if the hardirq handler is delayed to
> > the point that the two irqs are pending in the isr status register?
>
> yes,
> but that not much dp driver can do.
> As long as DP driver can recovery (shut down gracefully) and ready for
> next plugin, then i think it should be fine.
>

Yes. I'm trying to make the point that the least the DP driver could do
would be to mask the interrupts for HPD IRQ when unplug irq happens at
hardirq context and also ignore HPD IRQ when unplug is also there. And
going even further, it feels like we should only enable the unplug irq
once a plug in irq happens, and vice versa, so that we don't get into
the case where a super long delayed irq sees all three bits: plug,
unplug, and hpd irq.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ