Re: [PATCH] Read only syscall tables for x86_64 and i386

From: Andi Kleen
Date: Tue Jun 28 2005 - 14:45:25 EST


Christoph Lameter <christoph@xxxxxxxxxxx> writes:

> Place x86_64 and i386 syscall table into the read only section.
>
> Remove the syscall tables from the data section and place them into the
> readonly section (like IA64).

It's unfortunately useless because all the kernel is mapped in the
same 2 or 4MB page has to be writable because it overlaps with real
direct mapped memory.

On x86-64 there is a separate kernel mapping which could be made
read only. But that would be useless again because the memory
is aliased in the real direct mapping which has the same
overlapping problem.

The only way to write protect the kernel would be to pad
it to 2MB (or 4MB on i386/non PAE) which would be a big waste
of memory or use significantly more TLB entries in normal
operation.

Both is probably not worth the modest safety increase you
get from such a change.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/