lkml.org 
[lkml]   [2000]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] New ideas for the OOM handler
On Mon, 9 Oct 2000, Matthew Dharm wrote:

> On Mon, Oct 09, 2000 at 09:25:38PM -0400, Byron Stanoszek wrote:
> > echo "init" > /proc/sys/oom-ignore
> > echo "httpd" >> /proc/sys/oom-ignore
> > echo "parallel-fft" >> /proc/sys/oom-ignore
> > etc...
>
> I'd be concerned with the security implications of this feature... after
> all, I can edit argv[0] to change the name of my program -- a malicious
> application could do this to attempt to "hide" from the OOM Killer.

You have a point. How about specifying the complete path in the /proc file,
so that a special bit is set on the process when it is executed.

echo "/sbin/init" > /proc/sys/oom-ignore

User does an execvp("init", ...)

At this time, the user's path is searched for a match for "init".
The kernel determines "/sbin/init" is the correct path name and begins
to execute the program. It creates the process structure.

Then, before starting program execution, it compares the full path with the
list of entries in the /proc file. Seeing a match, it sets a bit (or a
variable kill-rate) on the process structure. OOM reads this process structure
in at kill-time and instantly determines which it should kill quickly or stay
away from. If none apply, default to standard algorithm.

-Byron

--
Byron Stanoszek Ph: (330) 644-3059
Systems Programmer Fax: (330) 644-8110
Commercial Timesharing Inc. Email: bstanoszek@comtime.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.092 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site