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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1586a49594d30b4bf4d88eba0d258e21efd26da2.camel@perches.com>
Date:   Wed, 05 Dec 2018 18:51:42 -0800
From:   Joe Perches <joe@...ches.com>
To:     "Zhang, Jerry(Junwei)" <Jerry.Zhang@....com>,
        Michel Dänzer <michel@...nzer.net>,
        Christian Koenig <christian.koenig@....com>,
        Huang Rui <ray.huang@....com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Sean Paul <sean@...rly.run>, David Airlie <airlied@...ux.ie>,
        Chris Wilson <chris@...is-wilson.co.uk>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] drm: Only #define DEBUG if CONFIG_DYNAMIC_DEBUG is
 disabled

On Thu, 2018-12-06 at 10:40 +0800, Zhang, Jerry(Junwei) wrote:
> On 12/6/18 12:56 AM, Michel Dänzer wrote:
> > From: Michel Dänzer <michel.daenzer@....com>
> > 
> > The following cases are possible for pr_debug():
> > 
> > 1. CONFIG_DYNAMIC_DEBUG disabled
> >     a) DEBUG not defined: pr_debug() translates to no_printk(...), i.e.
> >        it never generates any output.
> >     b) DEBUG defined: pr_debug() translates to printk(KERN_DEBUG ...),
> >        i.e. it generates output which doesn't appear in dmesg by default,
> >        can be enabled dynamically.
> > 
> > 2. CONFIG_DYNAMIC_DEBUG enabled: pr_debug() translates to
> >     dynamic_pr_debug()
> >     a) DEBUG not defined: dynamic_pr_debug() generates no output by
> >        default, can be enabled dynamically.
> >     b) DEBUG defined: dynamic_pr_debug() generates output by default,
> >        can be disabled dynamically.
> > 
> > The intention for drm_debug_printer() is to generate output which
> > doesn't appear in dmesg by default, but can be enabled dynamically, i.e.
> > cases 1b) and 2a). However, defining DEBUG unconditionally gave us 2b)
> > instead of 2a) with CONFIG_DYNAMIC_DEBUG enabled.
> > 
> > Fixes: 79a5ad2fdb3c ("drm: Enable pr_debug() for drm_printer")

I very much doubt this is a fix.

Did you read the commit log for this commit?

It says "make sure it will always produce output"

And why didn't you cc Chris Wilson, the author of that patch?

> > Signed-off-by: Michel Dänzer <michel.daenzer@....com>
> Reviewed-by: Junwei Zhang <Jerry.Zhang@....com>
> 
> > ---
> >   drivers/gpu/drm/drm_print.c | 6 ++++--
> >   1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
> > index 0e7fc3e7dfb4..ee56e4a1b343 100644
> > --- a/drivers/gpu/drm/drm_print.c
> > +++ b/drivers/gpu/drm/drm_print.c
> > @@ -23,11 +23,13 @@
> >    * Rob Clark <robdclark@...il.com>
> >    */
> >   
> > -#define DEBUG /* for pr_debug() */
> > -
> >   #include <stdarg.h>
> >   #include <linux/seq_file.h>
> >   #include <drm/drmP.h>
> > +
> > +#ifndef CONFIG_DYNAMIC_DEBUG
> > +#define DEBUG /* for pr_debug() */
> > +#endif
> >   #include <drm/drm_print.h>
> >   
> >   void __drm_puts_coredump(struct drm_printer *p, const char *str)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ