From: Rik van Riel <riel@redhat.com>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 1/3] MAP_NOZERO - implement a new VM_NOZERO/MAP_NOZERO page retirement policy
Date: Tue, 26 Jun 2007 23:03:26 -0400 [thread overview]
Message-ID: <4681D37E.2020706@redhat.com> (raw)
In-Reply-To: <send-serie.davidel@xmailserver.org.29496.1182912259.1>
Davide Libenzi wrote:
> This is the core implementation of the new VM_NOZERO page retirement
> policy (and the associated MAP_NOZERO).
> A new field owner_uid is added the the mm_struct, and it is kept set to
> the effective UID of the task that own the mm_struct.
> A new field owner_uid is also added to the page struct.
You will also need to take the task's SELinux security
context into account.
SUID programs should not be able to use this feature,
either.
> When pages exit (unmapped from) a vma, they are marked with the effective
> UID of the mm_struct that owns it.
> --- linux-2.6.mod.orig/include/linux/mm_types.h 2007-06-21 14:02:06.000000000 -0700
> +++ linux-2.6.mod/include/linux/mm_types.h 2007-06-25 19:11:22.000000000 -0700
> @@ -64,6 +64,7 @@
> struct list_head lru; /* Pageout list, eg. active_list
> * protected by zone->lru_lock !
> */
> + int owner_uid; /* Last owner of the page */
> /*
> * On machines where all RAM is mapped into kernel address space,
> * we can simply calculate the virtual address. On machines with
Since this is only set when the page is freed, could
the owner_uid and security context be put inside a
union with some fields that are not otherwise used
for free pages?
--
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is. Each group
calls the other unpatriotic.
next prev parent reply other threads:[~2007-06-27 3:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 2:44 [patch 1/3] MAP_NOZERO - implement a new VM_NOZERO/MAP_NOZERO page retirement policy Davide Libenzi
2007-06-27 3:03 ` Rik van Riel [this message]
2007-06-27 3:28 ` Davide Libenzi
2007-06-27 4:18 ` Rik van Riel
2007-06-27 4:32 ` Davide Libenzi
2007-06-28 6:19 ` Andy Isaacson
2007-06-28 14:27 ` Rik van Riel
2007-06-28 18:24 ` Davide Libenzi
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=4681D37E.2020706@redhat.com \
--to=riel@redhat.com \
--cc=davidel@xmailserver.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