Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759483AbXLLLVf (ORCPT ); Wed, 12 Dec 2007 06:21:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751948AbXLLLV2 (ORCPT ); Wed, 12 Dec 2007 06:21:28 -0500 Received: from smtp2.linux-foundation.org ([207.189.120.14]:59926 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751264AbXLLLV1 (ORCPT ); Wed, 12 Dec 2007 06:21:27 -0500 Date: Wed, 12 Dec 2007 03:21:24 -0800 From: Andrew Morton To: Jesper Nilsson Cc: Mikael Starvik , linux-kernel@vger.kernel.org Subject: Re: [PATCH 29/47] Update CRISv32 traps.c Message-Id: <20071212032124.e8ce63ee.akpm@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 880 Lines: 28 On Fri, 30 Nov 2007 16:22:50 +0100 Jesper Nilsson 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 = ""; > + > + 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/