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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191014084547.GC11828@phenom.ffwll.local>
Date:   Mon, 14 Oct 2019 10:45:47 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Lyude Paul <lyude@...hat.com>
Cc:     Daniel Vetter <daniel@...ll.ch>, Sean Paul <sean@...rly.run>,
        amd-gfx@...ts.freedesktop.org,
        Ville Syrjälä 
        <ville.syrjala@...ux.intel.com>,
        Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
        David Francis <David.Francis@....com>,
        Mario Kleiner <mario.kleiner.de@...il.com>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] drm/amdgpu/dm/mst: Report possible_crtcs
 incorrectly, for now

On Fri, Oct 11, 2019 at 04:51:13PM -0400, Lyude Paul wrote:
> a little late but: i915 does have this hack (or rather-possible_crtcs with MST
> in i915 has been broken for a while and got fixed, but had to get reverted
> because of this issue), it's where this originally came from.

Hm since this is widespread I think we should check for this when we
register connectors (either in drm_dev_register, or hotplugged ones). I
think just validating that all encoder->possible_crtc match and WARN_ON if
not would be really good.

2nd option would be to do that in the GETENCODERS ioctl. That would at
least keep the encoders useful for driver-internal stuff. We could then
un-revert the i915 patch again.

Either way I think we should have this hack + comment with links to the
offending userspace in common code, not duplicated over all drivers.
-Daniel

> 
> On Wed, 2019-10-09 at 17:01 +0200, Daniel Vetter wrote:
> > On Fri, Sep 27, 2019 at 11:27:41AM -0400, Sean Paul wrote:
> > > On Thu, Sep 26, 2019 at 06:51:07PM -0400, Lyude Paul wrote:
> > > > This commit is seperate from the previous one to make it easier to
> > > > revert in the future. Basically, there's multiple userspace applications
> > > > that interpret possible_crtcs very wrong:
> > > > 
> > > > https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277
> > > > https://gitlab.gnome.org/GNOME/mutter/issues/759
> > > > 
> > > > While work is ongoing to fix these issues in userspace, we need to
> > > > report ->possible_crtcs incorrectly for now in order to avoid
> > > > introducing a regression in in userspace. Once these issues get fixed,
> > > > this commit should be reverted.
> > > > 
> > > > Signed-off-by: Lyude Paul <lyude@...hat.com>
> > > > Cc: Ville Syrjälä <ville.syrjala@...ux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++++++++
> > > >  1 file changed, 11 insertions(+)
> > > > 
> > > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > > index b404f1ae6df7..fe8ac801d7a5 100644
> > > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > > @@ -4807,6 +4807,17 @@ static int amdgpu_dm_crtc_init(struct
> > > > amdgpu_display_manager *dm,
> > > >  	if (!acrtc->mst_encoder)
> > > >  		goto fail;
> > > >  
> > > > +	/*
> > > > +	 * FIXME: This is a hack to workaround the following issues:
> > > > +	 *
> > > > +	 * https://gitlab.gnome.org/GNOME/mutter/issues/759
> > > > +	 * https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277
> > > > +	 *
> > > > +	 * One these issues are closed, this should be removed
> > > 
> > > Even when these issues are closed, we'll still be introducing a regression
> > > if we
> > > revert this change. Time for actually_possible_crtcs? :)
> > > 
> > > You also might want to briefly explain the u/s bug in case the links go
> > > sour.
> > > 
> > > > +	 */
> > > > +	acrtc->mst_encoder->base.possible_crtcs =
> > > > +		amdgpu_dm_get_encoder_crtc_mask(dm->adev);
> > > 
> > > Why don't we put this hack in amdgpu_dm_dp_create_fake_mst_encoder()?
> > 
> > If we don't have the same hack for i915 mst I think we shouldn't merge
> > this ... broken userspace is broken.
> > -Daniel
> -- 
> Cheers,
> 	Lyude Paul
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ