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: <1329600742.1753.20.camel@joe2Laptop>
Date:	Sat, 18 Feb 2012 13:32:22 -0800
From:	Joe Perches <joe@...ches.com>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] firewire: net: prefix all log messages with
 interface name

On Sat, 2012-02-18 at 22:02 +0100, Stefan Richter wrote:
> Change the log line prefix from "firewire_net: " to
> "firewire_net firewire0: " etc. for the case that several RFC 2734
> interfaces are being used in the same machine.

Why not just "firewireX: " ?

[]
> +#define fwnet_notice(net, fmt, args...) \
> +	printk(KERN_NOTICE "%s %s: " fmt, KBUILD_MODNAME, (net)->name, ## args)
> +#define fwnet_err(net, fmt, args...) \
> +	printk(KERN_ERR "%s %s: " fmt, KBUILD_MODNAME, (net)->name, ## args)

Adding code for the "%s:...", KBUILD_MODNAME rarely saves
overall space.  Did you try embedding KBUILD_MODNAME
without the "%s: " and comparing the size?

Perhaps just add pr_fmt and pr_<level>?

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 	/* (if really necessary) */

and

#define fwnet_notice(net, fmt, ...)		\
	pr_notice("%s: " fmt, (net)->name, ##__VA_ARGS__)
#define fwnet_err(net, fmt, ...)		\
	pr_err("%s: " fmt, (net)->name, ##__VA_ARGS__)


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