LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
linux-security-module@vger.kernel.org
Cc: sds@tycho.nsa.gov, jmorris@nameil.org, serue@us.ibm.com,
morgan@kernel.org, casey@schaufler-ca.com, esandeen@redhat.com
Subject: [PATCH -v3 2/4] vm: use new has_capability_noaudit
Date: Fri, 07 Nov 2008 10:23:32 -0500 [thread overview]
Message-ID: <20081107152332.10328.12878.stgit@paris.rdu.redhat.com> (raw)
In-Reply-To: <20081107152326.10328.44330.stgit@paris.rdu.redhat.com>
The oomkiller calculations make decisions based on capabilities. Since
these are not security decisions and LSMs should not record if they fall
the request they should use the new has_capability_noaudit() interface so
the denials will not be recorded.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
mm/oom_kill.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index a0a0190..df259c2 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -128,8 +128,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
* Superuser processes are usually more important, so we make it
* less likely that we kill those.
*/
- if (has_capability(p, CAP_SYS_ADMIN) ||
- has_capability(p, CAP_SYS_RESOURCE))
+ if (has_capability_noaudit(p, CAP_SYS_ADMIN) ||
+ has_capability_noaudit(p, CAP_SYS_RESOURCE))
points /= 4;
/*
@@ -138,7 +138,7 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
* tend to only have this flag set on applications they think
* of as important.
*/
- if (has_capability(p, CAP_SYS_RAWIO))
+ if (has_capability_noaudit(p, CAP_SYS_RAWIO))
points /= 4;
/*
next prev parent reply other threads:[~2008-11-07 15:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 15:23 [PATCH -v3 1/4] SECURITY: new capable_noaudit interface Eric Paris
2008-11-07 15:23 ` Eric Paris [this message]
2008-11-07 15:39 ` [PATCH -v3 2/4] vm: use new has_capability_noaudit Stephen Smalley
2008-11-07 15:23 ` [PATCH -v3 3/4] filesystems: use has_capability_noaudit interface for reserved blocks checks Eric Paris
2008-11-07 15:23 ` [PATCH -v3 4/4] SELinux: use new cap_noaudit interface Eric Paris
2008-11-07 15:38 ` Stephen Smalley
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=20081107152332.10328.12878.stgit@paris.rdu.redhat.com \
--to=eparis@redhat.com \
--cc=casey@schaufler-ca.com \
--cc=esandeen@redhat.com \
--cc=jmorris@nameil.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=serue@us.ibm.com \
--subject='Re: [PATCH -v3 2/4] vm: use new has_capability_noaudit' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).