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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070828.142216.99461544.davem@davemloft.net>
Date:	Tue, 28 Aug 2007 14:22:16 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	joe@...ches.com
Cc:	johannes@...solutions.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

From: Joe Perches <joe@...ches.com>
Date: Tue, 28 Aug 2007 14:12:00 -0700

> I've forward ported what I had.
> 
> Option 1:
> 	DECLARE_MAC_BUF(var);
>  	printk(MAC_FMT, MAC_ARG(var, dev->dev_addr));
> 
> perhaps it looks nicer to remove the MAC_FMT and defines.
> 
> Option 2:
> 	DECLARE_MAC_BUF(mac);
> 	printk("%s", print_mac(mac, dev->dev_addr));
> 
> Option 3:
> 	char mac[PRINT_MAC_SIZE];
> 	printk("%s", print_mac(mac, dev->dev_addr));
> 
> Option 4:
> 	char mac[18];
> 	printk("%s", print_mac(mac, dev->dev_addr));
> 
> Preferences?

The less details exposed to the user the better, and in this sense
options 1 and 2 are the clear winners as far as I can tell.

Between them, 1 and 2 seem roughly the same, but I'm slightly leaning
towards 2.
-
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