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]
Date:	Sun, 19 Sep 2010 15:18:19 -0400
From:	Andy Walls <awalls@...metrocast.net>
To:	Rafał Miłecki <zajec5@...il.com>
Cc:	Marcin Slusarz <marcin.slusarz@...il.com>,
	Dave Airlie <airlied@...hat.com>, linux-kernel@...r.kernel.org,
	dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] drm/edid: Don't repeatedly log hex dumps of bad EDIDs
 by default

On Sun, 2010-09-19 at 20:39 +0200, Rafał Miłecki wrote:
> 2010/9/18 Marcin Slusarz <marcin.slusarz@...il.com>:
> > On Fri, Sep 17, 2010 at 06:53:26PM -0400, Andy Walls wrote:
> >> On my system, every 10 seconds drm_edid_block_valid() gets called 4
> >> times by radeon_dvi_detect().  This results in 4 instances of a
> >> multi-line hex dump of the same EDID (non-)data being logged every 10
> >> seconds.
> >>
> >> Silence the hex dump from drm_edid_block_valid() unless a drm_debug
> >> module parameter flag is set.
> >>
> >> Signed-of-by: Andy Walls <awalls@...metrocast.net>
> >>
> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> >> index dce5c4a..33a748c 100644
> >> --- a/drivers/gpu/drm/drm_edid.c
> >> +++ b/drivers/gpu/drm/drm_edid.c
> >> @@ -173,9 +173,12 @@ drm_edid_block_valid(u8 *raw_edid)
> >>
> >>  bad:
> >>         if (raw_edid) {
> >> -               DRM_ERROR("Raw EDID:\n");
> >> -               print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH);
> >> -               printk("\n");
> >> +               DRM_DEBUG("Raw EDID:\n");
> >> +               if (drm_debug & DRM_UT_CORE) {
> >> +                       print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE,
> >> +                                            raw_edid, EDID_LENGTH);
> >> +                       printk("\n");
> >> +               }
> >>         }
> >>         return 0;
> >>  }
> >>
> >
> > Why not print it only once on original error level?
> > Something like:
> > static bool printed = false;
> > if (!printed) {
> >        ...
> >        printed = true;
> > }
> >
> > It has the same effect for you (no spamming by default) and it's still provide some information.
> 
> Should be per-monitor or per-output I think.

Yes, something like that.  I thought about that after my reply.

My perpetual log spam is related to my DVI-D-1 "connector" for my radeon
graphics chip.  So per connector, per graphics chip.

With the patch as provided, the hex dump messages can be turned on and
off using something like:

	echo 1 > /sys/module/drm/parameters/debug
	echo 0 > /sys/module/drm/parameters/debug

once the user has a shell prompt.

Regards,
Andy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ