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]
Date:	Fri, 25 Apr 2014 12:51:55 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	David.Laight@...LAB.COM
Cc:	lorenzo@...gle.com, netdev@...r.kernel.org,
	yoshfuji@...ux-ipv6.org, hannes@...essinduktion.org,
	eric.dumazet@...il.com
Subject: Re: [PATCH net-next v5 1/3] net: ipv6: Unduplicate
 {raw,udp}v6_sendmsg code

From: David Laight <David.Laight@...LAB.COM>
Date: Fri, 25 Apr 2014 11:24:21 +0000

> From: Lorenzo Colitti
>> rawv6_sendmsg and udpv6_sendmsg have ~100 lines of almost
>> identical code. Move this into a new ipv6_datagram_send_common
>> helper function.
>> 
>> Tested: black-box tested using user-mode Linux.
>> 
>> - Basic UDP sends using sendto work.
>> - Mark routing and oif routing using SO_BINDTODEVICE work.
> ...
>> diff --git a/include/net/ipv6.h b/include/net/ipv6.h
>> index d640925..f1a247a 100644
>> --- a/include/net/ipv6.h
>> +++ b/include/net/ipv6.h
>> @@ -785,6 +785,13 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
>>  int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len);
>>  int ip6_datagram_connect_v6_only(struct sock *sk, struct sockaddr *addr,
>>  				 int addr_len);
>> +int ip6_datagram_send_common(struct sock *sk, struct msghdr *msg,
>> +			     struct sockaddr_in6 *sin6, int addr_len,
>> +			     struct flowi6 *fl6, struct dst_entry **dstp,
>> +			     struct ipv6_txoptions **optp,
>> +			     struct ipv6_txoptions *opt_space,
>> +			     int *hlimit, int *tclass, int *dontfrag,
>> +			     int *connected);
> 
> That is a lot of parameters! and udp send is probably an important path.

The more I read this series the more I dislike it.

All of these pointers being passed in, were local variables in the
original code.

This consolidation makes the code much worse, not better.
--
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