All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.2-rc3 broke ptrace in the vsyscall dso area
@ 2004-02-02  3:55 Daniel Jacobowitz
  2004-02-02  5:43 ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-02-02  3:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: roland

My last kernel was unfortunately 2.6.0-test7, so I can't say exactly when
this broke.  But suddenly I get:

ptrace(PTRACE_PEEKTEXT, 10259, 0xffffe000, [0xbfffe948]) = -1 EIO (Input/output error)
ptrace(PTRACE_PEEKTEXT, 10259, 0xffffe000, [0xbfffe948]) = -1 EIO (Input/output error)

Any idea what might have disabled this?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.2-rc3 broke ptrace in the vsyscall dso area
  2004-02-02  3:55 2.6.2-rc3 broke ptrace in the vsyscall dso area Daniel Jacobowitz
@ 2004-02-02  5:43 ` Roland McGrath
  2004-02-02 15:39   ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2004-02-02  5:43 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: linux-kernel

> 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__ */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.2-rc3 broke ptrace in the vsyscall dso area
  2004-02-02  5:43 ` Roland McGrath
@ 2004-02-02 15:39   ` Daniel Jacobowitz
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-02-02 15:39 UTC (permalink / raw)
  To: Roland McGrath; +Cc: linux-kernel

On Sun, Feb 01, 2004 at 09:43:42PM -0800, Roland McGrath wrote:
> > 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, adding <linux/elf.h> makes GDB much happier.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-02 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-02  3:55 2.6.2-rc3 broke ptrace in the vsyscall dso area Daniel Jacobowitz
2004-02-02  5:43 ` Roland McGrath
2004-02-02 15:39   ` Daniel Jacobowitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.