• Jeff Dike's avatar
    [PATCH] uml: make vsyscall page into process page tables · a0dafc99
    Jeff Dike authored
    From: Bodo Stroesser
    
    To make the vsyscall-page available for copy_from_user() and
    ptrace(), we should use kernel's "gate-vma" mechanism.
    Therefore we need a valid page structure. To have this, one
    page (or more) is allocated at boot time, the contents of the
    vsyscall-page is copied into this page and the page's pte is
    inserted in swapper's pagetables.
    Now it will be copied into the pagetables of all processes.
    
    Note: this alone doesn't work, since FIXADDR_USER_START and
          FIXADDR_USER_END are not yet defined correctly. Also
          access_ok_skas() does not yet grant read accesses to
          pages not in the normal user area.
    
    Risks:
    Please check the first hunk! I don't know, whether this change is OK.
    Maybe fixrange_init() is wrong anyway with 3-level-pagetables?
    
    Here access_ok_skas() and FIXADDR_USER_XXXX are fixed.
    Now everything should work fine, while the processes are
    running. But if a process crashes, the vsyscall-page will
    not be dumped.
    Signed-off-by: default avatarBodo Stroesser <bodo.stroesser@fujitsu-siemens.com>
    Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    a0dafc99
fixmap.h 3.15 KB