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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 22 Jul 2021 15:28:01 -0700
From:   khsieh@...eaurora.org
To:     Lyude Paul <lyude@...hat.com>
Cc:     Jani Nikula <jani.nikula@...ux.intel.com>, robdclark@...il.com,
        sean@...rly.run, swboyd@...omium.org, abhinavk@...eaurora.org,
        aravindh@...eaurora.org, rsubbia@...eaurora.org,
        rnayak@...eaurora.org, freedreno@...ts.freedesktop.org,
        airlied@...ux.ie, daniel@...ll.ch,
        maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
        tzimmermann@...e.de, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] drm/dp_mst: Fix return code on sideband message
 failure

On 2021-07-22 10:53, Lyude Paul wrote:
> On Tue, 2021-07-13 at 15:24 -0700, khsieh@...eaurora.org wrote:
>> On 2021-07-07 01:37, Jani Nikula wrote:
>> > On Tue, 06 Jul 2021, Kuogee Hsieh <khsieh@...eaurora.org> wrote:
>> > > From: Rajkumar Subbiah <rsubbia@...eaurora.org>
>> > >
>> > > Commit 2f015ec6eab6 ("drm/dp_mst: Add sideband down request tracing +
>> > > selftests") added some debug code for sideband message tracing. But
>> > > it seems to have unintentionally changed the behavior on sideband
>> > > message
>> > > failure. It catches and returns failure only if DRM_UT_DP is enabled.
>> > > Otherwise it ignores the error code and returns success. So on an MST
>> > > unplug, the caller is unaware that the clear payload message failed
>> > > and
>> > > ends up waiting for 4 seconds for the response. Fixes the issue by
>> > > returning the proper error code.
>> > >
>> > > Changes in V2:
>> > > -- Revise commit text as review comment
>> > > -- add Fixes text
>> > >
>> > > Changes in V3:
>> > > -- remove "unlikely" optimization
>> > >
>> > > Fixes: 2f015ec6eab6 ("drm/dp_mst: Add sideband down request tracing +
>> > > selftests")
>> > >
>> > > Signed-off-by: Rajkumar Subbiah <rsubbia@...eaurora.org>
>> > > Signed-off-by: Kuogee Hsieh <khsieh@...eaurora.org>
>> > >
>> > > Reviewed-by: Stephen Boyd <swboyd@...omium.org>
>> >
>> > Reviewed-by: Jani Nikula <jani.nikula@...el.com>
>> >
>> >
>> > > ---
>> Lyude,
>> Any comments from you?
>> Thanks,
> 
> Hey! Sorry did I forget to respond to this?
> 
> Reviewed-by: Lyude Paul <lyude@...hat.com>
> 

It looks like this patch is good to go (mainlined).
Anything needed from me to do?
Thanks,

>> 
>> > >  drivers/gpu/drm/drm_dp_mst_topology.c | 10 ++++++----
>> > >  1 file changed, 6 insertions(+), 4 deletions(-)
>> > >
>> > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c
>> > > b/drivers/gpu/drm/drm_dp_mst_topology.c
>> > > index 1590144..df91110 100644
>> > > --- a/drivers/gpu/drm/drm_dp_mst_topology.c
>> > > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
>> > > @@ -2887,11 +2887,13 @@ static int process_single_tx_qlock(struct
>> > > drm_dp_mst_topology_mgr *mgr,
>> > >         idx += tosend + 1;
>> > >
>> > >         ret = drm_dp_send_sideband_msg(mgr, up, chunk, idx);
>> > > -       if (unlikely(ret) && drm_debug_enabled(DRM_UT_DP)) {
>> > > -               struct drm_printer p = drm_debug_printer(DBG_PREFIX);
>> > > +       if (ret) {
>> > > +               if (drm_debug_enabled(DRM_UT_DP)) {
>> > > +                       struct drm_printer p =
>> > > drm_debug_printer(DBG_PREFIX);
>> > >
>> > > -               drm_printf(&p, "sideband msg failed to send\n");
>> > > -               drm_dp_mst_dump_sideband_msg_tx(&p, txmsg);
>> > > +                       drm_printf(&p, "sideband msg failed to send\n");
>> > > +                       drm_dp_mst_dump_sideband_msg_tx(&p, txmsg);
>> > > +               }
>> > >                 return ret;
>> > >         }
>> 

Powered by blists - more mailing lists