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]
Date:	Tue, 27 Sep 2011 21:51:29 -0700
From:	Joe Perches <joe@...ches.com>
To:	Jim Cromie <jim.cromie@...il.com>
Cc:	jbaron@...hat.com, bart.vanassche@...il.com, greg@...ah.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 25/26] dynamic_debug: add pr_fmt_dbg() for
 dynamic_pr_debug

On Tue, 2011-09-27 at 20:54 -0600, Jim Cromie wrote:
> Cleanest way is to drop the original synonym, and just use
> warn (its shorter), but that creates some churn (havent grepped to see
> how much).
> I picked what looked like least effort & fewest corner-cases.
> ICBW..

#ifndef pr_fmt_warning
#define pr_fmt_warning pr_fmt_warn
#endif

> > What did you think of avoiding all of this and
> > having __dynamic_pr_debug move the fmt pointer over
> > any initial KBUILD_MODULE ": "
> >
> > int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
> > {
> > [...]
> >        size_t modsize = strlen(descriptor->modname);
> >        if (0 == strncmp(fmt, descriptor->modname, modsize) &&
> >            0 == strncmp(fmt + modsize, ": ", 2))
> >                fmt += modsize + 2;
> >        vprintk(fmt, ...)
> > ?
> 
> I was getting to that... ;-)
> Im not crazy about it.  It feels like too much ..
> Its a runtime workaround for what I think is a
> problem in users' (or header's) #defines.

I think exactly the opposite myself.

I think all of the '#define pr_fmt(fmt) KBUILD_MODNAME ": "'
are effectivly useless and I will eventually delete them.

The printk subsystem should look up the module name and
prefix them to the printk akin to how the dynamic_debug
system does.  Except the module name should be a singleton.


--
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