[lkml]   [2004]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: 2.6.2-rc3 broke ptrace in the vsyscall dso area
    > 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.


    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

    -#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;
    + 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;
    -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 /* __KERNEL__ */
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2005-03-22 14:00    [W:0.022 / U:8.428 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site