diff options
author | Ernie Petrides <petrides@redhat.com> | 2006-12-06 20:14:09 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-06 20:14:09 -0500 |
commit | 103efcd9aac1de4da6a1477f2f3b9fcf35273a18 (patch) | |
tree | ac8e8a1f379a35cfaa96992fb3f8c69e1c88195e /arch/x86_64/kernel/vsyscall.c | |
parent | c55d92d141b9c40c67db249de91f5c224eb49859 (diff) |
[PATCH] x86-64: fix perms/range of vsyscall vma in /proc/*/maps
The final line of /proc/<pid>/maps on x86_64 for native 64-bit
tasks shows an incorrect ending address and incorrect permissions. There
is only a single page mapped in this vsyscall region, and it is accessible
for both read and execute.
The patch below fixes this. (Since 32-bit-compat tasks have a real vma
with correct perms/range, no change is necessary for that scenario.)
Before the patch, a "cat /proc/self/maps | tail -1" shows this:
ffffffffff600000-ffffffffffe00000 ---p 00000000 [...]
After the patch, this is the output:
ffffffffff600000-ffffffffff601000 r-xp 00000000 [...]
Signed-off-by: Ernie Petrides <petrides@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/vsyscall.c')
-rw-r--r-- | arch/x86_64/kernel/vsyscall.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 92546c1526f1..c3de9a09cd9f 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -290,6 +290,7 @@ static void __init map_vsyscall(void) | |||
290 | extern char __vsyscall_0; | 290 | extern char __vsyscall_0; |
291 | unsigned long physaddr_page0 = __pa_symbol(&__vsyscall_0); | 291 | unsigned long physaddr_page0 = __pa_symbol(&__vsyscall_0); |
292 | 292 | ||
293 | /* Note that VSYSCALL_MAPPED_PAGES must agree with the code below. */ | ||
293 | __set_fixmap(VSYSCALL_FIRST_PAGE, physaddr_page0, PAGE_KERNEL_VSYSCALL); | 294 | __set_fixmap(VSYSCALL_FIRST_PAGE, physaddr_page0, PAGE_KERNEL_VSYSCALL); |
294 | } | 295 | } |
295 | 296 | ||