OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Steve Shorter (stevenomad.lets.net)
Date: Thu Sep 06 2001 - 19:25:20 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On Thu, Sep 06, 2001 at 05:07:31PM -0500, D J Hawkey Jr wrote:

    > Is "the largest process" selective, to some degree or another? That is,
    > will it (can it?) discern a "more valuable" process from a "lesser one"?
    >
    > Can it be told to kill off the last process started, as opposed to the
    > largest? I myself would find this preferable in many cases.

            Actually, I was running a process that was killed because
    it was largest, but this process happened to be essential to the
    system function. It is easy to modify the kernel source to be more
    selective. I choose to kill only processes with uid > somenumber,
    since in the context of my particular system, I trust those processes
    not to hose it and/or have set appropriate resource limits.

    Check out the source in sys/vm/vm_pageout.c around

                            if ((p->p_flag & P_SYSTEM) || (p->p_lock > 0) ||
                                (p->p_pid == 1) ||
                                ((p->p_pid < 48) && (vm_swap_size != 0))) {
                                    continue;
                            }

            You need to search for the definitions of struct proc (which p points
    to) in /usr/include/sys/proc.h.

            Enjoy your kernel hacking!

            -steve

    To Unsubscribe: send mail to majordomoFreeBSD.org
    with "unsubscribe freebsd-security" in the body of the message