Re: using segmentation in the kernel

From: Arjan van de Ven
Date: Wed Oct 12 2005 - 04:06:25 EST

On Tue, 2005-10-11 at 22:24 +0200, Alon Bar-Lev wrote:
> Brian Gerst wrote:
> > Jonathan M. McCune wrote:
> >
> >> Hello,
> >>
> > Why send the kernel back to the 2.0 days? There is no valid reason for
> > doing this with they way x86 segmentation works, which is why it was
> > done away with in 2.1.
> >
> But with segmentation you can set code to be read-only,

you can do that without segmentation too, absolutely no problem

> disallow execution from stack,

That is why CPUs have NX nowadays. And it's not like the kernel is full
of buffer overflows; due to the 4Kb stack space (total), there are very
very few static buffers on the stack at all; simply because theres no
space to do it.

> separate modules so that they
> will not affect kernel and more...

and I don't believe this one yota. THe only way to do this is to run
modules in ring 1, at which point you are in deep shit anyway.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at