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, 8 Jul 2008 20:16:58 -0700
From:	Stephen Hemminger <stephen.hemminger@...tta.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	David Miller <davem@...emloft.net>, swise@...ngridcomputing.com,
	rdreier@...co.com, shemminger@...tta.com, netdev@...r.kernel.org
Subject: Re: Printing the driver name as part of the netdev watchdog message

On Tue, 8 Jul 2008 18:44:56 -0700
Arjan van de Ven <arjan@...radead.org> wrote:

> On Tue, 08 Jul 2008 16:53:04 -0700 (PDT)
> David Miller <davem@...emloft.net> wrote:
> 
> > From: Arjan van de Ven <arjan@...radead.org>
> > Date: Tue, 8 Jul 2008 16:48:26 -0700
> > 
> > > On Tue, 08 Jul 2008 14:57:38 -0700 (PDT)
> > > David Miller <davem@...emloft.net> wrote:
> > > 
> > > > What we need instead is to cache the info block into the netdev
> > > > struct when the driver is ->open()'d, and then you can fetch it
> > > > out of there however you like.
> > > 
> > > but.. isn't that like almost the same as using the object model
> > > data at that point?
> > 
> > You're right, this is getting silly
> > 
> > To be honest, the more I think about this, the driver->name should
> > be sufficient.
> > 
> 
> ok here it is:
> 
> From: Arjan van de Ven <arjan@...ux.intel.com>
> Subject: Print the module name as part of the watchdog message
> 
> As suggested by Dave:
> 
> This patch adds a function to get the driver name from a struct net_device,
> and consequently uses this in the watchdog timeout handler to print as 
> part of the message. 
> 
> Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
> ---
>  include/linux/netdevice.h |    2 ++
>  net/core/dev.c            |   19 +++++++++++++++++++
>  net/sched/sch_generic.c   |    7 ++++---
>  3 files changed, 25 insertions(+), 3 deletions(-)
> 
> Index: linux.trees.git/include/linux/netdevice.h
> ===================================================================
> --- linux.trees.git.orig/include/linux/netdevice.h
> +++ linux.trees.git/include/linux/netdevice.h
> @@ -1516,6 +1516,8 @@ extern void dev_seq_stop(struct seq_file
>  extern int netdev_class_create_file(struct class_attribute *class_attr);
>  extern void netdev_class_remove_file(struct class_attribute *class_attr);
>  
> +extern void netdev_drivername(struct net_device *dev, char *buffer, int len);
> +
>  extern void linkwatch_run_queue(void);
>  
>  extern int netdev_compute_features(unsigned long all, unsigned long one);
> Index: linux.trees.git/net/core/dev.c
> ===================================================================
> --- linux.trees.git.orig/net/core/dev.c
> +++ linux.trees.git/net/core/dev.c
> @@ -4554,6 +4554,25 @@ err_name:
>  	return -ENOMEM;
>  }
>  
> +void netdev_drivername(struct net_device *dev, char *buffer, int len)

void netdev_drivername(const struct net_device *dev, char *buffer, int len)

since net device not changed.
--
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