From sdake@mvista.com Mon Feb 27 12:48:26 2006 Received: with ECARTIS (v1.0.0; list kdb); Mon, 27 Feb 2006 12:48:32 -0800 (PST) Received: from zipcode.az.mvista.com ([65.200.49.156]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id k1RKmQm4009737 for ; Mon, 27 Feb 2006 12:48:26 -0800 Received: from [10.50.1.70] ([10.50.1.70]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id MAA01301 for ; Mon, 27 Feb 2006 12:53:12 -0700 Subject: KDB isn't entered from panic on x86_64 as it should be From: Steven Dake Reply-To: sdake@mvista.com To: kdb@oss.sgi.com Content-type: text/plain Organization: MontaVista Software, Inc. Date: Mon, 27 Feb 2006 12:45:13 -0700 Message-Id: <1141069513.8066.8.camel@unnamed.az.mvista.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 8bit X-archive-position: 1159 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: kdb Jack something that should probably go in your port... The I/O apic code remaps the interrupt gate for entering KDB after trap_init. This patch fixes the problem. Regards -steve MR: 17231 Type: Defect Fix Disposition: submitted to kdb maintainers Signed-off-by: Steven Dake Description: The io apic code would register an interrupt gate (IRQ handler) after KDB had set its interrupt handler. This registration wipes out the KDB registration. This results in KDB_ENTER no longer working which is called by the panic notifier. The solution is to ensure the KDBENTER_VECTOR is not assigned during IO APIC IRQ assignment. Index: linux-2.6.10/arch/x86_64/kernel/io_apic.c =================================================================== --- linux-2.6.10.orig/arch/x86_64/kernel/io_apic.c +++ linux-2.6.10/arch/x86_64/kernel/io_apic.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -667,6 +668,11 @@ next: if (current_vector == IA32_SYSCALL_VECTOR) goto next; +#ifdef CONFIG_KDB + if (current_vector == KDBENTER_VECTOR) + goto next; +#endif + if (current_vector >= FIRST_SYSTEM_VECTOR) { offset++; if (!(offset%8)) --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sdake@mvista.com Mon Feb 27 12:48:26 2006 Received: with ECARTIS (v1.0.0; list kdb); Mon, 27 Feb 2006 12:48:31 -0800 (PST) Received: from zipcode.az.mvista.com ([65.200.49.156]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id k1RKmQm2009737 for ; Mon, 27 Feb 2006 12:48:26 -0800 Received: from [10.50.1.70] ([10.50.1.70]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id NAA01328 for ; Mon, 27 Feb 2006 13:37:38 -0700 Subject: enhancement to filp macro From: Steven Dake Reply-To: sdake@mvista.com To: kdb@oss.sgi.com Content-type: text/plain Organization: MontaVista Software, Inc. Date: Mon, 27 Feb 2006 13:29:39 -0700 Message-Id: <1141072179.10101.3.camel@unnamed.az.mvista.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 8bit X-archive-position: 1158 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: kdb Here is an enhancement Montavista used to debug a race condition in the kernel. Someone may find it useful here. MR: 17281 Type: Enhancement Disposition: submitted to kdb@oss.sgi.com Signed-off-by: Steven Dake Signed-off-by: Mark Bellon Description: If f_dentry is null, this KDB module will not print out any information. This patch changes that behavior to print out as much data as possible in the filp structure. diff -a -u -r1.1.4.1.50.2 kdbm_vm.c --- kdb/modules/kdbm_vm.c 4 Feb 2005 01:18:12 -0000 1.1.4.1.50.2 +++ kdb/modules/kdbm_vm.c 27 Feb 2006 17:18:58 -0000 @@ -341,18 +341,8 @@ nextarg = 1; if ((diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL, regs)) || - (diag = kdb_getarea(f, addr)) || - (diag = kdb_getarea(d, (unsigned long)f.f_dentry))) + (diag = kdb_getarea(f, addr))) goto out; - if (!(i = kmalloc(sizeof(*i), GFP_ATOMIC))) { - kdb_printf("kdbm_fp: cannot kmalloc inode\n"); - goto out; - } - if ((diag = kdb_getarea(*i, (unsigned long)d.d_inode))) - goto out; - - kdb_printf("name.name 0x%p name.len %d\n", - d.d_name.name, d.d_name.len); kdb_printf("File Pointer at 0x%lx\n", addr); @@ -363,21 +353,27 @@ f.f_dentry, f.f_op); kdb_printf(" f_count = %d f_flags = 0x%x f_mode = 0x%x\n", - f.f_count.counter, f.f_flags, f.f_mode); + atomic_read(&f.f_count), f.f_flags, f.f_mode); kdb_printf(" f_pos = %Ld f_reada = %ld f_ramax = %ld\n", f.f_pos, f.f_reada, f.f_ramax); - kdb_printf(" f_raend = %ld f_ralen = %ld f_rawin = %ld\n\n", + kdb_printf(" f_raend = %ld f_ralen = %ld f_rawin = %ld\n", f.f_raend, f.f_ralen, f.f_rawin); + kdb_printf(" f_vfsmnt = 0x%p\n\n", + f.f_vfsmnt); + + if (!f.f_dentry || (diag = kdb_getarea(d, (unsigned long)f.f_dentry))) + goto out; kdb_printf("\nDirectory Entry at 0x%p\n", f.f_dentry); + kdb_printf(" d_name.len = %d d_name.name = 0x%p>\n", d.d_name.len, d.d_name.name); kdb_printf(" d_count = %d d_flags = 0x%x d_inode = 0x%p\n", - atomic_read(&d.d_count), d.d_flags, d.d_inode); + atomic_read(&d.d_count), d.d_flags, d.d_inode); kdb_printf(" d_hash.nxt = 0x%p d_hash.prv = 0x%p\n", d.d_hash.next, d.d_hash.prev); @@ -397,6 +393,13 @@ kdb_printf(" d_op = 0x%p d_sb = 0x%p\n\n", d.d_op, d.d_sb); + if (!(i = kmalloc(sizeof(*i), GFP_ATOMIC))) { + kdb_printf("kdbm_fp: cannot kmalloc inode\n"); + goto out; + } + + if (!d.d_inode || (diag = kdb_getarea(*i, (unsigned long)d.d_inode))) + goto out; kdb_printf("\nInode Entry at 0x%p\n", d.d_inode); @@ -412,7 +415,7 @@ kdb_printf(" i_list.nxt = 0x%p i_list.prv = 0x%p\n", i->i_list.next, i->i_list.prev); - kdb_printf(" i_dentry.nxt = 0x%p i_dentry.prv = 0x%p\n", + kdb_printf(" i_dentry.nxt = 0x%p i_dentry.prv = 0x%p\n\n", i->i_dentry.next, i->i_dentry.prev); out: --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jfv@bluesong.net Mon Feb 27 19:12:36 2006 Received: with ECARTIS (v1.0.0; list kdb); Mon, 27 Feb 2006 19:12:42 -0800 (PST) Received: from trane.bluesong.net (bdsl.66.13.29.10.gte.net [66.13.29.10]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id k1S3CZm2015573 for ; Mon, 27 Feb 2006 19:12:36 -0800 Received: by trane.bluesong.net (Postfix, from userid 500) id 09A592311B5; Mon, 27 Feb 2006 18:12:19 -0800 (PST) Date: Mon, 27 Feb 2006 18:12:18 -0800 From: Jack Vogel To: Steven Dake Cc: kdb@oss.sgi.com Subject: Re: KDB isn't entered from panic on x86_64 as it should be Message-ID: <20060228021218.GA16627@trane.bluesong.net> Reply-To: jfv@bluesong.net References: <1141069513.8066.8.camel@unnamed.az.mvista.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1141069513.8066.8.camel@unnamed.az.mvista.com> User-Agent: Mutt/1.5.9i Content-Transfer-Encoding: 8bit X-archive-position: 1160 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jfv@bluesong.net Precedence: bulk X-list: kdb OK, I have a couple items that need changing. Will get a new patch together as soon as I am able. Cheers, Jack --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.