diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-07-26 13:41:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 14:35:16 -0400 |
commit | f938d2c892db0d80d144253d4a7b7083efdbedeb (patch) | |
tree | 1fbc946a9fb59827001a5d4d5224abe5e624e605 /drivers/lguest/segments.c | |
parent | dfb68689bf3e3d31dc9fb5c2bde5379a4ca9b0ec (diff) |
lguest: documentation I: Preparation
The netfilter code had very good documentation: the Netfilter Hacking HOWTO.
Noone ever read it.
So this time I'm trying something different, using a bit of Knuthiness.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/lguest/segments.c')
-rw-r--r-- | drivers/lguest/segments.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/lguest/segments.c b/drivers/lguest/segments.c index 1b2cfe89dcd5..c4fc7293b84b 100644 --- a/drivers/lguest/segments.c +++ b/drivers/lguest/segments.c | |||
@@ -1,3 +1,14 @@ | |||
1 | /*P:600 The x86 architecture has segments, which involve a table of descriptors | ||
2 | * which can be used to do funky things with virtual address interpretation. | ||
3 | * We originally used to use segments so the Guest couldn't alter the | ||
4 | * Guest<->Host Switcher, and then we had to trim Guest segments, and restore | ||
5 | * for userspace per-thread segments, but trim again for on userspace->kernel | ||
6 | * transitions... This nightmarish creation was contained within this file, | ||
7 | * where we knew not to tread without heavy armament and a change of underwear. | ||
8 | * | ||
9 | * In these modern times, the segment handling code consists of simple sanity | ||
10 | * checks, and the worst you'll experience reading this code is butterfly-rash | ||
11 | * from frolicking through its parklike serenity. :*/ | ||
1 | #include "lg.h" | 12 | #include "lg.h" |
2 | 13 | ||
3 | static int desc_ok(const struct desc_struct *gdt) | 14 | static int desc_ok(const struct desc_struct *gdt) |