-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 143275 b: refs/heads/master c: 3e862dd h: refs/heads/master i: 143273: e672524 143271: 0dd9d7c v: v3
- Loading branch information
Linus Torvalds
committed
Apr 14, 2009
1 parent
3e08dc7
commit 4a84c18
Showing
122 changed files
with
2,691 additions
and
1,680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: e588a00fe546695e93077b3f7b7009f0c31d9370 | ||
refs/heads/master: 3e862dd5c94cc53ba6494804c7388303e3d25403 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- What is TOMOYO? --- | ||
|
||
TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel. | ||
|
||
LiveCD-based tutorials are available at | ||
http://tomoyo.sourceforge.jp/en/1.6.x/1st-step/ubuntu8.04-live/ | ||
http://tomoyo.sourceforge.jp/en/1.6.x/1st-step/centos5-live/ . | ||
Though these tutorials use non-LSM version of TOMOYO, they are useful for you | ||
to know what TOMOYO is. | ||
|
||
--- How to enable TOMOYO? --- | ||
|
||
Build the kernel with CONFIG_SECURITY_TOMOYO=y and pass "security=tomoyo" on | ||
kernel's command line. | ||
|
||
Please see http://tomoyo.sourceforge.jp/en/2.2.x/ for details. | ||
|
||
--- Where is documentation? --- | ||
|
||
User <-> Kernel interface documentation is available at | ||
http://tomoyo.sourceforge.jp/en/2.2.x/policy-reference.html . | ||
|
||
Materials we prepared for seminars and symposiums are available at | ||
http://sourceforge.jp/projects/tomoyo/docs/?category_id=532&language_id=1 . | ||
Below lists are chosen from three aspects. | ||
|
||
What is TOMOYO? | ||
TOMOYO Linux Overview | ||
http://sourceforge.jp/projects/tomoyo/docs/lca2009-takeda.pdf | ||
TOMOYO Linux: pragmatic and manageable security for Linux | ||
http://sourceforge.jp/projects/tomoyo/docs/freedomhectaipei-tomoyo.pdf | ||
TOMOYO Linux: A Practical Method to Understand and Protect Your Own Linux Box | ||
http://sourceforge.jp/projects/tomoyo/docs/PacSec2007-en-no-demo.pdf | ||
|
||
What can TOMOYO do? | ||
Deep inside TOMOYO Linux | ||
http://sourceforge.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf | ||
The role of "pathname based access control" in security. | ||
http://sourceforge.jp/projects/tomoyo/docs/lfj2008-bof.pdf | ||
|
||
History of TOMOYO? | ||
Realities of Mainlining | ||
http://sourceforge.jp/projects/tomoyo/docs/lfj2008.pdf | ||
|
||
--- What is future plan? --- | ||
|
||
We believe that inode based security and name based security are complementary | ||
and both should be used together. But unfortunately, so far, we cannot enable | ||
multiple LSM modules at the same time. We feel sorry that you have to give up | ||
SELinux/SMACK/AppArmor etc. when you want to use TOMOYO. | ||
|
||
We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM | ||
version of TOMOYO, available at http://tomoyo.sourceforge.jp/en/1.6.x/ . | ||
LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning | ||
to port non-LSM version's functionalities to LSM versions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
List: linux-kernel | ||
Subject: Re: active_mm | ||
From: Linus Torvalds <torvalds () transmeta ! com> | ||
Date: 1999-07-30 21:36:24 | ||
|
||
Cc'd to linux-kernel, because I don't write explanations all that often, | ||
and when I do I feel better about more people reading them. | ||
|
||
On Fri, 30 Jul 1999, David Mosberger wrote: | ||
> | ||
> Is there a brief description someplace on how "mm" vs. "active_mm" in | ||
> the task_struct are supposed to be used? (My apologies if this was | ||
> discussed on the mailing lists---I just returned from vacation and | ||
> wasn't able to follow linux-kernel for a while). | ||
|
||
Basically, the new setup is: | ||
|
||
- we have "real address spaces" and "anonymous address spaces". The | ||
difference is that an anonymous address space doesn't care about the | ||
user-level page tables at all, so when we do a context switch into an | ||
anonymous address space we just leave the previous address space | ||
active. | ||
|
||
The obvious use for a "anonymous address space" is any thread that | ||
doesn't need any user mappings - all kernel threads basically fall into | ||
this category, but even "real" threads can temporarily say that for | ||
some amount of time they are not going to be interested in user space, | ||
and that the scheduler might as well try to avoid wasting time on | ||
switching the VM state around. Currently only the old-style bdflush | ||
sync does that. | ||
|
||
- "tsk->mm" points to the "real address space". For an anonymous process, | ||
tsk->mm will be NULL, for the logical reason that an anonymous process | ||
really doesn't _have_ a real address space at all. | ||
|
||
- however, we obviously need to keep track of which address space we | ||
"stole" for such an anonymous user. For that, we have "tsk->active_mm", | ||
which shows what the currently active address space is. | ||
|
||
The rule is that for a process with a real address space (ie tsk->mm is | ||
non-NULL) the active_mm obviously always has to be the same as the real | ||
one. | ||
|
||
For a anonymous process, tsk->mm == NULL, and tsk->active_mm is the | ||
"borrowed" mm while the anonymous process is running. When the | ||
anonymous process gets scheduled away, the borrowed address space is | ||
returned and cleared. | ||
|
||
To support all that, the "struct mm_struct" now has two counters: a | ||
"mm_users" counter that is how many "real address space users" there are, | ||
and a "mm_count" counter that is the number of "lazy" users (ie anonymous | ||
users) plus one if there are any real users. | ||
|
||
Usually there is at least one real user, but it could be that the real | ||
user exited on another CPU while a lazy user was still active, so you do | ||
actually get cases where you have a address space that is _only_ used by | ||
lazy users. That is often a short-lived state, because once that thread | ||
gets scheduled away in favour of a real thread, the "zombie" mm gets | ||
released because "mm_users" becomes zero. | ||
|
||
Also, a new rule is that _nobody_ ever has "init_mm" as a real MM any | ||
more. "init_mm" should be considered just a "lazy context when no other | ||
context is available", and in fact it is mainly used just at bootup when | ||
no real VM has yet been created. So code that used to check | ||
|
||
if (current->mm == &init_mm) | ||
|
||
should generally just do | ||
|
||
if (!current->mm) | ||
|
||
instead (which makes more sense anyway - the test is basically one of "do | ||
we have a user context", and is generally done by the page fault handler | ||
and things like that). | ||
|
||
Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago, | ||
because it slightly changes the interfaces to accomodate the alpha (who | ||
would have thought it, but the alpha actually ends up having one of the | ||
ugliest context switch codes - unlike the other architectures where the MM | ||
and register state is separate, the alpha PALcode joins the two, and you | ||
need to switch both together). | ||
|
||
(From http://marc.info/?l=linux-kernel&m=93337278602211&w=2) |
Oops, something went wrong.