From: Nikita Danilov <nikita@clusterfs.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Andries.Brouwer@cwi.nl
Subject: Re: [PATCH] mm: overcommit updates
Date: Tue, 04 Jan 2005 15:36:11 +0300 [thread overview]
Message-ID: <m14qhxmkw4.fsf@clusterfs.com> (raw)
In-Reply-To: <200501040611.j046BHoq005158@hera.kernel.org> (Linux Kernel Mailing List's message of "Tue, 04 Jan 2005 04:15:37 +0000")
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> writes:
> ChangeSet 1.2136.3.17, 2005/01/03 20:15:37-08:00, Andries.Brouwer@cwi.nl
>
[...]
>
> + /* Leave the last 3% for root */
> + if (current->euid)
> + allowed -= allowed / 32;
This results in
/*
* Leave the last 3% for root
*/
if (!capable(CAP_SYS_ADMIN))
allowed -= allowed / 32;
allowed += total_swap_pages;
/* Leave the last 3% for root */
if (current->euid)
allowed -= allowed / 32;
in security/commoncaps.c (and similarly in security/dummy.c). Why
"super-user" reservation is handled twice, and with that antiquated
current->euid check instead of capabilities? Broken merge?
On another account, shouldn't capable(CAP_SYS_ADMIN) checks in
cap_vm_enough_memory() be replaced with capable(CAP_SYS_RESOURCE):
(CAP_SYS_RESOURCE is used by file systems to control reserved disk
blocks)?
Nikita.
next parent reply other threads:[~2005-01-04 12:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200501040611.j046BHoq005158@hera.kernel.org>
2005-01-04 12:36 ` Nikita Danilov [this message]
2005-01-04 17:26 ` [PATCH] remove duplicated patch fragment Andries Brouwer
2005-01-04 22:21 ` Chris Wright
2005-01-04 22:35 ` Chris Wright
2005-01-04 22:03 ` [PATCH] mm: overcommit updates Alan Cox
2005-01-04 23:38 ` Andries Brouwer
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=m14qhxmkw4.fsf@clusterfs.com \
--to=nikita@clusterfs.com \
--cc=Andries.Brouwer@cwi.nl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).