From: Nikita Danilov <nikita@clusterfs.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>
Subject: Re: [RFC] [PATCH] merge *_vm_enough_memory()s into a common helper
Date: Wed, 05 Jan 2005 01:59:07 +0300 [thread overview]
Message-ID: <m1u0pwls1w.fsf@clusterfs.com> (raw)
In-Reply-To: <20050104214833.GA3420@IBM-BWN8ZTBWA01.austin.ibm.com> (Serge E. Hallyn's message of "Tue, 4 Jan 2005 15:48:33 -0600")
"Serge E. Hallyn" <serue@us.ibm.com> writes:
> The attached patch introduces a __vm_enough_memory function in
> security/security.c which is used by cap_vm_enough_memory,
> dummy_vm_enough_memory, and selinux_vm_enough_memory. This has
> been discussed on the lsm mailing list.
>
> Are there any objections to or comments on this patch?
>
> thanks,
> -serge
>
> Signed-off-by: Serge Hallyn <serue@us.ibm.com>
>
[...]
> -
> - return -ENOMEM;
> + return __vm_enough_memory(pages,
> + (cap_capable(current, CAP_SYS_ADMIN) == 0));
I don't think that CAP_SYS_ADMIN is proper capability for this:
CAP_SYS_ADMIN is catch-all that should be used only when no other
capability covers action being performed. In this case CAP_SYS_RESOURCE
seems to be a better fit, after all __vm_enough_memory() controls access
to a resource, plus file systems use CAP_SYS_RESOURCE to protect disk
blocks reserved for "root".
> }
[...]
Nikita.
next prev parent reply other threads:[~2005-01-04 23:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-04 21:48 [RFC] [PATCH] merge *_vm_enough_memory()s into a common helper Serge E. Hallyn
2005-01-04 22:10 ` Stephen Smalley
2005-01-04 22:17 ` Chris Wright
2005-01-04 22:17 ` Stephen Smalley
2005-01-04 22:26 ` Chris Wright
2005-01-04 22:59 ` Nikita Danilov [this message]
2005-01-05 0:15 ` Alan Cox
2005-01-05 11:25 ` Christoph Hellwig
2005-01-05 13:17 ` Hugh Dickins
2005-01-05 16:30 ` Serge E. Hallyn
2005-01-05 19:24 ` Chris Wright
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=m1u0pwls1w.fsf@clusterfs.com \
--to=nikita@clusterfs.com \
--cc=Linux-Kernel@Vger.Kernel.ORG \
--cc=serue@us.ibm.com \
/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