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:	Thu, 14 Aug 2008 20:44:19 -0700
From:	Greg KH <gregkh@...e.de>
To:	Joe Perches <joe@...ches.com>
Cc:	Tim Hockin <thockin@...kin.org>, schwidefsky@...ibm.com,
	linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
	lf_kernel_messages@...ts.linux-foundation.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michael Holzheu <holzheu@...ibm.com>,
	Gerrit Huizenga <gh@...ibm.com>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Jan Kara <jack@...e.cz>, Pavel Machek <pavel@....cz>,
	Sam Ravnborg <sam@...nborg.org>,
	Jochen Voß <jochen.voss@...glemail.com>,
	Kunai Takashi <kunai@...ux-foundation.jp>,
	Tim Bird <tim.bird@...sony.com>
Subject: Re: [patch 1/3] kmsg: Kernel message catalog macros.

On Thu, Aug 14, 2008 at 08:08:59PM -0700, Joe Perches wrote:
> On Thu, 2008-08-14 at 11:50 -0700, Tim Hockin wrote:
> >     // this is the actual implementation
> >     extern void send_kmsg(int level, const char *fmt, ...);
> >     // this is a convenience wrapper, maybe not needed as they get combinatoric
> >     #define kmsg_err(fmt, ...) \
> >     	send_kmsg(KERN_ERROR, fmt, ##__VA_ARGS__)
> >   inside a subsystem-specific header:
> >     #define mysubsys_kmsg_err(fmt, ...) \
> >     	kmsg_err("mysubsys:" fmt "\n", ##__VA_ARGS__)
> >   inside each subsystem-driver:
> >     #define mydriver_kmsg_err(fmt, ...) \
> >     	mysubsys_kmsg_err("mydriver:" fmt, ##__VA_ARGS__)
> >   then the driver just calls:
> >     mydriver_kmsg_err("something happened");
> 
> I think adding system/subsystem/driver prefixes
> to function names is not good.

Eeek!

What is wrong with what we have already agreed to standardise on here
people?  dev_printk() for devices!  It uniquely shows the device, what
driver is bound to it (if any), the bus id, and everything else.

It's in a parseable, standard format, that everyone agreed a few years
was going to be the way to go!

And now you want to create your own new one?  Come on, please don't be
that foolish.  Please work with what we already have.  Extend it or
something to have these "magic tokens" that you all want to index off
of, that's fine, I really could care less (and I really think it's going
to be a pain in the end, does everyone forget how frickin fast this
body of software moves?)

But whatever you do, don't create yet-another-printk-macro that you are
going to want everyone to use in their drivers/modules.  We've already
done that, and we are still slowly converting people over to them (I did
just that for a large number USB drivers just today...)

Work off of dev_printk() and friends, don't do something new.

thanks,

greg k-h
--
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