From kaos@sgi.com Sat Oct 1 01:51:43 2005 Received: with ECARTIS (v1.0.0; list kdb); Sat, 01 Oct 2005 01:51:47 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j918pfO0013660 for ; Sat, 1 Oct 2005 01:51:42 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id SAA03128 for ; Sat, 1 Oct 2005 18:48:47 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 2D5A58E; Sat, 1 Oct 2005 18:48:36 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: jfv@bluesong.net Cc: kdb@oss.sgi.com Subject: Re: PATCH x86_64 arch for 2.6.14-rc2 In-reply-to: Your message of "Fri, 30 Sep 2005 15:25:54 MST." <20050930222554.GE23872@trane.bluesong.net> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Sat, 01 Oct 2005 18:48:33 +1000 Message-ID: <20102.1128156513@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1119 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Fri, 30 Sep 2005 15:25:54 -0700, Jack F Vogel wrote: > Patch included, will be stripped from the >list btw, wait for it to get posted... Now on ftp://oss.sgi.com/projects/kdb/download/v4.4 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sdake@mvista.com Mon Oct 3 16:04:04 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 03 Oct 2005 16:04:09 -0700 (PDT) Received: from zipcode.az.mvista.com (h156-az.mvista.com [65.200.49.156] (may be forged)) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j93N43O0027432 for ; Mon, 3 Oct 2005 16:04:04 -0700 Received: from [10.50.1.70] ([10.50.1.70]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id QAA10510 for ; Mon, 3 Oct 2005 16:03:04 -0700 Subject: bug in kdb - patch to fix From: Steven Dake Reply-To: sdake@mvista.com To: kdb@oss.sgi.com Content-type: text/plain Organization: MontaVista Software, Inc. Date: Mon, 03 Oct 2005 16:01:08 -0700 Message-Id: <1128380468.30850.25.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: 1120 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 Our QA found this problem with KDB: 1. The target boots with KDB enabled kernel. 2. Get KDB prompt by hitting ESC-KDB 3. Set breakpoint (at sys_chmod) 4. "go" on KDB prompt to come out. 5. Verify that chmod invokes KDB. 6. Disable KDB by echo 0 > /proc/sys/kernel/kdb 7. Do chmod again. This results in segmentation fault. Please note that the system does not crash at this stage. However, if KDB is enabled again and invoked (by ESC-KDB), it does so with message "Catastrophic error detected". I've inlined a patch which fixes the problem by clearing any breakpoints when kdb is disabled. Source: MontaVista Software, Inc. MR: 14547 Type: Defect Fix Disposition: submitted to kdb mailing list Signed-off-by: Steven Dake Description: If a breakpoint is set, and then KDB is turned off, and then that breakpoint is executed, the application will crash. Then if KDB is reenabled, it will suffer a catastrophic error. This patch clears any existing breakpoints when KDB is disabled by executing echo 0 > /proc/sys/kernel/kdb. Index: linux-2.6.10/include/linux/kdb.h =================================================================== --- linux-2.6.10.orig/include/linux/kdb.h +++ linux-2.6.10/include/linux/kdb.h @@ -108,6 +108,8 @@ typedef enum { #ifdef CONFIG_KDB extern int kdb(kdb_reason_t, int, struct pt_regs *); +extern void kdb_stateset(int); +extern void kdb_disableall(void); #else #define kdb(reason,error_code,frame) (0) #endif Index: linux-2.6.10/kdb/kdb_bp.c =================================================================== --- linux-2.6.10.orig/kdb/kdb_bp.c +++ linux-2.6.10/kdb/kdb_bp.c @@ -217,6 +217,44 @@ kdb_printbp(kdb_bp_t *bp, int i) } /* + * kdb_clearall + * + * Clears all existing breakpoints when the debugger is turned off from + * echoing 0 to /proc/sys/kernel/kdb. + */ +kdb_clearall(void) +{ + int bpno; + kdb_bp_t *bp; + + for(bpno=0,bp=kdb_breakpoints; bpnobp_enabled) { + continue; + } + + /* + * Since this breakpoint is now disabled, we can + * give up the hardware register which is allocated + * to it. + */ + if (bp->bp_hardtype) { + kdba_freebp(bp->bp_hard); + bp->bp_hard = 0; + bp->bp_hardtype = 0; + } + + kdba_removebp(bp); + kdb_printf("KDB turned off through sysctl: clearing breakpoint %d at " kdb_bfd_vma_fmt "\n", + bpno, bp->bp_addr); + + bp->bp_enabled = 0; + bp->bp_global = 0; + bp->bp_addr = 0; + bp->bp_free = 1; + } +} + +/* * kdb_bp * * Handle the bp, and bpa commands. @@ -242,6 +280,7 @@ kdb_printbp(kdb_bp_t *bp, int i) * bpha Set breakpoint on all cpus, force hardware register */ + static int kdb_bp(int argc, const char **argv, const char **envp, struct pt_regs *regs) { Index: linux-2.6.10/kdb/kdbmain.c =================================================================== --- linux-2.6.10.orig/kdb/kdbmain.c +++ linux-2.6.10/kdb/kdbmain.c @@ -3879,6 +3879,18 @@ kdb_init(void) kdb_initial_cpu = -1; } +void +kdb_stateset(int state) +{ + kdb_on = state; + /* + * Disable any breakpoints if KDB is turned off + */ + if (kdb_on == 0) { + kdb_clearall(); + } +} + EXPORT_SYMBOL(kdb_register); EXPORT_SYMBOL(kdb_register_repeat); EXPORT_SYMBOL(kdb_unregister); @@ -3894,6 +3906,7 @@ EXPORT_SYMBOL(kdbgetintenv); EXPORT_SYMBOL(kdbgetaddrarg); EXPORT_SYMBOL(kdb); EXPORT_SYMBOL(kdb_on); +EXPORT_SYMBOL(kdb_stateset); EXPORT_SYMBOL(kdb_seqno); EXPORT_SYMBOL(kdb_initial_cpu); EXPORT_SYMBOL(kdbgetsymval); Index: linux-2.6.10/kernel/sysctl.c =================================================================== --- linux-2.6.10.orig/kernel/sysctl.c +++ linux-2.6.10/kernel/sysctl.c @@ -47,6 +47,7 @@ #include #ifdef CONFIG_KDB #include +int kdb_current_state; static int proc_do_kdb(ctl_table *table, int write, struct file *filp, void *buffer, size_t *lenp, loff_t *ppos); #endif /* CONFIG_KDB */ @@ -621,8 +622,8 @@ static ctl_table kern_table[] = { { .ctl_name = KERN_KDB, .procname = "kdb", - .data = &kdb_on, - .maxlen = sizeof(kdb_on), + .data = &kdb_current_state, + .maxlen = sizeof(kdb_current_state), .mode = 0644, .proc_handler = &proc_do_kdb, }, @@ -2344,6 +2345,7 @@ static int proc_do_kdb(ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos) { #ifdef CONFIG_SYSCTL + kdb_stateset (kdb_current_state); if (KDB_FLAG(NO_CONSOLE) && write) { printk(KERN_ERR "kdb has no working console and has switched itself off\n"); return -EINVAL; --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Mon Oct 3 18:20:31 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 03 Oct 2005 18:20:35 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j941KRO0010160 for ; Mon, 3 Oct 2005 18:20:28 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA07197 for ; Tue, 4 Oct 2005 11:17:32 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 3FE608E; Tue, 4 Oct 2005 11:17:30 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: sdake@mvista.com Cc: kdb@oss.sgi.com Subject: Re: bug in kdb - patch to fix In-reply-to: Your message of "Mon, 03 Oct 2005 16:01:08 MST." <1128380468.30850.25.camel@unnamed.az.mvista.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 04 Oct 2005 11:17:30 +1000 Message-ID: <23370.1128388650@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1121 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Mon, 03 Oct 2005 16:01:08 -0700, Steven Dake wrote: >Our QA found this problem with KDB: >1. The target boots with KDB enabled kernel. >2. Get KDB prompt by hitting ESC-KDB >3. Set breakpoint (at sys_chmod) >4. "go" on KDB prompt to come out. >5. Verify that chmod invokes KDB. >6. Disable KDB by echo 0 > /proc/sys/kernel/kdb >7. Do chmod again. This results in segmentation fault. > >Please note that the system does not crash at this stage. However, if KDB is >enabled again and invoked (by ESC-KDB), it does so with message "Catastrophic >error detected". > >I've inlined a patch which fixes the problem by clearing any breakpoints when kdb is disabled. The problem needs to be fixed, but the patch does it the wrong way. Clearing all break points should be a simple 'kdb_parse("bc *\n", NULL);'. Also the kdb hook into sysctl is no longer in kernel/sysctl.c, it has been dynamic since 2.6.12-rc1. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jim.houston@comcast.net Tue Oct 4 07:39:08 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 04 Oct 2005 07:39:19 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j94Ed7O0026439 for ; Tue, 4 Oct 2005 07:39:08 -0700 Received: from [192.168.0.1] (c-24-218-184-109.hsd1.ma.comcast.net[24.218.184.109]) by comcast.net (sccrmhc13) with SMTP id <2005100414361001300bj61qe>; Tue, 4 Oct 2005 14:36:10 +0000 Subject: RSP value incorrect on x86_kdb From: Jim Houston Reply-To: jim.houston@comcast.net To: jfv@bluesong.NET Cc: kdb@oss.sgi.com Content-type: text/plain Organization: Message-Id: <1128436567.2053.34.camel@new.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 04 Oct 2005 10:36:07 -0400 Content-Transfer-Encoding: 8bit X-archive-position: 1122 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jim.houston@comcast.net Precedence: bulk X-list: kdb Hi Jack, Everyone, The existing x86_64 kdb has two blocks of code which adjust the RSP value based on the assumption that the RSP and SS are not saved. I don't think this code is ever need. Once the processor is in "Long-Mode" it always saves the SS:RSP. I was having problems with stack trace backs when stopped at a breakpoint at a function entry. Fixing the RSP values made the stack trace back work for this case. The attached patch removes this unnecessary stack adjustment. Jim Houston - Concurrent Computer Corp. -- --- arch/x86_64/kdb/kdbasupport.c.0 2005-08-22 17:30:22.000000000 -0400 +++ arch/x86_64/kdb/kdbasupport.c 2005-10-04 10:31:05.000000000 -0400 @@ -699,10 +699,6 @@ if (strcmp(regname, "krsp") == 0) { *contents = (unsigned long)regs + sizeof(struct pt_regs); - if ((regs->cs & 0xffff) == __KERNEL_CS) { - /* rsp and ss are not on stack */ - *contents -= 2*4; - } return 0; } @@ -734,22 +730,6 @@ if ((i < nkdbreglist) && (strlen(kdbreglist[i].reg_name) == strlen(regname))) { - if ((regs->cs & 0xffff) == __KERNEL_CS) { - /* No cpl switch, rsp is not on stack */ - if (strcmp(kdbreglist[i].reg_name, "rsp") == 0) { - *contents = (kdb_machreg_t)regs + - sizeof(struct pt_regs) - 2*8; - return(0); - } - if (strcmp(kdbreglist[i].reg_name, "ss") == 0) { - kdb_machreg_t r; - - r = (kdb_machreg_t)regs + - sizeof(struct pt_regs) - 2*8; - *contents = (kdb_machreg_t)SS(r); /* XXX */ - return(0); - } - } *contents = *(unsigned long *)((unsigned long)regs + kdbreglist[i].reg_offset); return(0); --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Tue Oct 4 22:59:38 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 04 Oct 2005 22:59:42 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j955xaO0003797 for ; Tue, 4 Oct 2005 22:59:37 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA09971; Wed, 5 Oct 2005 15:56:34 +1000 X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: sdake@mvista.com cc: kdb@oss.sgi.com Subject: Re: patch to fix a few bugs for embedded platforms in kdb In-reply-to: Your message of "Wed, 31 Aug 2005 13:20:44 MST." <1125519644.9169.16.camel@unnamed.az.mvista.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Wed, 05 Oct 2005 15:56:34 +1000 Message-ID: <15673.1128491794@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 1123 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Wed, 31 Aug 2005 13:20:44 -0700, Steven Dake wrote: > This patch fixes two things. 1. The Motorola ATCA7101 has no i8042 > keyboard controller. Thus when the local arch stuff tries to probe > the keyboard it hangs. 2. The 7101 uses the serial controller that's > PCI instead of the chipset one. Therefore we need to re-init KDB when > we pick up the PCI serial as console. >Index: linux-2.6.10/drivers/serial/8250.c >=================================================================== >--- linux-2.6.10.orig/drivers/serial/8250.c >+++ linux-2.6.10/drivers/serial/8250.c >@@ -2198,10 +2198,19 @@ static int __init serial8250_console_ini > } > console_initcall(serial8250_console_init); > >+#ifdef CONFIG_KDB >+extern void kdb_io_init(void); >+#endif >+ > static int __init serial8250_late_console_init(void) > { >- if (!(serial8250_console.flags & CON_ENABLED)) >+ if (!(serial8250_console.flags & CON_ENABLED)) { > register_console(&serial8250_console); >+ } >+#ifdef CONFIG_KDB >+ /* pick up any PCI serial controllers */ >+ kdb_io_init(); >+#endif > return 0; > } > late_initcall(serial8250_late_console_init); This patch is not against a current kernel. serial8250_late_console_init() was removed between 2.6.11-rc5 and 2.6.12, there is no longer a late_initcall in serial/8250.c. I do not have the hardware to test this fix, could you do a patch against 2.6.14-rc* please? --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From olh@suse.de Wed Oct 5 11:44:02 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 05 Oct 2005 11:44:06 -0700 (PDT) Received: from mx1.suse.de (ns1.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j95Ii1O0032540 for ; Wed, 5 Oct 2005 11:44:02 -0700 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 1E630EDBF for ; Wed, 5 Oct 2005 20:41:05 +0200 (CEST) Date: Wed, 5 Oct 2005 20:41:04 +0200 From: Olaf Hering To: kdb@oss.sgi.com Subject: missing checks in kdbm_task Message-ID: <20051005184104.GA22909@suse.de> Mime-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Disposition: inline X-DOS: I got your 640K Real Mode Right Here Buddy! X-Homeland-Security: You are not supposed to read this line! You are a terrorist! User-Agent: Mutt und vi sind doch schneller als Notes (und GroupWise) Content-Transfer-Encoding: 8bit X-archive-position: 1124 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: olh@suse.de Precedence: bulk X-list: kdb kdb doesnt check if a pointer in struct task_struct is valid. if (tp->sysvsem.undo_list) kdb_printf( " sysvsem.sem_undo refcnt %d proc_list=0x%p\n", atomic_read(&tp->sysvsem.undo_list->refcnt), tp->sysvsem.undo_list->proc_list); [1]kdb> mds c0000000005ffcd8 0xc0000000005ffcd8 ffffffff00000000 ........ 0xc0000000005ffce0 0000000000000000 ........ 0xc0000000005ffce8 c00000006a8f3578 ....j.5x 0xc0000000005ffcf0 c0000000edc1bb28 ....mA.. 0xc0000000005ffcf8 c0000000005ffcf8 __per_cpu_end+0x191788 0xc0000000005ffd00 c0000000005ffcf8 __per_cpu_end+0x191788 0xc0000000005ffd08 c0000000e230a9e0 ....b0.. 0xc0000000005ffd10 c0000000077c0d10 ........ [1]kdb> 0xc0000000005ffd18 0000000000000000 ........ 0xc0000000005ffd20 c0000000006c9830 __per_cpu_end+0x25b2c0 0xc0000000005ffd28 0000000000000000 ........ 0xc0000000005ffd30-0xc0000000005ffd4f zero suppressed 0xc0000000005ffd50 0000000000000000 ........ [1]kdb> task c00000006a8f3578 struct task at 0xc0000001cb3b8000, pid=7319560 flags=0x0 state=-4611686015600462712 comm="" cpu=-1073741824 policy=13835058055283274504 prio=4643704 static_prio=2509 cpus_allowed=0x00000000000000000000000000000000 &thread=0xc0000001cb3b84b0 need_resched=1 timestamp=13835058055286807416 time_slice=0 lock_depth=-1073741824 fs=0x0000000010120008 files=0x0000000000000000 mm=0x00000000000000d2 uid=0 euid=0 suid=1 fsuid=1795248530 gid=0 egid=713608 sgid=0 fsgid=16 user=0xc000000093cdec20 sysvsem.sem_undo refcnt -1073741823 proc_list=0x000000001011d000 signal=0x0000000000000001 &blocked=0xc0000001cb3b8848 &pending=0xc0000001cb3b8858 utime=0 stime=0 cutime=0 cstime=0 [1]kdb> task c0000000edc1bb28 struct task at 0xc0000001cb3b8000, pid=7319560 flags=0x0 state=-4611686018421097240 comm="" cpu=0 policy=13835058055283274504 prio=4643704 static_prio=5219 cpus_allowed=0x00000000000000000000000000000000 &thread=0xc0000001cb3b84b0 need_resched=0 timestamp=13835058055286807416 time_slice=3221225472 lock_depth=-1073741824 fs=0x0000000000000000 files=0x0000000000000000 mm=0xc0000000edc1bdd0 uid=0 euid=0 suid=0 fsuid=0 gid=0 egid=0 sgid=0 fsgid=0 user=0x0000000000000000 kdb: Debugger re-entered on cpu 1, new reason = 7 Forced recursion is set Attempting recursive mode Entering kdb (current=0xc0000000eaee4170, pid 21292) on processor 1 due to Recursion @ 0xc00000000022ce30 [1]kdb> bt Stack traceback for pid 21292 0xc0000000eaee4170 21292 21291 1 1 R 0xc0000000eaee4620 *run-crons SP(esp) PC(eip) Function(args) 0xc0000000abb4a720 0xc00000000022ce30 .kdbm_task +0x2d0 0xc0000000abb4a7f0 0xc000000000227938 .kdb_parse +0x3e4 0xc0000000abb4a8c0 0xc0000000002298a8 .kdb_main_loop +0xa78 0xc0000000abb4a9c0 0xc0000000000557f8 .kdba_main_loop +0x84 0xc0000000abb4abc0 0xc00000000022697c .kdb +0x5b4 ... kdb-v4.4-2.6.5-common-3 -- short story of a lazy sysadmin: alias appserv=wotan --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From chandak_umesh@yahoo.com Mon Oct 10 10:52:03 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 10 Oct 2005 10:52:06 -0700 (PDT) Received: from web30704.mail.mud.yahoo.com (web30704.mail.mud.yahoo.com [68.142.200.137]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9AHq3O0001893 for ; Mon, 10 Oct 2005 10:52:03 -0700 Received: (qmail 19538 invoked by uid 60001); 10 Oct 2005 17:49:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VuON1scFJ9MTBFY3ZbtGOoZllYTL00TqR7QPA55YwHIgI4i4XG57c9PRMESWn7d8bRRjsex8Coy8I29iWlZSSqXQj+ElaS/F7C9xk9d5Izwwi9WiJ36IbMg9BOhMZqXLG6/mgn89sVqH6f2VeSHIjwvJ8G7gInA/zaPd34MI/Ds= ; Message-ID: <20051010174903.19536.qmail@web30704.mail.mud.yahoo.com> Received: from [203.109.125.58] by web30704.mail.mud.yahoo.com via HTTP; Mon, 10 Oct 2005 10:49:03 PDT Date: Mon, 10 Oct 2005 10:49:03 -0700 (PDT) From: umesh chandak Subject: display of local varaibles in kdb To: kdb@oss.sgi.com MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1125 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: chandak_umesh@yahoo.com Precedence: bulk X-list: kdb Hi , Hi i am using kdb for kernel 2.6.10 . And i am debuging netif_rx function in the kernel . So i want to see the local variable in that function . But i unable to watch local variable named skb . Can anybody help me. How should i watch the local varaible . Thanks in advance . -Umesh __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Mon Oct 10 17:09:39 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 10 Oct 2005 17:09:44 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9B09aO0001728 for ; Mon, 10 Oct 2005 17:09:38 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA00756 for ; Tue, 11 Oct 2005 10:06:35 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id E6F79124; Tue, 11 Oct 2005 10:06:26 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: umesh chandak Cc: kdb@oss.sgi.com Subject: Re: display of local varaibles in kdb In-reply-to: Your message of "Mon, 10 Oct 2005 10:49:03 MST." <20051010174903.19536.qmail@web30704.mail.mud.yahoo.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 11 Oct 2005 10:06:23 +1000 Message-ID: <19731.1128989183@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1126 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Mon, 10 Oct 2005 10:49:03 -0700 (PDT), umesh chandak wrote: > Hi i am using kdb for kernel 2.6.10 . >And i am debuging netif_rx function in the kernel . >So i want to see the local variable in that function . >But i unable to watch local variable named skb . KDB only knows about global and static symbols. It does not know about the names of local symbols on the stack. However KDB does know about function parameters, and skb is a parameter to netif_rx. Use the bt (backtrace) command to display the parameters passed into a function. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From olh@suse.de Tue Oct 11 06:31:19 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 11 Oct 2005 06:31:27 -0700 (PDT) Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9BDVIO0017389 for ; Tue, 11 Oct 2005 06:31:19 -0700 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 96826E63D for ; Tue, 11 Oct 2005 15:28:18 +0200 (CEST) Date: Tue, 11 Oct 2005 15:28:18 +0200 From: Olaf Hering To: kdb@oss.sgi.com Subject: kdb version of acces_ok Message-ID: <20051011132818.GA17868@suse.de> Mime-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Disposition: inline X-DOS: I got your 640K Real Mode Right Here Buddy! X-Homeland-Security: You are not supposed to read this line! You are a terrorist! User-Agent: Mutt und vi sind doch schneller als Notes (und GroupWise) Content-Transfer-Encoding: 8bit X-archive-position: 1127 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: olh@suse.de Precedence: bulk X-list: kdb What is the kdb equivalent of access_ok()? I got this crash this morning with our SP3 kernel. It seems there are alot of places where the pointer is not checked before dereferencing it. I have to fix that. SysRq : Entering kdb Entering kdb (current=0xc0000000078a7510, pid 1234) on processor 0 due to Keyboard Entry [0]kdb> bt 72 SP(esp) PC(eip) Function(args) 0x0000000000000048 0x0000000000000000 kdb: Debugger re-entered on cpu 0, new reason = 7 Forced recursion is set Attempting recursive mode Entering kdb (current=0xc0000000078a7510, pid 1234) on processor 0 due to Recursion @ 0xc000000000056f74 [0]kdb> bt Stack traceback for pid 1234 0xc0000000078a7510 1234 1 1 0 R 0xc0000000078a79c0 *khvcd SP(esp) PC(eip) Function(args) 0xc00000000789f330 0xc000000000056f74 .task_curr +0x1c 0xc00000000789f330 0xc0000000000519ec (lr) .kdba_bt_stack_ppc +0x1c4 0xc00000000789f370 0xc000000000051908 .kdba_bt_stack_ppc +0xe0 0xc00000000789f610 0xc000000000051da0 .kdba_bt_address +0x24 0xc00000000789f680 0xc000000000221fc4 .kdb_bt +0x400 0xc00000000789f7b0 0xc000000000228f0c .kdb_parse +0x3e4 0xc00000000789f880 0xc00000000022ae7c .kdb_main_loop +0xa78 0xc00000000789f980 0xc0000000000567e0 .kdba_main_loop +0x84 0xc00000000789fb80 0xc000000000227f50 .kdb +0x5b4 0xc00000000789fc50 0xc000000000054cc0 .sysrq_handle_kdb +0x28 0xc00000000789fce0 0xc000000000266c18 .__handle_sysrq_nolock +0x110 0xc00000000789fd90 0xc000000000267054 .handle_sysrq +0x7c 0xc00000000789fe30 0xc000000000267cbc .khvcd +0x2d4 0xc00000000789ff90 0xc000000000017cdc .kernel_thread +0x4c [0]kdb> [0]kdb> go kdb: Debugger re-entered on cpu 0, new reason = 7 Not executing a kdb command No longjmp available for recovery Forced recursion is set Attempting recursive mode -- short story of a lazy sysadmin: alias appserv=wotan --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Tue Oct 11 18:13:00 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 11 Oct 2005 18:13:05 -0700 (PDT) Received: from larry.melbourne.sgi.com ([61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9C1CwO0020081 for ; Tue, 11 Oct 2005 18:12:59 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA29067 for ; Wed, 12 Oct 2005 11:09:47 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id D29E48E; Wed, 12 Oct 2005 11:09:42 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: Olaf Hering Cc: kdb@oss.sgi.com Subject: Re: kdb version of acces_ok In-reply-to: Your message of "Tue, 11 Oct 2005 15:28:18 +0200." <20051011132818.GA17868@suse.de> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Wed, 12 Oct 2005 11:09:40 +1000 Message-ID: <24048.1129079380@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1128 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Tue, 11 Oct 2005 15:28:18 +0200, Olaf Hering wrote: > >What is the kdb equivalent of access_ok()? kdb_getarea() and kdb_getarea_size(), you would normally use kdb_getarea(). It uses __copy_to_user_inatomic() to catch invalid addresses and recover. >I got this crash this morning >with our SP3 kernel. It seems there are alot of places where the pointer >is not checked before dereferencing it. Sometimes it is not worth checking all the addresses in every kdb routine. You can just use the addresses and let kdb recover from the error. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From olh@suse.de Wed Oct 12 04:11:18 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 12 Oct 2005 04:11:22 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9CBBHO0010020 for ; Wed, 12 Oct 2005 04:11:18 -0700 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 19EDD1BEA3; Wed, 12 Oct 2005 13:08:12 +0200 (CEST) Date: Wed, 12 Oct 2005 13:08:11 +0200 From: Olaf Hering To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: kdb version of acces_ok Message-ID: <20051012110811.GA27478@suse.de> References: <20051011132818.GA17868@suse.de> <24048.1129079380@ocs3.ocs.com.au> Mime-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <24048.1129079380@ocs3.ocs.com.au> X-DOS: I got your 640K Real Mode Right Here Buddy! X-Homeland-Security: You are not supposed to read this line! You are a terrorist! User-Agent: Mutt und vi sind doch schneller als Notes (und GroupWise) Content-Transfer-Encoding: 8bit X-archive-position: 1129 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: olh@suse.de Precedence: bulk X-list: kdb On Wed, Oct 12, Keith Owens wrote: > On Tue, 11 Oct 2005 15:28:18 +0200, > Olaf Hering wrote: > > > >What is the kdb equivalent of access_ok()? > > kdb_getarea() and kdb_getarea_size(), you would normally use > kdb_getarea(). It uses __copy_to_user_inatomic() to catch invalid > addresses and recover. I was hoping for a generic function that checks wether a given memory range is valid. In my case, it should have checked sizeof(struct task_struct) at addr before calling kdba_bt_address(). I will add such a check to kdba_bt_stack_ppc now. How do other archs deal with 'bt 72' (which should have been 'btp 72')? -- short story of a lazy sysadmin: alias appserv=wotan --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Oct 12 04:18:33 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 12 Oct 2005 04:18:35 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9CBIUO0011067 for ; Wed, 12 Oct 2005 04:18:31 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09618 for ; Wed, 12 Oct 2005 21:15:29 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id BEF7E8E; Wed, 12 Oct 2005 21:15:24 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: Olaf Hering Cc: kdb@oss.sgi.com Subject: Re: kdb version of acces_ok In-reply-to: Your message of "Wed, 12 Oct 2005 13:08:11 +0200." <20051012110811.GA27478@suse.de> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Wed, 12 Oct 2005 21:15:24 +1000 Message-ID: <32516.1129115724@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1130 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Wed, 12 Oct 2005 13:08:11 +0200, Olaf Hering wrote: > On Wed, Oct 12, Keith Owens wrote: > >> On Tue, 11 Oct 2005 15:28:18 +0200, >> Olaf Hering wrote: >> > >> >What is the kdb equivalent of access_ok()? >> >> kdb_getarea() and kdb_getarea_size(), you would normally use >> kdb_getarea(). It uses __copy_to_user_inatomic() to catch invalid >> addresses and recover. > >I was hoping for a generic function that checks wether a given memory >range is valid. > >In my case, it should have checked sizeof(struct task_struct) at addr >before calling kdba_bt_address(). There is kdba_verify_rw(), I can always add a kdba_verify_r() function as well. >I will add such a check to kdba_bt_stack_ppc now. How do other archs >deal with 'bt 72' (which should have been 'btp 72')? ia64 does not allow bt
, because of the strange ia64 unwind data. Other architectures such as i386 and x86_64 just use the address, if it is invalid then you get an oops, kdb recovers from the oops and continues. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From olh@suse.de Wed Oct 12 04:24:37 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 12 Oct 2005 04:24:41 -0700 (PDT) Received: from mx1.suse.de (mail.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9CBOaO0015474 for ; Wed, 12 Oct 2005 04:24:37 -0700 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 19925E616; Wed, 12 Oct 2005 13:21:36 +0200 (CEST) Date: Wed, 12 Oct 2005 13:21:35 +0200 From: Olaf Hering To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: kdb version of acces_ok Message-ID: <20051012112135.GA27864@suse.de> References: <20051012110811.GA27478@suse.de> <32516.1129115724@ocs3.ocs.com.au> Mime-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <32516.1129115724@ocs3.ocs.com.au> X-DOS: I got your 640K Real Mode Right Here Buddy! X-Homeland-Security: You are not supposed to read this line! You are a terrorist! User-Agent: Mutt und vi sind doch schneller als Notes (und GroupWise) Content-Transfer-Encoding: 8bit X-archive-position: 1131 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: olh@suse.de Precedence: bulk X-list: kdb On Wed, Oct 12, Keith Owens wrote: > There is kdba_verify_rw(), I can always add a kdba_verify_r() function > as well. The ppc64 version of kdba_verify_rw looks broken, not very stackfriendly. > >I will add such a check to kdba_bt_stack_ppc now. How do other archs > >deal with 'bt 72' (which should have been 'btp 72')? > > ia64 does not allow bt
, because of the strange ia64 unwind > data. Other architectures such as i386 and x86_64 just use the > address, if it is invalid then you get an oops, kdb recovers from the > oops and continues. I checked xmon, and it appears to works the same way. Apparently something in that area is not properly implemented in the ppc64 part of kdb. -- short story of a lazy sysadmin: alias appserv=wotan --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jim.houston@comcast.net Wed Oct 12 13:43:37 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 12 Oct 2005 13:43:40 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc13.comcast.net [216.148.227.118]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9CKhaO0011316 for ; Wed, 12 Oct 2005 13:43:37 -0700 Received: from [192.168.0.1] (c-24-63-208-209.hsd1.ma.comcast.net[24.63.208.209]) by comcast.net (rwcrmhc13) with SMTP id <2005101220403501500b98s6e>; Wed, 12 Oct 2005 20:40:35 +0000 Subject: kdb and NMI watchdog From: Jim Houston Reply-To: jim.houston@comcast.net To: Keith Owens Cc: kdb@oss.sgi.com Content-type: text/plain Organization: Message-Id: <1129149634.2049.118.camel@new.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 12 Oct 2005 16:40:34 -0400 Content-Transfer-Encoding: 8bit X-archive-position: 1132 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jim.houston@comcast.net Precedence: bulk X-list: kdb Hi Keith, We noticed that kdb can trigger the NMI watchdog if a relatively slow baud rate is used on the serial console and kdb produces too much output. The attached patch adds touch_nmi_calls() to kdb_printf after each console write call. Jim Houston - Concurrent Computer Corp. --- 2.6-redhawk/kdb/kdb_io.c.0 2005-09-23 18:04:01.000000000 -0400 +++ 2.6-redhawk/kdb/kdb_io.c 2005-10-12 12:17:49.000000000 -0400 @@ -510,6 +510,7 @@ while (c) { c->write(c, kdb_buffer, strlen(kdb_buffer)); + touch_nmi_watchdog(); c = c->next; } if (logging) { @@ -566,6 +567,7 @@ while (c) { c->write(c, moreprompt, strlen(moreprompt)); + touch_nmi_watchdog(); c = c->next; } --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Fri Oct 14 00:20:39 2005 Received: with ECARTIS (v1.0.0; list kdb); Fri, 14 Oct 2005 00:20:43 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9E7KbO0000600 for ; Fri, 14 Oct 2005 00:20:38 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA02634 for ; Fri, 14 Oct 2005 17:17:33 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 22BCA8E; Fri, 14 Oct 2005 17:17:31 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: jim.houston@comcast.net Cc: kdb@oss.sgi.com Subject: Re: kdb and NMI watchdog In-reply-to: Your message of "12 Oct 2005 16:40:34 -0400." <1129149634.2049.118.camel@new.localdomain> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 14 Oct 2005 17:17:30 +1000 Message-ID: <7564.1129274250@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1133 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On 12 Oct 2005 16:40:34 -0400, Jim Houston wrote: >Hi Keith, > >We noticed that kdb can trigger the NMI watchdog if a relatively >slow baud rate is used on the serial console and kdb produces too >much output. The attached patch adds touch_nmi_calls() to >kdb_printf after each console write call. > >Jim Houston - Concurrent Computer Corp. > >--- 2.6-redhawk/kdb/kdb_io.c.0 2005-09-23 18:04:01.000000000 -0400 >+++ 2.6-redhawk/kdb/kdb_io.c 2005-10-12 12:17:49.000000000 -0400 >@@ -510,6 +510,7 @@ > > while (c) { > c->write(c, kdb_buffer, strlen(kdb_buffer)); >+ touch_nmi_watchdog(); > c = c->next; > } > if (logging) { >@@ -566,6 +567,7 @@ > > while (c) { > c->write(c, moreprompt, strlen(moreprompt)); >+ touch_nmi_watchdog(); > c = c->next; > } > I am not keen on this patch. Corrupt data can cause commands to loop, generating non-stop output. Calling touch_nmi_watchdog() in the common output code loses the ability to catch the looping commands. KDB already calls touch_nmi_watchdog() in commands that produce a lot of of output and I prefer to put those calls in the long running commands rather directly at the output point. That way we get protection against looping output, while still protecting the commands that are expected to generate a lot of output. Which KDB commands are tripping the nmi watchdog? --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jim.houston@comcast.net Fri Oct 14 07:17:28 2005 Received: with ECARTIS (v1.0.0; list kdb); Fri, 14 Oct 2005 07:17:30 -0700 (PDT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [63.240.76.22]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9EEHRO0003369 for ; Fri, 14 Oct 2005 07:17:28 -0700 Received: from [192.168.0.1] (c-24-63-208-209.hsd1.ma.comcast.net[24.63.208.209]) by comcast.net (sccrmhc12) with SMTP id <2005101414142501200nvsi2e>; Fri, 14 Oct 2005 14:14:25 +0000 Subject: Re: kdb and NMI watchdog From: Jim Houston Reply-To: jim.houston@comcast.net To: Keith Owens Cc: kdb@oss.sgi.com In-Reply-To: <7564.1129274250@ocs3.ocs.com.au> References: <7564.1129274250@ocs3.ocs.com.au> Content-type: text/plain Organization: Message-Id: <1129299264.2052.48.camel@new.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 14 Oct 2005 10:14:24 -0400 Content-Transfer-Encoding: 8bit X-archive-position: 1134 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jim.houston@comcast.net Precedence: bulk X-list: kdb On Fri, 2005-10-14 at 03:17, Keith Owens wrote: > I am not keen on this patch. Corrupt data can cause commands to loop, > generating non-stop output. Calling touch_nmi_watchdog() in the common > output code loses the ability to catch the looping commands. KDB > already calls touch_nmi_watchdog() in commands that produce a lot of of > output and I prefer to put those calls in the long running commands > rather directly at the output point. That way we get protection > against looping output, while still protecting the commands that are > expected to generate a lot of output. > > Which KDB commands are tripping the nmi watchdog? Hi Keith, I reproduced this problem using kdb with serial console baud rate set to 9600, setting LINES=1000 and then doing a dmesg command. I expect that ps would also produce the failure. I guess I should have mentioned that this results in a panic/hang rather than re-entering kdb (atleast on linux-2.6.13 on x86_64). We have seen this a few times doing real debug with the serial console at a more reasonable 38.4K baud. Jim Houston - Concurrent Computer Corp. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From write2sck@gmail.com Thu Oct 20 11:20:53 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 20 Oct 2005 11:20:55 -0700 (PDT) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.203]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9KIKqO0017875 for ; Thu, 20 Oct 2005 11:20:53 -0700 Received: by qproxy.gmail.com with SMTP id p26so153907qbb for ; Thu, 20 Oct 2005 11:17:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=SZ2YLj1PehJYrvUiX4pMG+Lwq3fHK+wxbRS9eJ0p6FkBmcLVYHOubg/uGdDI5lCcl0GMhRH1J/YNIfSA09gZNKCK48ylaemxSsrIk0Hw+vReD5NIDYQDwn5DCdTvXzdYS9KubInNanLfwbcbIZnwRH/IpSdOMvl91geOqLVB0uo= Received: by 10.65.153.2 with SMTP id f2mr1739292qbo; Thu, 20 Oct 2005 11:17:46 -0700 (PDT) Received: by 10.64.204.10 with HTTP; Thu, 20 Oct 2005 11:17:46 -0700 (PDT) Message-ID: <132d4af90510201117l4cec0e0dsc4a8ea44d7a4993a@mail.gmail.com> Date: Thu, 20 Oct 2005 14:17:46 -0400 From: Sachin Kulkarni To: kdb@oss.sgi.com Subject: kdb for kernel 2.6 MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id j9KIKqO0017875 X-archive-position: 1135 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: write2sck@gmail.com Precedence: bulk X-list: kdb Hi, I want to remotely debug the arm linux kernel on a Intel XScale board. I am currently using kernel 2.6. Which version/patch of kdb should I use for the same? I have read the FAQ which says that kdb works till v2.4, but just in case if anybody has tried this before, it would be really helpful for me to get started. Thanks a lot, Sachin --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Thu Oct 20 18:16:52 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 20 Oct 2005 18:16:54 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9L1GoO0018689 for ; Thu, 20 Oct 2005 18:16:51 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA19144 for ; Fri, 21 Oct 2005 11:13:42 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id C4D308E; Fri, 21 Oct 2005 11:13:23 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: Sachin Kulkarni Cc: kdb@oss.sgi.com Subject: Re: kdb for kernel 2.6 In-reply-to: Your message of "Thu, 20 Oct 2005 14:17:46 -0400." <132d4af90510201117l4cec0e0dsc4a8ea44d7a4993a@mail.gmail.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 21 Oct 2005 11:13:21 +1000 Message-ID: <1438.1129857201@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1136 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Thu, 20 Oct 2005 14:17:46 -0400, Sachin Kulkarni wrote: >I want to remotely debug the arm linux kernel on a Intel XScale board. >I am currently using kernel 2.6. Which version/patch of kdb should I >use for the same? I have read the FAQ which says that kdb works till >v2.4, but just in case if anybody has tried this before, it would be >really helpful for me to get started. The xscale specific patches were supplied by Intel. But they have not sent any patches since 2.4.20. I do not know if Intel are still interested in supporting kdb on xscale. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From write2sck@gmail.com Thu Oct 20 18:36:48 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 20 Oct 2005 18:36:51 -0700 (PDT) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.192]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9L1alO0019819 for ; Thu, 20 Oct 2005 18:36:48 -0700 Received: by qproxy.gmail.com with SMTP id z1so241524qbc for ; Thu, 20 Oct 2005 18:33:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cnK2SGZGV1AmhlQmE+Gaqmm7xa+v+sg/eB0akdZcL3UAMEwevVZw6MAumkC2frPA8qx9uECAMiKwOHn0w7zPS748IJLDG/tsaXBdKRsvrXtu9enXywTxMteHooEAGTs/ieKVSfD+BTkE6iowBgW8sAk+dz2phgUTZv/2aAlSTFo= Received: by 10.65.38.14 with SMTP id q14mr1805306qbj; Thu, 20 Oct 2005 18:33:41 -0700 (PDT) Received: by 10.64.204.10 with HTTP; Thu, 20 Oct 2005 18:33:40 -0700 (PDT) Message-ID: <132d4af90510201833o7c4e0c31ldbc7d7c480931822@mail.gmail.com> Date: Thu, 20 Oct 2005 21:33:40 -0400 From: Sachin Kulkarni To: Keith Owens Subject: Re: kdb for kernel 2.6 Cc: kdb@oss.sgi.com In-Reply-To: <1438.1129857201@ocs3.ocs.com.au> MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <132d4af90510201117l4cec0e0dsc4a8ea44d7a4993a@mail.gmail.com> <1438.1129857201@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id j9L1alO0019819 X-archive-position: 1137 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: write2sck@gmail.com Precedence: bulk X-list: kdb Maybe I will switch to kernel 2.4 then. Thanks a lot. -Sachin On 10/20/05, Keith Owens wrote: > On Thu, 20 Oct 2005 14:17:46 -0400, > Sachin Kulkarni wrote: > >I want to remotely debug the arm linux kernel on a Intel XScale board. > >I am currently using kernel 2.6. Which version/patch of kdb should I > >use for the same? I have read the FAQ which says that kdb works till > >v2.4, but just in case if anybody has tried this before, it would be > >really helpful for me to get started. > > The xscale specific patches were supplied by Intel. But they have not > sent any patches since 2.4.20. I do not know if Intel are still > interested in supporting kdb on xscale. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Fri Oct 28 00:33:01 2005 Received: with ECARTIS (v1.0.0; list kdb); Fri, 28 Oct 2005 00:33:08 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9S7X0O0028312 for ; Fri, 28 Oct 2005 00:33:00 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA14509; Fri, 28 Oct 2005 17:29:47 +1000 X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: kdb@oss.sgi.com Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org Subject: Announce: kdb v4.4 is available for kernel 2.6.14 Date: Fri, 28 Oct 2005 17:29:43 +1000 Message-ID: <5859.1130484583@kao2.melbourne.sgi.com> X-archive-position: 1138 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 KDB (Linux Kernel Debugger) has been updated for kernel 2.6.14. ftp://oss.sgi.com/projects/kdb/download/v4.4/ ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/ Note: Due to a spam attack, the kdb@oss.sgi.com mailing list is now subscriber only. If you reply to this mail, you may wish to trim kdb@oss.sgi.com from the cc: list. Current versions are :- kdb-v4.4-2.6.14-common-1.bz2 kdb-v4.4-2.6.14-i386-1.bz2 kdb-v4.4-2.6.14-ia64-1.bz2 The register display (rd, r) and register modify (rm) commands now work for tasks that were running when MCA/INIT was delivered. There is a small change in the behaviour of rd/rm after you use the pid, btt, btp and btc commands. I recommend that you read the rd and bt man pages in Documentation/kdb, pay attention to KDB's notion of the "current task" when working with registers. Changelog extract since kdb-v4.4-2.6.13-common-1. 2005-10-28 Keith Owens * kdb v4.4-2.6.14-common-1. 2005-10-21 Keith Owens * kdb v4.4-2.6.14-rc5-common-1. 2005-10-11 Keith Owens * Handle removal of USB keyboard. Aaron Young, SGI. * kdb v4.4-2.6.14-rc4-common-1. 2005-10-05 Keith Owens * Extend kdb_notifier_list() codes to include dumping. * Use emergency_restart() for reboot, it can be called from interrupt context, unlike machine_restart(). * kdb v4.4-2.6.14-rc3-common-1. 2005-09-21 Keith Owens * Support kdb_current_task in register display and modify commands. * Document what changes kdb's notion of the current task. * Update rd documentation for IA64. * Move some definictions to kdbprivate.h and remove some unused symbol exports. * kdb v4.4-2.6.14-rc2-common-1. 2005-09-20 Keith Owens * Document IA64 handlers command. * Add more fields to the task command. * Cope with MCA/INIT handlers in the ps command. * Namespace cleanup, delete unused exports, make some functions static. * Add a kdb_notifier_list callback when kdb is about to reboot the system. * kdb v4.4-2.6.14-rc1-common-1. Changelog extract since kdb-v4.4-2.6.13-i386-1. 2005-10-28 Keith Owens * kdb v4.4-2.6.14-i386-1. 2005-10-21 Keith Owens * kdb v4.4-2.6.14-rc5-i386-1. 2005-10-11 Keith Owens * kdb v4.4-2.6.14-rc4-i386-1. 2005-10-04 Keith Owens * kdb v4.4-2.6.14-rc3-i386-1. 2005-09-21 Keith Owens * Support kdb_current_task in register display and modify commands. * kdb v4.4-2.6.14-rc2-i386-1. 2005-09-20 Keith Owens * Remove use of __STDC_VERSION__ in ansidecl.h. * kdb v4.4-2.6.14-rc1-i386-1. Changelog extract since kdb v4.4-2.6.13-ia64-1. 2005-10-28 Keith Owens * kdb v4.4-2.6.14-ia64-1. 2005-10-21 Keith Owens * kdb v4.4-2.6.14-rc5-ia64-1. 2005-10-11 Keith Owens * Handle removal of USB keyboard. Aaron Young, SGI * kdb v4.4-2.6.14-rc4-ia64-1. 2005-10-04 Keith Owens * kdb v4.4-2.6.14-rc3-ia64-1. 2005-09-21 Keith Owens * Support kdb_current_task in register display and modify commands. * kdb v4.4-2.6.14-rc2-ia64-1. 2005-09-20 Keith Owens * Coexist with kprobes. * Coexist with MCA/INIT rewrite. * Add KDB_ENTER_SLAVE to handle concurrent entry to kdb from multiple cpus. * Add handlers command to control whether the MCA/INIT task or the original task is displayed. * Namespace clean up, remove unused kdba_sw_interrupt. * kdb v4.4-2.6.14-rc1-ia64-1. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Exmh version 2.1.1 10/15/1999 iD8DBQFDYdNni4UHNye0ZOoRAjsBAJ9c65ND3qM321G48CD/rl8Py5+h7ACfdc28 r4niIGhux3YL7d6Blqv7RBA= =vEhG -----END PGP SIGNATURE----- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From knerr@cs.swarthmore.edu Fri Oct 28 12:06:53 2005 Received: with ECARTIS (v1.0.0; list kdb); Fri, 28 Oct 2005 12:06:55 -0700 (PDT) Received: from allspice.cs.swarthmore.edu (allspice.cs.swarthmore.edu [130.58.68.9]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j9SJ6qO0016201 for ; Fri, 28 Oct 2005 12:06:53 -0700 Received: by allspice.cs.swarthmore.edu (Postfix, from userid 797) id 0B30DF861; Fri, 28 Oct 2005 15:03:42 -0400 (EDT) Date: Fri, 28 Oct 2005 15:03:42 -0400 To: kdb@oss.sgi.com Subject: PCI IRQ routing table error Message-ID: <20051028190341.GA5232@allspice.cs.swarthmore.edu> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i From: knerr@cs.swarthmore.edu (Jeff Knerr) Content-Transfer-Encoding: 8bit X-archive-position: 1139 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: knerr@cs.swarthmore.edu Precedence: bulk X-list: kdb Hello. I'm trying to get a 2.6 kernel to work with kdb, but I keep getting the above error on the BIOS splash screen, and then the machine's ethernet interfaces don't come up. Here are the symptoms and some of the things I've tried: - first boot with 2.6.8 and kdb works (no error msg), but subsequent reboots give the IRQ error - if I use a kdb-patched 2.6 kernel, but without selecting the kdb option in "make xconfig", it seems to work fine (multiple reboots) - machine also works fine with plain 2.6.8 kernel (no kdb patches applied) - I've tried 2.6.8 and 2.6.11 kernels with same problem (I'm happy to try 2.6.14, if you think it will help) - we've successfully used kdb with 2.4 kernels on this machine - I searched google and this list's archives, but didn't see anything obvious If you've got any ideas for other things to try, please let me know. Also, I've got lots of info (dmesg, lspci, etc), but don't know what will help debug this the fastest -- just let me know. Thanks. jeff ps. this is an x86 P4, tyan S2707 with AMI BIOS, running debian --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Sat Oct 29 22:42:09 2005 Received: with ECARTIS (v1.0.0; list kdb); Sat, 29 Oct 2005 22:42:12 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j9U5g7O0007639 for ; Sat, 29 Oct 2005 22:42:08 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA29807 for ; Sun, 30 Oct 2005 16:38:40 +1100 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 84455126; Sun, 30 Oct 2005 16:38:25 +1100 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.1 From: Keith Owens To: knerr@cs.swarthmore.edu (Jeff Knerr) Cc: kdb@oss.sgi.com Subject: Re: PCI IRQ routing table error In-reply-to: Your message of "Fri, 28 Oct 2005 15:03:42 -0400." <20051028190341.GA5232@allspice.cs.swarthmore.edu> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Sun, 30 Oct 2005 16:38:22 +1100 Message-ID: <706.1130650702@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1140 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Fri, 28 Oct 2005 15:03:42 -0400, knerr@cs.swarthmore.edu (Jeff Knerr) wrote: > Hello. I'm trying to get a 2.6 kernel to work with kdb, but I keep > getting the above error on the BIOS splash screen, and then the > machine's ethernet interfaces don't come up. > > Here are the symptoms and some of the things I've tried: > > - first boot with 2.6.8 and kdb works (no error msg), but subsequent > reboots give the IRQ error > - if I use a kdb-patched 2.6 kernel, but without selecting the kdb > option in "make xconfig", it seems to work fine (multiple reboots) > - machine also works fine with plain 2.6.8 kernel (no kdb patches > applied) > - I've tried 2.6.8 and 2.6.11 kernels with same problem (I'm happy to > try 2.6.14, if you think it will help) > - we've successfully used kdb with 2.4 kernels on this machine > - I searched google and this list's archives, but didn't see > anything obvious This is a new one on me. I cannot see how kdb could be doing this, the kdb patch does not touch the bios nor the IRQ routing. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.