On Fri, 30 Nov 2007 16:22:50 +0100 Jesper Nilsson <[EMAIL PROTECTED]> 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to