Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!haven!decuac!e2big.mko.dec.com!bacchus.pa.dec.com!decwrl!sdd.hp.com!uakari.primate.wisc.edu!dali.cs.montana.edu!masscomp!mod From: mod@masscomp.ccur.com (2915) Newsgroups: comp.lang.c Subject: Re: Crash a RISC machine from user-mode code: Summary: I think I recognize the behaviour you mentioned Message-ID: <43078@masscomp.ccur.com> Date: 11 Aug 90 17:11:58 GMT References: <1826@mountn.dec.com> <1990Aug10.101110.13698@tsa.co.uk> Reply-To: mod@masscomp.UUCP (Michael O'Donnell 508-392-2915) Distribution: na Organization: Concurrent Computer Corp. - Westford, Ma Lines: 35 In article <1990Aug10.101110.13698@tsa.co.uk> domo@tsa.co.uk (Dominic Dunlop) writes: > ... >... after this, the [crashme] program gets stuck in a silent loop. Some >time later, my system sprouts a rash of "Warning: swap space is low"s, >the disk threatens to shake itself to bits, other processes start >aborting, and response becomes snail-like. But crashme eventually >responds if sent a quit signal, and, after more feverish disk activity, >the system recovers. > >I don't know precisely what's going on, but presume it's something a >purpose-built malevolent user-mode program could do on any system >(whether CISC or RISC) without user time and memory space quotas... >-- >Dominic Dunlop I agree, because I'm just such a user ;-> Here's a program that causes behaviour exactly as you described: /* * this program seems to make most swapping/demand paging * systems do unpleasant things... (like run out of swap space.) */ #define MMU_PAGESIZE (4096) /* or whatever... */ main() { int array[ MMU_PAGESIZE / sizeof( int ) ]; return( main( array[ 1000 ] ) ); /* Force a reference. */ } The things done here could also be done a dozen other ways, but the general effect is to consume so much RAM so fast that you choke and die. Chances are that executing the random instructions in crashme caused some other part of the program to be modified and it then began to do something such as this program does. Fun Stuff!