Commit 340241a9 authored by Keith Owens's avatar Keith Owens Committed by Sam Ravnborg

kallsyms: Clean up x86-64 special casing of in_gate_area()

x86-64 has special case code for in_gate_area(), but it is not clean.

* Replace CONFIG_ARCH_GATE_AREA with __HAVE_ARCH_GATE_AREA.
  ARCH_GATE_AREA is not a config option.

* The definitions of get_gate_vma() and in_gate_area() are identical in
  include/asm-x86_64/page.h and include/linux/mm.h.  Fold the duplicate
  definitions into include/linux/mm.h.

Does not affect kallsyms directly, this patch just creates a clean base
for patch 2.
Signed-off-by: default avatarKeith Owens <kaos@ocs.com.au>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 94d5d40e
......@@ -134,13 +134,7 @@ extern __inline__ int get_order(unsigned long size)
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define CONFIG_ARCH_GATE_AREA 1
#ifndef __ASSEMBLY__
struct task_struct;
struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
int in_gate_area(struct task_struct *task, unsigned long addr);
#endif
#define __HAVE_ARCH_GATE_AREA 1
#endif /* __KERNEL__ */
......
......@@ -799,10 +799,8 @@ kernel_map_pages(struct page *page, int numpages, int enable)
}
#endif
#ifndef CONFIG_ARCH_GATE_AREA
extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
int in_gate_area(struct task_struct *task, unsigned long addr);
#endif
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
......@@ -1811,7 +1811,7 @@ unsigned long vmalloc_to_pfn(void * vmalloc_addr)
EXPORT_SYMBOL(vmalloc_to_pfn);
#if !defined(CONFIG_ARCH_GATE_AREA)
#if !defined(__HAVE_ARCH_GATE_AREA)
#if defined(AT_SYSINFO_EHDR)
struct vm_area_struct gate_vma;
......@@ -1846,4 +1846,4 @@ int in_gate_area(struct task_struct *task, unsigned long addr)
return 0;
}
#endif
#endif /* __HAVE_ARCH_GATE_AREA */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment