Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-21 Thread Cong Wang
On Tue, 2013-08-20 at 07:28 -0700, Casey Schaufler wrote: > > I do use and enjoy all of these implementations! Thank you > for the fine implementations. In the end, if you're maintaining > the code it's your call. I question change that does not have > an obvious purpose because statistically ever

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-20 Thread Markku Savela
Imho, the patch doesn't go far enough actually. What should be done: - get rid of the union - use IPv6 format only - store IPv4 addresses in IPv4 mapped format -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-20 Thread Casey Schaufler
On 8/20/2013 6:01 AM, Cong Wang wrote: > On Mon, 2013-08-19 at 14:42 -0700, Casey Schaufler wrote: >> Well, they certainly don't appear to add any value on their own. >> I also generally oppose doing clever things with data structures. > If you want to implement same thing for 5+ times, Those 5+

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-20 Thread Cong Wang
On Mon, 2013-08-19 at 14:42 -0700, Casey Schaufler wrote: > > Well, they certainly don't appear to add any value on their own. > I also generally oppose doing clever things with data structures. If you want to implement same thing for 5+ times, yes, it has no value for you. Enjoy the following c

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-19 Thread David Miller
From: Casey Schaufler Date: Mon, 19 Aug 2013 14:42:55 -0700 > On 8/19/2013 12:50 PM, David Miller wrote: >> It's so that you can pass a generic ipv4/ipv6 address blob into >> things like printf formatting, and since there is an address family >> member present, it knows what's in there and theref

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-19 Thread Casey Schaufler
On 8/19/2013 12:50 PM, David Miller wrote: > It's so that you can pass a generic ipv4/ipv6 address blob into > things like printf formatting, and since there is an address family > member present, it knows what's in there and therefore one printf > format specifier can handle both ipv4 and ipv6 add

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-19 Thread David Miller
It's so that you can pass a generic ipv4/ipv6 address blob into things like printf formatting, and since there is an address family member present, it knows what's in there and therefore one printf format specifier can handle both ipv4 and ipv6 addresses. Like you, I think these changes a complet

Re: [Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-19 Thread Casey Schaufler
On 8/19/2013 3:14 AM, Cong Wang wrote: > From: Cong Wang > > selinux has some similar definition like union inet_addr, > it can re-use the generic union inet_addr too. I'm trying to understand what value this change adds. All it appears to do is swap one set of inconvenient structure members for

[Patch net-next v3 9/9] selinux: use generic union inet_addr

2013-08-19 Thread Cong Wang
From: Cong Wang selinux has some similar definition like union inet_addr, it can re-use the generic union inet_addr too. Cc: James Morris Cc: Stephen Smalley Cc: Eric Paris Cc: Paul Moore Cc: linux-kernel@vger.kernel.org Cc: linux-security-mod...@vger.kernel.org Signed-off-by: Cong Wang ---