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 15:01:59 -0700
From:	"Kok, Auke" <auke-jan.h.kok@...el.com>
To:	Joe Perches <joe@...ches.com>
CC:	netdev@...r.kernel.org, jeff@...zik.org, davem@...emloft.net,
	arjan@...ux.intel.com, shemminger@...ux-foundation.org
Subject: Re: [PATCH 1/2] [RFC] NET: Implement a standard ndev_printk family

Joe Perches wrote:
> On Mon, 2007-06-11 at 14:37 -0700, Auke Kok wrote:
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index 3a70f55..d185f41 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -540,6 +540,8 @@ struct net_device
>>  	struct device		dev;
>>  	/* space for optional statistics and wireless sysfs groups */
>>  	struct attribute_group  *sysfs_groups[3];
>> +
>> +	int			msg_enable;
>>  };
>>  #define to_net_dev(d) container_of(d, struct net_device, dev)
>>  
> 
> msg_enable is more frequently defined in drivers/net as u32 not int.
> 
> egrep -r -w --include=*.[ch] "u32[[:space:]]+msg_enable" drivers/net | wc -l
> egrep -r -w --include=*.[ch] "int[[:space:]]+msg_enable" drivers/net | wc -l
> 
> 29 to 5

yes, we're only using the bottom 15 bits anyway, but the net_device struct 
consistently uses 'int' style members, leaving it up to the compiler to pick an 
appropriate size for each arch. That was the reason I chose int here.

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