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]
Message-ID: <4753AE07.1040906@cn.fujitsu.com>
Date:	Mon, 03 Dec 2007 15:19:35 +0800
From:	Wang Chen <wangchen@...fujitsu.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
CC:	Gerrit Renker <gerrit@....abdn.ac.uk>, davem@...emloft.net,
	andi@...stfloor.org, netdev@...r.kernel.org
Subject: Re: [PATCH 3/3] [UDP6]: Counter increment on BH mode

Herbert Xu said the following on 2007-12-1 9:54:
> On Fri, Nov 30, 2007 at 11:19:49AM +0000, Gerrit Renker wrote:
>> |  csum_copy_err:
>> | -	UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite);
>> | +	UDP6_INC_STATS_BH(UDP_MIB_INERRORS, is_udplite);
>> |  	skb_kill_datagram(sk, skb, flags);
>> |  
>> |  	if (flags & MSG_DONTWAIT)
>> | 
>> Is it not the other way round ?? :- 
> 
> I agree.  Wang Chen, please change this and other appropriate
> BH calls to USER.  Basically recvmsg should always be USER while
> rcv is BH.
> 

Resubmit the patch.

System calls should be USER. So change the BH to USER for
UDP*_INC_STATS_BH().

Signed-off-by: Wang Chen <wangchen@...fujitsu.com>
---
 ipv4/udp.c |    4 ++--
 ipv6/udp.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.24.rc3.org/net/ipv4/udp.c	2007-12-03 15:10:49.000000000 +0800
+++ linux-2.6.24.rc3/net/ipv4/udp.c	2007-12-03 14:52:54.000000000 +0800
@@ -874,7 +874,7 @@ try_again:
 	if (err)
 		goto out_free;
 
-	UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS, is_udplite);
+	UDP_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite);
 
 	sock_recv_timestamp(msg, sk, skb);
 
@@ -899,7 +899,7 @@ out:
 	return err;
 
 csum_copy_err:
-	UDP_INC_STATS_BH(UDP_MIB_INERRORS, is_udplite);
+	UDP_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite);
 
 	skb_kill_datagram(sk, skb, flags);
 
--- linux-2.6.24.rc3.org/net/ipv6/udp.c	2007-12-03 15:10:49.000000000 +0800
+++ linux-2.6.24.rc3/net/ipv6/udp.c	2007-12-03 15:09:55.000000000 +0800
@@ -164,7 +164,7 @@ try_again:
 	if (err)
 		goto out_free;
 
-	UDP6_INC_STATS_BH(UDP_MIB_INDATAGRAMS, is_udplite);
+	UDP6_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite);
 
 	sock_recv_timestamp(msg, sk, skb);

--
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