mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: "Anand Jahagirdar" <anandjigar@gmail.com>
Cc: linux-kernel@vger.kernel.org, security@kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	akpm@digeo.com, "Daniel Hazelton" <dhazelton@enter.net>,
	"Jens Axboe" <jens.axboe@oracle.com>,
	"Jiri Kosina" <jikos@jikos.cz>
Subject: Re: Patch related with Fork Bobmbing Attack
Date: Tue, 12 Jun 2007 10:04:17 -0700	[thread overview]
Message-ID: <adalkep85pq.fsf@cisco.com> (raw)
In-Reply-To: <25ae38200706120949vaeb8e0ascd182ef2f709d0fc@mail.gmail.com> (Anand Jahagirdar's message of "Tue, 12 Jun 2007 22:19:49 +0530")

 > +	/*
 > +         * following code does not allow Non Root User to cross its process
 > +         * limit. it alerts administrator about fork bombing attack and prevents
 > +         * it.
 > +         */
 >  	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_CRIT"User with uid %d is crossing its process limit\n",p->user->uid);
 >  			goto bad_fork_free;
 > +		}

please run scripts/checkpatch.pl against your patch.  It will point
out numerous problems with the coding style.  Also, I think a space
between KERN_CRIT and " would look better too.

 - R.

  reply	other threads:[~2007-06-12 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12 16:49 Anand Jahagirdar
2007-06-12 17:04 ` Roland Dreier [this message]
2007-06-12 17:32   ` Jan Engelhardt
2007-06-13 11:34     ` Simon Arlott
2007-06-13 14:44       ` Daniel Hazelton
2007-06-13 20:25         ` Krzysztof Halasa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adalkep85pq.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=akpm@digeo.com \
    --cc=akpm@linux-foundation.org \
    --cc=anandjigar@gmail.com \
    --cc=dhazelton@enter.net \
    --cc=jens.axboe@oracle.com \
    --cc=jikos@jikos.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=security@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®