linux-mips
[Top] [All Lists]

Re: User applications

To: "Kevin D. Kissell" <kevink@mips.com>
Subject: Re: User applications
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Mon, 8 Jan 2001 16:40:06 +0100 (MET)
Cc: linux-mips@oss.sgi.com, Carsten Langgaard <carstenl@mips.com>, Michael Shmulevich <michaels@jungo.com>
In-reply-to: <010701c07986$ac768180$0deca8c0@Ulysses>
Organization: Technical University of Gdansk
Sender: owner-linux-mips@oss.sgi.com
On Mon, 8 Jan 2001, Kevin D. Kissell wrote:

> >  Obviously, you don't want to allow unprivileged users to flush caches as
> > a whole as it could lead to a DoS.
> 
> By that logic, we should not allow users to allocate more virtual
> memory than there is physical memory in the system!  A pathological
> swap program is arguably far a far worse denial of service attack

 There are limits -- see `info setrlimit'.  There is no way to prevent a
program from executing:

while (1) flush_cache_all();

though but the system's performance would suffer much.  Remember there is
real world out there... 

 Which means sysmips(FLUSH_CACHE, ...) needs to be fixed or removed. 

> than flushing the caches - so long as by "flush" we mean invalidate
> with writeback (on copyback caches), of course.

 What's wrong with cacheflush(addr, count, which) that actually checks if
<addr; addr+count> lies within the caller's address space before
performing the flush and returns -EPERM otherwise?  It would make the
caller crawl like a turtle if it wished to but it would leave other
processes alone. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>