mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Daniel Jacobowitz <dan@debian.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.2-rc3 broke ptrace in the vsyscall dso area
Date: Sun, 1 Feb 2004 21:43:42 -0800	[thread overview]
Message-ID: <200402020543.i125hgoa009640@magilla.sf.frob.com> (raw)
In-Reply-To: Daniel Jacobowitz's message of  Sunday, 1 February 2004 22:55:08 -0500 <20040202035508.GA10286@nevyn.them.org>

> Any idea what might have disabled this?

...Mosberger!!  When Andrew asked me to sign off on David's rework of that
code, I did so with the caveat that it be tested on i386 before being
accepted, and evidently it never was.

The #include is the part of this patch that matters, so the #ifdef below
works.  (Frankly, I have never seen the rationale for conditionalizing this
code on AT_SYSINFO_EHDR rather than just FIXADDR_USER_START.  But David
wanted it that way and Andrew approved it.)  The rest of the patch removes
gratuitous duplication due to some strange aversion to concision in the
presence of #ifdef, the kind that is all too common, utterly pointless, and
error prone.


Thanks,
Roland


Index: linux-2.6/include/linux/mm.h
===================================================================
RCS file: /home/roland/redhat/bkcvs/linux-2.5/include/linux/mm.h,v
retrieving revision 1.137
diff -p -u -r1.137 mm.h
--- linux-2.6/include/linux/mm.h 20 Jan 2004 05:12:38 -0000 1.137
+++ linux-2.6/include/linux/mm.h 2 Feb 2004 05:20:11 -0000
@@ -12,6 +12,7 @@
 #include <linux/mmzone.h>
 #include <linux/rbtree.h>
 #include <linux/fs.h>
+#include <linux/elf.h>
 
 #ifndef CONFIG_DISCONTIGMEM          /* Don't use mapnrs, do it properly */
 extern unsigned long max_mapnr;
@@ -643,31 +644,24 @@ kernel_map_pages(struct page *page, int 
 #endif
 
 #ifndef CONFIG_ARCH_GATE_AREA
-#ifdef AT_SYSINFO_EHDR
 static inline int in_gate_area(struct task_struct *task, unsigned long addr)
 {
+#ifdef AT_SYSINFO_EHDR
 	if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END))
 		return 1;
-	else
-		return 0;
+#endif
+	return 0;
 }
 
 extern struct vm_area_struct gate_vma;
 static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
 {
+#ifdef AT_SYSINFO_EHDR
 	return &gate_vma;
-}
 #else
-static inline int in_gate_area(struct task_struct *task, unsigned long addr)
-{
 	return 0;
-}
-
-static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
-{
-	return NULL;
-}
 #endif
+}
 #endif
 
 #endif /* __KERNEL__ */

  reply	other threads:[~2004-02-02  5:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02  3:55 Daniel Jacobowitz
2004-02-02  5:43 ` Roland McGrath [this message]
2004-02-02 15:39   ` Daniel Jacobowitz

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=200402020543.i125hgoa009640@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=dan@debian.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®