public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Announce] Strace Test
@ 2004-02-16  5:22 dan carpenter
  2004-02-16  6:59 ` Anton Blanchard
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: dan carpenter @ 2004-02-16  5:22 UTC (permalink / raw)
  To: ltp-list; +Cc: linux-kernel

Good evening,

I'm happy to announce the initial public release of 
Strace Test.  I believe Strace Test is the most 
aggressive general purpose kernel tester available.
Strace Test generally crashes my system within 
5 minutes (2.6.1-rc2).

Strace Test uses a modified version of strace 4.5.1.  
Instead of printing out information about system calls, 
the modified version calls the syscalls with improper 
values.  A patch and a binary for i386 are included 
in the strace_test tar ball.

Strace Test uses LTP to generate real world syscalls.  
Just unpack ltp and type 'make -k'.  You don't
need to install the test if you don't want to.

The modifications make the test scripts go haywire.  
To keep the test on track we restart it every 10 
seconds.  The first script is run as root and it 
spawns off the test as a test user.  Every 10 seconds
root kills off all the test user's processes and 
restarts the test.  The actual tests are run with 
user permissions.

Strace Test is available from:
http://67.113.20.209/strace_test.tar.bz2

Test Instructions (for i386)
Create a test user
Download and untar ltp (ltp.sf.net)
Cd to ltp and `make -k` 
Untar strace_test
cd strace_test && ./go_go.sh
Enter the path to ltp
Enter the test user

regards,
dan carpenter
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Announce] Strace Test
  2004-02-16  5:22 [Announce] Strace Test dan carpenter
@ 2004-02-16  6:59 ` Anton Blanchard
  2004-03-11  9:53   ` Chris Wedgwood
  2004-02-16 15:46 ` [LTP] " Robert Williamson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Anton Blanchard @ 2004-02-16  6:59 UTC (permalink / raw)
  To: dan carpenter; +Cc: ltp-list, linux-kernel

 
> Strace Test uses a modified version of strace 4.5.1.  
> Instead of printing out information about system calls, 
> the modified version calls the syscalls with improper 
> values.  A patch and a binary for i386 are included 
> in the strace_test tar ball.

Nasty. I like it :)

Im running it on ppc32 at the moment, will test ppc64 next. Might be 
worth changing maxed to a long and passing back -1UL:

int
maxed(arg)
int arg;
{
       return 0xffffffff;
}

Anton

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LTP] [Announce] Strace Test
  2004-02-16  5:22 [Announce] Strace Test dan carpenter
  2004-02-16  6:59 ` Anton Blanchard
@ 2004-02-16 15:46 ` Robert Williamson
  2004-02-19 10:07 ` Nikita Danilov
  2004-02-19 10:29 ` David Weinehall
  3 siblings, 0 replies; 9+ messages in thread
From: Robert Williamson @ 2004-02-16 15:46 UTC (permalink / raw)
  To: dan carpenter; +Cc: linux-kernel, ltp-list


This is awesome Dan!  I added the directory into the /tools section of the
LTP and it will be included in the next release. Thanks!

-Robbie

Robert V. Williamson <robbiew@us.ibm.com>
Linux Test Project
IBM Linux Technology Center
Web: http://www.linuxtestproject.org
IRC: #ltp on freenode.irc.net
====================
"Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former." -Albert Einstein

ltp-list-admin@lists.sourceforge.net wrote on 02/15/2004 11:22:57 PM:

> Good evening,
>
> I'm happy to announce the initial public release of
> Strace Test.  I believe Strace Test is the most
> aggressive general purpose kernel tester available.
> Strace Test generally crashes my system within
> 5 minutes (2.6.1-rc2).
>
> Strace Test uses a modified version of strace 4.5.1.
> Instead of printing out information about system calls,
> the modified version calls the syscalls with improper
> values.  A patch and a binary for i386 are included
> in the strace_test tar ball.
>
> Strace Test uses LTP to generate real world syscalls.
> Just unpack ltp and type 'make -k'.  You don't
> need to install the test if you don't want to.
>
> The modifications make the test scripts go haywire.
> To keep the test on track we restart it every 10
> seconds.  The first script is run as root and it
> spawns off the test as a test user.  Every 10 seconds
> root kills off all the test user's processes and
> restarts the test.  The actual tests are run with
> user permissions.
>
> Strace Test is available from:
> http://67.113.20.209/strace_test.tar.bz2
>
> Test Instructions (for i386)
> Create a test user
> Download and untar ltp (ltp.sf.net)
> Cd to ltp and `make -k`
> Untar strace_test
> cd strace_test && ./go_go.sh
> Enter the path to ltp
> Enter the test user
>
> regards,
> dan carpenter
> --
> ___________________________________________________________
> Sign-up for Ads Free at Mail.com
> http://promo.mail.com/adsfreejump.htm
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Announce] Strace Test
  2004-02-16  5:22 [Announce] Strace Test dan carpenter
  2004-02-16  6:59 ` Anton Blanchard
  2004-02-16 15:46 ` [LTP] " Robert Williamson
@ 2004-02-19 10:07 ` Nikita Danilov
  2004-02-19 10:38   ` Andrew Morton
  2004-02-19 10:29 ` David Weinehall
  3 siblings, 1 reply; 9+ messages in thread
From: Nikita Danilov @ 2004-02-19 10:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: ltp-list, dan carpenter

dan carpenter writes:
 > Good evening,
 > 
 > I'm happy to announce the initial public release of 
 > Strace Test.  I believe Strace Test is the most 
 > aggressive general purpose kernel tester available.
 > Strace Test generally crashes my system within 
 > 5 minutes (2.6.1-rc2).
 > 
 > Strace Test uses a modified version of strace 4.5.1.  
 > Instead of printing out information about system calls, 
 > the modified version calls the syscalls with improper 
 > values.

It immediately DoSes kernel by calling sys_sysctl() with huge nlen:
printk() consumes all CPU.

Nikita.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Announce] Strace Test
  2004-02-16  5:22 [Announce] Strace Test dan carpenter
                   ` (2 preceding siblings ...)
  2004-02-19 10:07 ` Nikita Danilov
@ 2004-02-19 10:29 ` David Weinehall
  3 siblings, 0 replies; 9+ messages in thread
From: David Weinehall @ 2004-02-19 10:29 UTC (permalink / raw)
  To: dan carpenter; +Cc: ltp-list, linux-kernel

On Mon, Feb 16, 2004 at 12:22:57AM -0500, dan carpenter wrote:
> Good evening,
> 
> I'm happy to announce the initial public release of 
> Strace Test.  I believe Strace Test is the most 
> aggressive general purpose kernel tester available.
> Strace Test generally crashes my system within 
> 5 minutes (2.6.1-rc2).

Pretty please with sprinkles upon, could you stress test a 2.0.40 kernel
and report your results to me?  While I do not expect the 2.0-kernel to
be the paramount of stability, it would be nice to fix any obvious
bugs...


Regards: David Weinehall
-- 
 /) David Weinehall <tao@acc.umu.se> /) Northern lights wander      (\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\)  http://www.acc.umu.se/~tao/    (/   Full colour fire           (/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Announce] Strace Test
  2004-02-19 10:07 ` Nikita Danilov
@ 2004-02-19 10:38   ` Andrew Morton
  2004-02-19 10:51     ` Nikita Danilov
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2004-02-19 10:38 UTC (permalink / raw)
  To: Nikita Danilov; +Cc: linux-kernel, ltp-list, error27

Nikita Danilov <Nikita@Namesys.COM> wrote:
>
>  > Strace Test uses a modified version of strace 4.5.1.  
>   > Instead of printing out information about system calls, 
>   > the modified version calls the syscalls with improper 
>   > values.
> 
>  It immediately DoSes kernel by calling sys_sysctl() with huge nlen:
>  printk() consumes all CPU.

Something like this?

--- 25/kernel/sysctl.c~sysctl-nlen-check	2004-02-19 02:36:20.000000000 -0800
+++ 25-akpm/kernel/sysctl.c	2004-02-19 02:37:40.000000000 -0800
@@ -913,6 +913,9 @@ asmlinkage long sys_sysctl(struct __sysc
 
 	if (copy_from_user(&tmp, args, sizeof(tmp)))
 		return -EFAULT;
+
+	if (tmp.nlen < 0 || tmp.nlen > CTL_MAXNAME)
+		return -EINVAL;
 	
 	if (tmp.nlen != 2 || copy_from_user(name, tmp.name, sizeof(name)) ||
 	    name[0] != CTL_KERN || name[1] != KERN_VERSION) { 

_


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Announce] Strace Test
  2004-02-19 10:38   ` Andrew Morton
@ 2004-02-19 10:51     ` Nikita Danilov
  2004-02-19 10:59       ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Nikita Danilov @ 2004-02-19 10:51 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, ltp-list, error27

Andrew Morton writes:
 > Nikita Danilov <Nikita@Namesys.COM> wrote:
 > >
 > >  > Strace Test uses a modified version of strace 4.5.1.  
 > >   > Instead of printing out information about system calls, 
 > >   > the modified version calls the syscalls with improper 
 > >   > values.
 > > 
 > >  It immediately DoSes kernel by calling sys_sysctl() with huge nlen:
 > >  printk() consumes all CPU.
 > 
 > Something like this?

On slow console (serial kgdb) this still would be problematic. I think
printk_ratelimit() is needed. But why this loop is needed at all? It
seems strange that syscall prints its arguments instead of just
returning -EINVAL.

 > 
 > --- 25/kernel/sysctl.c~sysctl-nlen-check	2004-02-19 02:36:20.000000000 -0800
 > +++ 25-akpm/kernel/sysctl.c	2004-02-19 02:37:40.000000000 -0800
 > @@ -913,6 +913,9 @@ asmlinkage long sys_sysctl(struct __sysc
 >  
 >  	if (copy_from_user(&tmp, args, sizeof(tmp)))
 >  		return -EFAULT;
 > +
 > +	if (tmp.nlen < 0 || tmp.nlen > CTL_MAXNAME)
 > +		return -EINVAL;
 >  	
 >  	if (tmp.nlen != 2 || copy_from_user(name, tmp.name, sizeof(name)) ||
 >  	    name[0] != CTL_KERN || name[1] != KERN_VERSION) { 

Nikita.

 > 
 > _
 > 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Announce] Strace Test
  2004-02-19 10:51     ` Nikita Danilov
@ 2004-02-19 10:59       ` Andrew Morton
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2004-02-19 10:59 UTC (permalink / raw)
  To: Nikita Danilov; +Cc: linux-kernel, ltp-list, error27

Nikita Danilov <Nikita@Namesys.COM> wrote:
>
>  Andrew Morton writes:
>   > Nikita Danilov <Nikita@Namesys.COM> wrote:
>   > >
>   > >  > Strace Test uses a modified version of strace 4.5.1.  
>   > >   > Instead of printing out information about system calls, 
>   > >   > the modified version calls the syscalls with improper 
>   > >   > values.
>   > > 
>   > >  It immediately DoSes kernel by calling sys_sysctl() with huge nlen:
>   > >  printk() consumes all CPU.
>   > 
>   > Something like this?
> 
>  On slow console (serial kgdb) this still would be problematic. I think
>  printk_ratelimit() is needed. But why this loop is needed at all? It
>  seems strange that syscall prints its arguments instead of just
>  returning -EINVAL.

It is kindly telling the user that the sysctl is obsolete.

I'll kill it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Announce] Strace Test
  2004-02-16  6:59 ` Anton Blanchard
@ 2004-03-11  9:53   ` Chris Wedgwood
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wedgwood @ 2004-03-11  9:53 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: dan carpenter, ltp-list, linux-kernel

On Mon, Feb 16, 2004 at 05:59:26PM +1100, Anton Blanchard wrote:

> Im running it on ppc32 at the moment, will test ppc64 next. Might be
> worth changing maxed to a long and passing back -1UL:

Nit; I really dislike -1UL... it doesnt make any sense (well,
certainly not to me anyhow).  I'd much rather see ~0ul.


  --cw

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-03-11  9:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-16  5:22 [Announce] Strace Test dan carpenter
2004-02-16  6:59 ` Anton Blanchard
2004-03-11  9:53   ` Chris Wedgwood
2004-02-16 15:46 ` [LTP] " Robert Williamson
2004-02-19 10:07 ` Nikita Danilov
2004-02-19 10:38   ` Andrew Morton
2004-02-19 10:51     ` Nikita Danilov
2004-02-19 10:59       ` Andrew Morton
2004-02-19 10:29 ` David Weinehall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox