Re: [PATCH 29/47] Update CRISv32 traps.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux