Re: [discuss] Re: [PATCH] linux-2.5.43_vsyscall_A0

Andi Kleen
2002-10-20T09:21:28Z

On Sat, Oct 19, 2002 at 11:44:33PM -0700, Elladan wrote:
> The problem with modifying the executable code/pages in the vsyscall
> area is that it's going to be very tricky to implement, if I understand
> this discussion properly.

Modifying the pages or variables in the pages from the kernel is no
problem. It just would affect all processes on the system

What's tricky is to give it per process state (which would
be needed to make a vsyscall/novsyscall flag process local)
>
> There may be any number of user processes idling in these pages on the
> runqueue (or off it if say one received a SIGSTOP), and if you just go
> change the instruction code on them, unless you're incredibly careful
> and come up with some subtly safe machine code sequence, they're going
> crash when you call this sysctl().

Nobody proposed to use self modifying code, it would just be a global
variable located in the vsyscall area that is tested by the vsyscall
code.

-Andi