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  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:	Mon, 11 Jun 2007 10:50:18 -0700
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	"Kok, Auke" <auke-jan.h.kok@...el.com>
Cc:	netdev@...r.kernel.org, jeff@...zik.org, davem@...emloft.net,
	arjan@...ux.intel.com
Subject: Re: [PATCH 1/2] [RFC] NET: Implement a standard ndev_printk family

On Mon, 11 Jun 2007 10:30:26 -0700
"Kok, Auke" <auke-jan.h.kok@...el.com> wrote:

> Stephen Hemminger wrote:
> > On Fri, 08 Jun 2007 16:42:31 -0700
> > "Kok, Auke" <auke-jan.h.kok@...el.com> wrote:
> > 
> >> Stephen Hemminger wrote:
> >>>>  
> >>>> +#define ndev_printk(kern_level, netif_level, netdev, format, arg...) \
> >>>> +	do { if ((netdev)->msg_enable & NETIF_MSG_##netif_level) { \
> >>>> +		printk(kern_level "%s: " format, \
> >>>> +		(netdev)->name, ## arg); } } while (0)
> > 
> > My preference would be something more like dev_printk or even use that?
> > You want to show both device name, and physical attachment in the message.
> 
> yes, agreed, but currently netdev->dev->bus_id is bluntly overwritten by 
> net-sysfs.c making this not trivial:
> 
> +471:        strlcpy(dev->bus_id, net->name, BUS_ID_SIZE);

That was because the bus_id is used as the name in /sys/class/net. The term
bus_id is overloaded as part of the confusion about device vs pseudo-device
that was part of the original sysfs design.

> so now netdev->dev->bus_id contains eth%d as well. I vaguely remember that there 
> is another way to get the bus_id back, so I can likely work around it, but this 
> particular overwriting of information is a BUG imo, and should be fixed.
> 
> Auke

If it is a pci_device use pci_name(pdev).

-- 
Stephen Hemminger <shemminger@...ux-foundation.org>
-
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