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: <466DC424.7020909@intel.com>
Date:	Mon, 11 Jun 2007 14:52:36 -0700
From:	"Kok, Auke" <auke-jan.h.kok@...el.com>
To:	Auke Kok <auke-jan.h.kok@...el.com>
CC:	netdev@...r.kernel.org, jeff@...zik.org, davem@...emloft.net,
	arjan@...ux.intel.com, joe@...ches.com,
	shemminger@...ux-foundation.org
Subject: Re: [PATCH 1/2] [RFC] NET: Implement a standard ndev_printk family

Auke Kok wrote:
> A lot of netdevices implement their own variant of printk and use
> use variations of dev_printk, printk or others that use msg_enable,
> which has been an eyesore with countless variations across drivers.

<snip>

> +#define ndev_err(netdev, level, format, arg...) \
> +	do { if ((netdev)->msg_enable & NETIF_MSG_##level) { \
> +		printk(KERN_ERR "%s: %s: " format, (netdev)->name, \
> +		(netdev)->dev.parent->bus_id, ## arg); } } while (0)

so now the only question is whether we want the ndev_printk() stuff to format as 
much as possible like dev_printk. dev_printk also prints dev_driver_string(dev), 
which is what above macro omits. To make this as much similar as possible, we
could do:

 > +#define ndev_err(netdev, level, format, arg...) \
 > +	do { if ((netdev)->msg_enable & NETIF_MSG_##level) { \
 > +		printk(KERN_ERR "%s: %s %s: " format, (netdev)->name, \
 > +		dev_driver_string(netdev)-dev), (netdev)->dev.parent->bus_id, \
 > +             ## arg); } } while (0)

it would (e.g. e1000) change the output from:
eth1: 0000:00:19.0: NIC Link is Down

To:
eth1: e1000 0000:00:19.0: NIC Link is Down

But I am unsure whether the addition of the driver name is useful at this point 
- most drivers already printk some sort of association out that can be used to 
track the bus_id/netdev name back to the driver easily.

So, hence I omitted doing this in this patch.

Auke
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ