linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: linux-kernel@vger.kernel.org
Cc: sam@ravnborg.org
Subject: [patch 1/3] kallsyms: Clean up x86-64 special casing of in_gate_area()
Date: Sun, 28 Nov 2004 14:54:31 +1100	[thread overview]
Message-ID: <19427.1101614071@ocs3.ocs.com.au> (raw)
In-Reply-To: Your message of "Sun, 28 Nov 2004 14:38:47 +1100." <28912.1101613127@ocs3.ocs.com.au>

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: Keith Owens <kaos@ocs.com.au>

Index: 2.6.10-rc2-bk11/include/asm-x86_64/page.h
===================================================================
--- 2.6.10-rc2-bk11.orig/include/asm-x86_64/page.h	2004-11-15 14:26:40.778123375 +1100
+++ 2.6.10-rc2-bk11/include/asm-x86_64/page.h	2004-11-28 14:42:13.850863382 +1100
@@ -134,13 +134,7 @@ extern __inline__ int get_order(unsigned
 	(((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__ */
 
Index: 2.6.10-rc2-bk11/include/linux/mm.h
===================================================================
--- 2.6.10-rc2-bk11.orig/include/linux/mm.h	2004-11-28 14:41:04.390462272 +1100
+++ 2.6.10-rc2-bk11/include/linux/mm.h	2004-11-28 14:42:13.868860636 +1100
@@ -799,10 +799,8 @@ kernel_map_pages(struct page *page, int 
 }
 #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 */
Index: 2.6.10-rc2-bk11/mm/memory.c
===================================================================
--- 2.6.10-rc2-bk11.orig/mm/memory.c	2004-11-28 14:41:04.802399415 +1100
+++ 2.6.10-rc2-bk11/mm/memory.c	2004-11-28 14:42:13.870860331 +1100
@@ -1811,7 +1811,7 @@ unsigned long vmalloc_to_pfn(void * vmal
 
 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 *tas
 	return 0;
 }
 
-#endif
+#endif	/* __HAVE_ARCH_GATE_AREA */


  reply	other threads:[~2004-11-28  3:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-28  3:38 [patch 0/3] kallsyms: Add gate page and all symbols support Keith Owens
2004-11-28  3:54 ` Keith Owens [this message]
2004-11-28  3:55 ` [patch 2/3] kallsyms: Add in_gate_area_no_task() Keith Owens
2004-11-28  3:55 ` [patch 3/3] kallsyms: gate page is part of the kernel, honour CONFIG_KALLSYMS_ALL Keith Owens
2004-12-28 21:17 ` [patch 0/3] kallsyms: Add gate page and all symbols support Sam Ravnborg
2005-01-18  7:52   ` Benjamin Herrenschmidt
2005-01-18 13:07     ` Keith Owens
2005-01-18 22:03       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19427.1101614071@ocs3.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).