Re: linux 2.0 PTE bug (fwd)

pedward@webcom.com
Thu, 28 May 1998 11:19:18 -0700 (PDT)


Phil forwarded the original post of this to l-k earlier, I'm now forwarding the
response I posted to BUGTRAQ.

--Perry

>
> >
> > Hi all,
> >
> > there is the program :
>
> [SNIP of wonderful reason to set rlimits]
>
> >
> > The idea is to take a lot of memory. So, we map all our virtual pages,
> > to force the system to allow all the pte (am talking about PC box).
> > So, the process will have allocated 768 pages that will never be
> > swapped (that's the crucial point).
> >
> > So, that's simple, you run this program as much time as you need to take
> > all the memory, and the PC won't be usable anymore (for my 64Mb box,
> > i need to run it about 20 times).
> >
> > And then, you can have a wonderful light-show with your HD-led :) (PC will
> > spend its time in swapping).
> >
> > How to solve it ?
> > Well, we could swap the pgd / pmd / pte, but i really don't know
> > if it is possible or what.
>
> The default TASK_SIZE is set in /usr/src/linux/include/asm/processor.h it is the
> virtual memory maximum map size. This in itself is not dynamically configurable
> (it really has nothing to do with resources). The main factor is RLIMIT_AS,
> defined in /usr/src/linux/include/asm/resource.h, it controls how much virtual
> memory that a process can map, mmap utilizes virtual memory. You can
> safely throttle people by running a program which calls setrlimit(2) with
> RLIMIT_AS as the resource. By far, 3GB is too much.
>
> This is only a DoS if you LET it be a DoS.
>
> >
> > If this bug is already well know, am sorry to disturb with it.
> >
> > It applies only on the 2.0 kernel, for the 2.1 (soon 2.2) i don't know
> > if it works, will have to read the source.
> >
> > Sed.
> > p6mip300@infop6.cicrp.jussieu.fr.
> >
> >
>
> --Perry
>

-- 
Perry Harrington        System Software Engineer    zelur xuniL  ()
http://www.webcom.com  perry.harrington@webcom.com  Think Blue.  /\

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu