lkml.org 
[lkml]   [2007]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Fork Bombing Patch
    Hi
    I think Its not worth to make it configurable just for one printk
    statement. am i missing something?

    anand

    On 8/16/07, Krzysztof Halasa <khc@pm.waw.pl> wrote:
    > "Anand Jahagirdar" <anandjigar@gmail.com> writes:
    >
    > > +++ linux-2.6.17/kernel/fork.c
    > > + /*
    > > + * following code does not allow Non Root User to cross its process
    > > + * limit and it alerts administrator about user Nearing the process limit.
    > > + */
    > > +
    > > if (atomic_read(&p->user->processes) >= p->signal->rlim[RLIMIT_NPROC].rlim_cur)
    > > if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
    > > - p->user != &root_user)
    > > + p->user != &root_user) {
    > > + if (printk_ratelimit())
    > > + printk(KERN_WARNING "User with uid %u is Nearing the process limit\n",p->user->uid);
    > > +
    > > goto bad_fork_free;
    >
    > At least make that configurable - on some systems users are allowed
    > 50 processes or so and I'm sure admins don't really want to know
    > which particular users are currently close to limits.
    >
    > I don't really find the above useful. Perhaps we should warn when users
    > try to write to R/O files or execute root-only commands etc?
    > --
    > Krzysztof Halasa
    >
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-08-20 16:29    [W:0.020 / U:64.300 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site