lkml.org 
[lkml]   [2007]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 29/47] Update CRISv32 traps.c
    On Fri, 30 Nov 2007 16:22:50 +0100 Jesper Nilsson <jesper.nilsson@axis.com> wrote:

    > +#ifdef CONFIG_DEBUG_BUGVERBOSE
    > +void
    > +handle_BUG(struct pt_regs *regs)
    > {
    > - asm volatile("setf m");
    > + struct bug_frame f;
    > + unsigned char c;
    > + unsigned long irp = regs->irp;
    > +
    > + if (__copy_from_user(&f, (const void __user *)(irp - 8), sizeof f))
    > + return;
    > + if (f.prefix != BUG_PREFIX || f.magic != BUG_MAGIC)
    > + return;
    > + if (__get_user(c, f.filename))
    > + f.filename = "<bad filename>";
    > +
    > + printk("kernel BUG at %s:%d!\n", f.filename, f.line);
    > }
    > +#endif

    Why is it accessing user memory in the BUG handler?


    \
     
     \ /
      Last update: 2007-12-12 12:23    [W:0.019 / U:1.052 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site