Re: [PATCH] linux-2.5.43_vsyscall_A0

Andi Kleen
2002-10-20T02:53:26Z

On Sat, Oct 19, 2002 at 06:16:59AM +0200, Andrea Arcangeli wrote:
> see my last email. And I think he needed it as an additional syscall
> after execve that he could trap and revirtualize with ptrace as usual
> and that would return variable addresses of pointer to functions (that
> would be revirtualized inside the uml kernel of course), not an ELF
> information that should be valid for both UML and host kernel.

Implementing it per process is tricky. How do you access the per process
state in the vsyscall area ? To do it properly you would need one dedicated
page per mm_struct that is mapped in there. But it could not be in the
normal vsyscall area (otherwise you couldn't share the kernel pagetables
anymore), but somewhere else in the address space.

I think a global sysctl that just modifies the global vsyscall pages is more
suitable here. It avoids the overhead of needing a per process page.
I see no real need anyways to do it per process. When you have one process
that cannot deal with vsyscalls the whole system will get a bit slower,
but the slowdown shouldn't be noticeable anyways. If you run your highend
database which does thousands of gettimeofday each second just don't set
the sysctl.

-Andi