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, 14 Feb 2017 21:05:20 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     Shuah Khan <shuahkh@....samsung.com>
Cc:     Jani Nikula <jani.nikula@...ux.intel.com>, daniel.vetter@...el.com,
        seanpaul@...omium.org, airlied@...ux.ie,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] drm: change connector disconnected debug message to an
 error

On Fri, Feb 10, 2017 at 09:29:07AM -0700, Shuah Khan wrote:
> On 02/03/2017 01:06 AM, Daniel Vetter wrote:
> > On Thu, Feb 02, 2017 at 10:25:44AM -0700, Shuah Khan wrote:
> >> On 02/02/2017 01:32 AM, Jani Nikula wrote:
> >>> On Thu, 02 Feb 2017, Shuah Khan <shuahkh@....samsung.com> wrote:
> >>>> Change drm_helper_probe_single_connector_modes() to print an error to
> >>>> report connector disconnected status instead of a debug message.
> >>>>
> >>>> When this condition occurs, application doesn't know the real error and
> >>>> reports it as driver lacking support for mode setting. Change it to an
> >>>> error to make it easier to debug.
> >>>
> >>> Please explain what makes this condition an error. Connectors get
> >>> connected and disconnected, business as usual, why should this be an
> >>> error?
> >>>
> >>> BR,
> >>> Jani.
> >>
> >> Disconnecting connector itself isn't an error. When user-space tries
> >> to access it, it would be useful to report the status that the connector
> >> is disconnected.
> >>
> >> I use embedded system(s) that don't like it when HDMI is hot added or
> >> removed. Also, because of return power, it is safer to disconnect HDMI
> >> and then apply power to the board. It chased a few libdrm and user-space
> >> dead ends before I enabled drm debug and was able to fix the real issue,
> >> which is a disconnected cable.
> >>
> >> User-space prints rather confusing messages as it doesn't really know
> >> the disconnected status as it isn't returned to it.
> >>
> >> I figured it might be a good idea to at least print a message and this can
> >> be a notice or info instead of an error. I do think its is worth while in
> >> some cases.
> > 
> > This sounds like a very specific use-case you have here, and it can easily
> > be supported by a small deamon in userspace (only on debug builds ofc)
> > that tell you that someone unplugged the screen when it shouldn't have
> > been.
> 
> drm_helper_probe_single_connector_modes() finds the condition and doesn't
> have a means to return it to the user-space.

Erhm, we send out the uevent for this, and userspace can react. If that's
not working, then we need to fix this bug, not add more uapi interfaces on
top ...
-Daniel

> 
> Instead of error or debug message, would it be useful to add a trace event
> to report status of connector to drm_helper_probe_single_connector_modes()
> Trace could be triggered as needed and turned off.
> 
> Please let me know what you think of this idea? If it sounds useful, I can
> add it.
> 
> > 
> > Because upstream runs also on non-embedded systems, where unplugging is
> > normal, and we definitely don't want to spam dmesg.
> > -Daniel
> > 
> 
> thanks,
> -- Shuah
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ