Re: Resource limit test in binfmt_elf

Michael Meskes (meskes@informatik.rwth-aachen.de)
Mon, 17 Jun 1996 14:04:23 +0200 (MET DST)


Jeremy Fitzhardinge writes:
> It doesn't seem like a really good idea to try and distinguish between
> the various parts of an ELF file. The settings in the phdrs are only
> advisory initial conditions: it would be easy to make a program which
> had a large array in the "read-only" text section, which it makes
> writable with mprotect(). The distinction between different parts of
> a process address space are arbitary and have no real meaning except
> by convention; there's no way to make hard and fast policy descisions
> on that basis (that is, the distinction between "text usage" and "data
> usage" is meaningless; there's only memory usage).

So what should we change?

> On the other hand, it should be OK as an early heuristic. However,
> do_wp_page() should check the memory limit when it adds a new page
> to the process address space.

I agree.

The question remains, though, whether we should keep this test as it is or
change it.

Michael

-- 
Michael Meskes                   |    _____ ________ __  ____
meskes@informatik.rwth-aachen.de |   / ___// ____/ // / / __ \___  __________
meskes@sanet.de                  |   \__ \/ /_  / // /_/ /_/ / _ \/ ___/ ___/
meskes@debian.org                |  ___/ / __/ /__  __/\__, /  __/ /  (__  )
Use Debian Linux!		 | /____/_/      /_/  /____/\___/_/  /____/