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  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:	Wed, 29 Nov 2006 23:04:37 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	pavol.gono@...il.com, netdev@...r.kernel.org
Subject: Re: pktgen

On Tue, Nov 28, 2006 at 03:33:25PM -0800, David Miller wrote:
> From: Alexey Dobriyan <adobriyan@...il.com>
> Date: Wed, 22 Nov 2006 00:22:51 +0300
> 
> > [CCing netdev, bug in pktgen]
> > 
> > 	[build modular pktgen]
> > 	while true; do modprobe pktgen && rmmod pktgen; done
> > 
> > 	BUG: warning at fs/proc/generic.c:732/remove_proc_entry()
> > 	 [<c016a7ad>] remove_proc_entry+0x161/0x1ca
> > 	 [<e19969ab>] pg_cleanup+0xd5/0xdc [pktgen]
> >          [<c011fa3e>] autoremove_wake_function+0x0/0x35
> > 	 [<c01280bd>] sys_delete_module+0x162/0x189
> > 	 [<c0136500>] remove_vma+0x31/0x36
> > 	 [<c0136df7>] do_munmap+0x193/0x1ac
> > 	 [<c0102829>] sysenter_past_esp+0x56/0x79
> > 	 [<c02d007b>] fn_hash_delete+0x4f/0x1c7
> > 
> > On Tue, Nov 21, 2006 at 09:36:46PM +0100, Pavol Gono wrote:
> > > I am going to add two more:
> > > for i in 1 2 3 4 5 ; do modprobe pktgen ; rmmod pktgen ; done
> > 
> > Looks like it creates /proc/net/pktgen/kpktgen_%i but forgets to remove
> > them.
>
> It's pretty careful to delete all of the entries under
> /proc/net/pktgen/.
>
> When the module is brought down, it walks the list of threads
> and brings them down by setting T_TERMINATE in t->control.

Looks like worker thread strategically clears it if scheduled at wrong
moment.

--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3292,7 +3292,6 @@ static void pktgen_thread_worker(struct
 
 	init_waitqueue_head(&t->queue);
 
-	t->control &= ~(T_TERMINATE);
 	t->control &= ~(T_RUN);
 	t->control &= ~(T_STOP);
 	t->control &= ~(T_REMDEVALL);

> This makes the thread break out of it's loop and run:
>
> 	pktgen_stop(t);
> 	pktgen_rem_all_ifs(t);
> 	pktgen_rem_thread(t);

Kernel seeems to survive, but when I hit Ctrl+C after half
a minute backtrace is back being the very last dmesg lines.

-
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