2009-09-14 11:36:00

by Eric Lacombe

[permalink] [raw]
Subject: Eliminating kernel mixed page (code + data)

Hello,

First, is there a kernel option to enforce kernel code and kernel data
separation among pages ?

Otherwise, is it sufficient to enforce page alignment for the start address of
all data segment, to achieve this goal ?
(on top of using CONFIG_RELOCATABLE)

Thanks in advance for your answer,

Eric


2009-09-14 12:34:37

by Siarhei Liakh

[permalink] [raw]
Subject: Re: Eliminating kernel mixed page (code + data)

> First, is there a kernel option to enforce kernel code and kernel data
> separation among pages ?

I do not think so.

> Otherwise, is it sufficient to enforce page alignment for the start address of
> all data segment, to achieve this goal ?
> (on top of using CONFIG_RELOCATABLE)

AFAIK, this would be required but not sufficient. I am currently
working on a set of patches that:
1. eliminate mixed pages in kernel space
2. keep data as non-executable and code as read-only

As a starting point, you can search for my name in the mailing list to
see the patches and the discussion around them.