[2.6.20.21 review 04/35] i386: allow debuggers to access the vsyscall page with compat vDSO

Willy Tarreau
2007-10-13T14:45:53Z

[-- Attachment #1: 0015-i386-allow-debuggers-to-access-the-vsyscall-page-wi.patch --]
[-- Type: text/plain, Size: 777 bytes --]

From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/i386/kernel/sysenter.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

Index: 2.6/arch/i386/kernel/sysenter.c
===================================================================
--- 2.6.orig/arch/i386/kernel/sysenter.c
+++ 2.6/arch/i386/kernel/sysenter.c
@@ -183,7 +183,9 @@ struct vm_area_struct *get_gate_vma(stru

int in_gate_area(struct task_struct *task, unsigned long addr)
{
- return 0;
+ const struct vm_area_struct *vma = get_gate_vma(task);
+
+ return vma && addr >= vma->vm_start && addr < vma->vm_end;
}

int in_gate_area_no_task(unsigned long addr)

--