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>] [day] [month] [year] [list]
Message-ID: <AANLkTim7ZhGGgE9TJsu1m5=fD743meN12V5Ywn_9Cyaq@mail.gmail.com>
Date:	Tue, 3 Aug 2010 23:20:17 +0800
From:	"ustc.mail" <backyes@...l.ustc.edu.cn>
To:	robert@...julf.net, netdev@...r.kernel.org
Cc:	robert.olsson@....uu.se
Subject: [PATCH] about net/core/pktgen.c module.

Hi,
I find that there is a bug in the pktgen kernel packet generator. It's
my first time to add a patch, so welcome to give me suggestion about
patch work.

description: the bug makes the first generated packets (one or more
which depend on the configuration from usespace script.)enter to the
same NIC queue of multi-queue NIC for the wrong position of
mod_cur_headers(pkt_dev) call while building the IPV4 and IPV6
skb_buff.
kernel version: linux-2.6.33.3
file: linux-2.6.33.3/net/core/pktgen.c
result: while setting skb_clone more than one, specially for a
considerable number, the multiqueue function is not efficient for its
wrong queue_map value.
patch as following:
--- pktgen.c	2010-08-03 22:46:55.001682745 +0800
+++ pktgen.patch.c	2010-08-03 22:48:03.367409102 +0800
@@ -2567,8 +2567,8 @@
 	/* Update any of the values, used when we're incrementing various
 	 * fields.
 	 */
-	queue_map = pkt_dev->cur_queue_map;
 	mod_cur_headers(pkt_dev);
+	queue_map = pkt_dev->cur_queue_map;

 	datalen = (odev->hard_header_len + 16) & ~0xf;
 	skb = __netdev_alloc_skb(odev,
@@ -2913,8 +2913,8 @@
 	/* Update any of the values, used when we're incrementing various
 	 * fields.
 	 */
-	queue_map = pkt_dev->cur_queue_map;
 	mod_cur_headers(pkt_dev);
+	queue_map = pkt_dev->cur_queue_map;

 	skb = __netdev_alloc_skb(odev,
 				 pkt_dev->cur_pkt_size + 64
--------------------------------------patch
end-------------------------------------------------
Best regards!
from backyes
---------------------------------------reply
end-------------------------------------------------
On Tue, Aug 3, 2010 at 10:30 PM, ustc.mail <backyes@...l.ustc.edu.cn> wrote:
> Thanks for your reply!
> It's my pleasure to patch it.
> -Yanfei
>
> On Tue, Aug 3, 2010 at 7:44 PM, <robert@...julf.net> wrote:
>>
>> > Dear robert, I am doing some research on the
>> >pktgen.c implementation. While reading the source code, I find some
>> >doubts about cur->cur_queue_map for multiqueue NIC .  The following
>> >code is from pktgen.c in kernel 2.6.33.3.   For line 2919 and line
>> >2920, the first generated packets is sent to same queue of NIC for
>> >every thread. Because the the first generated packets is sent while
>> >the cur_queue_map is not setted yet.   "reverse the two line" is OK.
>> >Am I right?
>>
>> Right first time we're using queue_map that's not been set by
>> set_cur_queue_map(pkt_dev);
>>
>>        queue_map = pkt_dev->cur_queue_map;
>>        mod_cur_headers(pkt_dev);
>>
>> Can you make a patch and submit to netdev?
>>
>>
>>                                        --ro
>>
>
>

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