From Francois.Wellenreiter@bull.net Wed Mar 2 02:09:37 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 02 Mar 2005 02:09:42 -0800 (PST) Received: from ecfrec.frec.bull.fr (ecfrec.frec.bull.fr [129.183.4.8]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j22A9aaf011208 for ; Wed, 2 Mar 2005 02:09:36 -0800 Received: from localhost (localhost [127.0.0.1]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 300FB19D911 for ; Wed, 2 Mar 2005 11:09:38 +0100 (CET) Received: from ecfrec.frec.bull.fr ([127.0.0.1]) by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08186-02 for ; Wed, 2 Mar 2005 11:09:36 +0100 (CET) Received: from ecn002.frec.bull.fr (ecn002.frec.bull.fr [129.183.4.6]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id B19C819D90A for ; Wed, 2 Mar 2005 11:09:35 +0100 (CET) Received: from openx1.frec.bull.fr ([129.183.10.3]) by ecn002.frec.bull.fr (Lotus Domino Release 5.0.12) with ESMTP id 2005030211183540:585 ; Wed, 2 Mar 2005 11:18:35 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by openx1.frec.bull.fr (Postfix) with ESMTP id 2E88413949 for ; Wed, 2 Mar 2005 11:09:31 +0100 (CET) Message-ID: <422590DB.3080604@bull.net> Date: Wed, 02 Mar 2005 11:09:31 +0100 From: Francois Wellenreiter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: KDB early not working since 2.6.10 on IA-64 X-MIMETrack: Itemize by SMTP Server on ECN002/FR/BULL(Release 5.0.12 |February 13, 2003) at 02/03/2005 11:18:35, Serialize by Router on ECN002/FR/BULL(Release 5.0.12 |February 13, 2003) at 02/03/2005 11:18:40, Serialize complete at 02/03/2005 11:18:40 Content-type: text/plain X-Virus-Scanned: ClamAV 0.83/737/Mon Feb 28 22:22:18 2005 on oss.sgi.com X-Virus-Scanned: by amavisd-new at frec.bull.fr X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 922 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Francois.Wellenreiter@bull.net Precedence: bulk X-list: kdb Hi all, Since console configuration have been deeply modified on 2.6.10 linux kernel, I noticed that enabling "kdb=early" wasn't working well on my Tiger4 machine. It produced KDB traces on the screen, but keyboard seemed to be disabled. The following patch may enable this. Best regards, Francois WELLENREITER -- Attached file included as plaintext by Ecartis -- -- File: Bull-kdbearly-2610.patch diff -auNr linux-2.6.10/drivers/serial/8250_early.c linux-2.6.10_kdbearly/drivers/serial/8250_early.c --- linux-2.6.10/drivers/serial/8250_early.c 2004-12-24 22:34:33.000000000 +0100 +++ linux-2.6.10_kdbearly/drivers/serial/8250_early.c 2005-03-01 15:13:39.628943456 +0100 @@ -35,6 +35,13 @@ #include #include + +#ifdef CONFIG_KDB +#include + +static int kdb_serial_line = -1; +#endif + struct early_uart_device { struct uart_port port; char options[16]; /* e.g., 115200n8 */ @@ -191,6 +198,31 @@ if ((err = parse_options(device, options)) < 0) return err; + +#ifdef CONFIG_KDB + /* + * Remember the line number of the first serial + * console. We'll make this the kdb serial console too. + */ + if (kdb_serial_line == -1) { + kdb_serial_line = console->index; + kdb_serial.io_type = device->port.iotype; + switch (device->port.iotype) { + case SERIAL_IO_MEM: +#ifdef SERIAL_IO_MEM32 + case SERIAL_IO_MEM32: +#endif + kdb_serial.iobase = (unsigned long)(device->port.membase); + kdb_serial.ioreg_shift = device->port.regshift; + break; + default: + kdb_serial.iobase = device->port.iobase; + kdb_serial.ioreg_shift = 0; + break; + } + } +#endif /* CONFIG_KDB */ + init_port(device); return 0; } --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Mar 2 18:54:09 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 02 Mar 2005 18:54:15 -0800 (PST) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id j232s7kh013246 for ; Wed, 2 Mar 2005 18:54:08 -0800 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 NAA16100 for ; Thu, 3 Mar 2005 13:53:59 +1100 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 73171707F90; Thu, 3 Mar 2005 13:53:59 +1100 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 6FADD1000D3; Thu, 3 Mar 2005 13:53:59 +1100 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 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.11 Date: Thu, 03 Mar 2005 13:53:59 +1100 Message-ID: <9911.1109818439@kao2.melbourne.sgi.com> X-Virus-Scanned: ClamAV 0.83/742/Tue Mar 1 17:05:59 2005 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 923 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. ftp://oss.sgi.com/projects/kdb/download/v4.4/ ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/ Current versions are :- kdb-v4.4-2.6.11-common-1.bz2 kdb-v4.4-2.6.11-i386-1.bz2 kdb-v4.4-2.6.11-ia64-1.bz2 kdb-v4.4-2.6.9-rc2-x86-64-1.bz2 (may or may not work with 2.6.11). Changelog extract since kdb-v4.4-2.6.10-common-1. 2005-03-03 Keith Owens * Add kdb to drivers/serial/8250_early.c. Francois Wellenreiter, Bull. * kdb v4.4-2.6.11-common-1. 2005-02-14 Keith Owens * kdb v4.4-2.6.11-rc4-common-1. 2005-02-08 Keith Owens * kdb v4.4-2.6.11-rc3-bk4-common-1. 2005-02-03 Keith Owens * Print more superblock fields. Nathan Scott, SGI. * Remove kallsyms correction for modules, Linus took it. * kdb v4.4-2.6.11-rc3-common-1. 2005-01-27 Keith Owens * Add bio command. Nathan Scott, SGI. * kdb v4.4-2.6.11-rc2-common-1. 2005-01-20 Keith Owens * Include kallsyms correction for modules until Linus takes it. * kdb v4.4-2.6.11-rc1-bk7-common-1. 2005-01-12 Keith Owens * kallsyms now supports all symbols properly, remove kdb patch. * Add last ditch allocator for debugging. * Update kdb_meminfo_read_proc() for vmalloc changes. * Update kdbm_vm.c for 4 level page tables. * kdb v4.4-2.6.11-rc1-common-1. Changelog extract since kdb-v4.4-2.6.10-i386-1. 2005-03-03 Keith Owens * kdb v4.4-2.6.11-i386-1. 2005-02-14 Keith Owens * kdb v4.4-2.6.11-rc4-i386-1. 2005-02-08 Keith Owens * kdb v4.4-2.6.11-rc3-bk4-i386-1. 2005-02-03 Keith Owens * kdb v4.4-2.6.11-rc3-i386-1. 2005-01-27 Keith Owens * kdb v4.4-2.6.11-rc2-i386-1. 2005-01-12 Keith Owens * kdb v4.4-2.6.11-rc1-i386-1. Changelog extract since kdb v4.4-2.6.10-ia64-1. 2005-03-03 Keith Owens * kdb-v4.4-2.6.11-ia64-1. 2005-02-14 Keith Owens * kdb-v4.4-2.6.11-rc4-ia64-1. 2005-02-08 Keith Owens * kdb-v4.4-2.6.11-rc3-bk4-ia64-1. 2005-02-03 Keith Owens * kdb-v4.4-2.6.11-rc3-ia64-1. 2005-01-27 Keith Owens * kdb-v4.4-2.6.11-rc2-ia64-1. 2005-01-20 Keith Owens * MCA and INIT stacks moved to per-cpu area. * kdb-v4.4-2.6.11-rc1-bk7-ia64-1. 2005-01-12 Keith Owens * ia64_spinlock_contention_pre3_4_end is in base kernel, remove from kdb. * Use last ditch allocator if unwind cannot allocate memory. * kdb-v4.4-2.6.11-rc1-ia64-1. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Exmh version 2.1.1 10/15/1999 iD8DBQFCJnxHi4UHNye0ZOoRAshTAKCusrSfgd19bwX9DaAD50qp1lhPhACgueil PGciCp8r78zXcKJ+CkU2MBE= =zbUH -----END PGP SIGNATURE----- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Mar 2 18:54:46 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 02 Mar 2005 18:54:52 -0800 (PST) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id j232sfMe013262 for ; Wed, 2 Mar 2005 18:54:42 -0800 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 NAA16124 for ; Thu, 3 Mar 2005 13:54:35 +1100 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 9D67F707F90; Thu, 3 Mar 2005 13:54:35 +1100 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 9CC411000D3; Thu, 3 Mar 2005 13:54:35 +1100 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Francois Wellenreiter Cc: kdb@oss.sgi.com Subject: Re: KDB early not working since 2.6.10 on IA-64 In-reply-to: Your message of "Wed, 02 Mar 2005 11:09:31 BST." <422590DB.3080604@bull.net> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 03 Mar 2005 13:54:35 +1100 Message-ID: <9941.1109818475@kao2.melbourne.sgi.com> X-Virus-Scanned: ClamAV 0.83/742/Tue Mar 1 17:05:59 2005 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 924 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, 02 Mar 2005 11:09:31 +0100, Francois Wellenreiter wrote: > Since console configuration have been deeply modified on 2.6.10 >linux kernel, I noticed that enabling "kdb=early" wasn't working well >on my Tiger4 machine. It produced KDB traces on the screen, but keyboard >seemed to be disabled. The following patch may enable this. Thanks, included in kdb-v4.4-2.6.11-common-1. I could not test it, SGI Altix systems do not have 8250 consoles. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Mar 2 22:25:52 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 02 Mar 2005 22:25:58 -0800 (PST) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id j236PoFV026385 for ; Wed, 2 Mar 2005 22:25:51 -0800 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 RAA20261 for ; Thu, 3 Mar 2005 17:25:44 +1100 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 12B32707F90; Thu, 3 Mar 2005 17:25:44 +1100 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 0D9861000D3; Thu, 3 Mar 2005 17:25:44 +1100 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Adrian Caceres Cc: kdb@oss.sgi.com Subject: Re: problems with 2.6.9 kernel In-reply-to: Your message of "Thu, 17 Feb 2005 12:54:54 -0800." <4215049E.5070702@atheros.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 03 Mar 2005 17:25:44 +1100 Message-ID: <18108.1109831144@kao2.melbourne.sgi.com> X-Virus-Scanned: ClamAV 0.83/742/Tue Mar 1 17:05:59 2005 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 925 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, 17 Feb 2005 12:54:54 -0800, Adrian Caceres wrote: >1. I keep getting Debug linux kernel messages when I enter KDB. I am >doing it over >a serial driver: >"Debug: sleeping function called from invalid context at ..." >Most of the time I get to a kdb console but sometimes I hang on an >endless loop: >The stack always seems to indicate the problem comes from >kdb_getarea_size(): Sorry for the delay in replying - not waving, drowning ... You have CONFIG_DEBUG_SPINLOCK_SLEEP=y so the kdb use of __copy_to_user is generating false positives. When kdb uses that function, the parameters are such that the call cannot sleep, but __copy_to_user does not know that. Replace it with __copy_to_user_inatomic. Does this patch fix your problem? Compiled but not tested. Index: linux/include/asm-i386/kdb.h =================================================================== --- linux.orig/include/asm-i386/kdb.h 2005-02-05 13:56:12.000000000 +1100 +++ linux/include/asm-i386/kdb.h 2005-03-03 17:14:04.000000000 +1100 @@ -68,7 +68,7 @@ __kdba_putarea_size(unsigned long to_xxx } set_fs(KERNEL_DS); - r = __copy_to_user((void *)to_xxx, from, size); + r = __copy_to_user_inatomic((void *)to_xxx, from, size); set_fs(oldfs); return r; } @@ -88,19 +88,19 @@ __kdba_getarea_size(void *to, unsigned l set_fs(KERNEL_DS); switch (size) { case 1: - r = __copy_to_user(to, (void *)from_xxx, 1); + r = __copy_to_user_inatomic(to, (void *)from_xxx, 1); break; case 2: - r = __copy_to_user(to, (void *)from_xxx, 2); + r = __copy_to_user_inatomic(to, (void *)from_xxx, 2); break; case 4: - r = __copy_to_user(to, (void *)from_xxx, 4); + r = __copy_to_user_inatomic(to, (void *)from_xxx, 4); break; case 8: - r = __copy_to_user(to, (void *)from_xxx, 8); + r = __copy_to_user_inatomic(to, (void *)from_xxx, 8); break; default: - r = __copy_to_user(to, (void *)from_xxx, size); + r = __copy_to_user_inatomic(to, (void *)from_xxx, size); break; } set_fs(oldfs); --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From bjorn.helgaas@hp.com Thu Mar 3 10:02:58 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 03 Mar 2005 10:03:02 -0800 (PST) Received: from atlrel9.hp.com (atlrel9.hp.com [156.153.255.214]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j23I2vgp013161 for ; Thu, 3 Mar 2005 10:02:58 -0800 Received: from smtp2.fc.hp.com (smtp.fc.hp.com [15.15.136.253]) by atlrel9.hp.com (Postfix) with ESMTP id C7A0F2CB; Fri, 4 Mar 2005 14:25:45 -0500 (EST) Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.11.146.30]) by smtp2.fc.hp.com (Postfix) with ESMTP id ADEB741E160; Thu, 3 Mar 2005 11:02:50 -0700 (MST) Received: from localhost (localhost [127.0.0.1]) by ldl.fc.hp.com (Postfix) with ESMTP id 8AF081341DD; Thu, 3 Mar 2005 11:02:50 -0700 (MST) Received: from ldl.fc.hp.com ([127.0.0.1]) by localhost (ldl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10610-03; Thu, 3 Mar 2005 11:02:49 -0700 (MST) Received: from eeyore.helgaas (lart.fc.hp.com [15.11.146.31]) by ldl.fc.hp.com (Postfix) with ESMTP id 8AEAF1341DB; Thu, 3 Mar 2005 11:02:49 -0700 (MST) Subject: Re: Announce: kdb v4.4 is available for kernel 2.6.11 From: Bjorn Helgaas To: Keith Owens Cc: kdb@oss.sgi.com In-Reply-To: <9911.1109818439@kao2.melbourne.sgi.com> References: <9911.1109818439@kao2.melbourne.sgi.com> Content-type: text/plain Date: Thu, 03 Mar 2005 11:02:49 -0700 Message-Id: <1109872969.15678.8.camel@eeyore> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV 0.83/743/Wed Mar 2 16:02:05 2005 on oss.sgi.com X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ldl.fc.hp.com X-Virus-Status: Clean X-archive-position: 926 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: bjorn.helgaas@hp.com Precedence: bulk X-list: kdb On Thu, 2005-03-03 at 13:53 +1100, Keith Owens wrote: > KDB (Linux Kernel Debugger) has been updated. > > ftp://oss.sgi.com/projects/kdb/download/v4.4/ > ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/ > > Current versions are :- > > kdb-v4.4-2.6.11-common-1.bz2 > kdb-v4.4-2.6.11-i386-1.bz2 > kdb-v4.4-2.6.11-ia64-1.bz2 > kdb-v4.4-2.6.9-rc2-x86-64-1.bz2 (may or may not work with 2.6.11). The patch adds a couple SERIAL_IO_MEM32 references, but I don't see anywhere it can be defined. Is it obsolete? --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Thu Mar 3 12:42:56 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 03 Mar 2005 12:43:01 -0800 (PST) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id j23KgsGp031870 for ; Thu, 3 Mar 2005 12:42:55 -0800 Received: from mail.ocs.com.au (pc-kao2.melbourne.sgi.com [134.14.52.228]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id HAA06273 for ; Fri, 4 Mar 2005 07:42:46 +1100 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id BB7171800A3; Fri, 4 Mar 2005 07:42:37 +1100 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id 77BCB70010B; Fri, 4 Mar 2005 07:42:37 +1100 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id 747301000D3; Fri, 4 Mar 2005 07:42:37 +1100 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Bjorn Helgaas Cc: kdb@oss.sgi.com Subject: Re: Announce: kdb v4.4 is available for kernel 2.6.11 In-reply-to: Your message of "Thu, 03 Mar 2005 11:02:49 PDT." <1109872969.15678.8.camel@eeyore> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 04 Mar 2005 07:42:37 +1100 Message-ID: <18075.1109882557@ocs3.ocs.com.au> X-Virus-Scanned: ClamAV 0.83/743/Wed Mar 2 16:02:05 2005 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 927 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, 03 Mar 2005 11:02:49 -0700, Bjorn Helgaas wrote: >On Thu, 2005-03-03 at 13:53 +1100, Keith Owens wrote: >> KDB (Linux Kernel Debugger) has been updated. >> >> ftp://oss.sgi.com/projects/kdb/download/v4.4/ >> ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/ >> >> Current versions are :- >> >> kdb-v4.4-2.6.11-common-1.bz2 >> kdb-v4.4-2.6.11-i386-1.bz2 >> kdb-v4.4-2.6.11-ia64-1.bz2 >> kdb-v4.4-2.6.9-rc2-x86-64-1.bz2 (may or may not work with 2.6.11). > >The patch adds a couple SERIAL_IO_MEM32 references, but I don't see >anywhere it can be defined. Is it obsolete? SERIAL_IO_MEM32 was added to kdb in kdb-v4.0-2.4.19-xscale-0.2 and kdb-v4.3-2.4.20-common-1. Eddie Dong at Intel wanted it for xscale. I don't know if it is still required, I have not received any xscale patches for a long time. In any case, it is wrapped by #ifdef, so it only bloats the source, not the binary. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From cleciokso_674g@mail.com Fri Mar 4 11:33:56 2005 Received: with ECARTIS (v1.0.0; list kdb); Fri, 04 Mar 2005 11:34:03 -0800 (PST) Received: from smtp.uol.com.br (smtpout1.uol.com.br [200.221.4.192]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j24JXukk004786 for ; Fri, 4 Mar 2005 11:33:56 -0800 Received: from jo (201009086212.user.veloxzone.com.br [201.9.86.212]) by scorpion1.uol.com.br (Postfix) with ESMTP id 428F28DCF for ; Fri, 4 Mar 2005 16:33:49 -0300 (BRT) To: kdb@oss.sgi.com From: cleciokso_674g@mail.com Subject: emails para mala direta segmentada por classe social Date: Fri, 04 Mar 2005 16:33:31 -0300 MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-Id: <20050304193349.428F28DCF@scorpion1.uol.com.br> X-Virus-Scanned: ClamAV 0.83/745/Fri Mar 4 03:16:06 2005 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 928 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: cleciokso_674g@mail.com Precedence: bulk X-list: kdb listas de e-mails por estados Mala direta via email e Criação de Sites programas de envio e captura de e-mails atualizados: http://www.gueb.de/segmails emails para mala direta segmentada por classe social listas de e-mails por estados Mala direta via email e Criação de Sites emails para mala direta segmentada por sexo Mala direta via email e Criação de Sites listas de e-mails por estados Mala direta via email e Criação de Sites emails para mala direta segmentada por classe social: http://www.gueb.de/segmails listas de e-mails por estados Mala direta via email e Criação de Sites programas de envio e captura de e-mails atualizados emails para mala direta segmentada por sexo programas de envio e captura de e-mails atualizados Mala Direta - Divulgamail Email emails lista de e-mails emails para mala direta segmentada por classe social listas de e-mails por estados programas de envio e captura de e-mails atualizados emails para mala direta segmentada por classe social Mala Direta - Divulgamail Email emails lista de e-mails programas de envio e captura de e-mails atualizados listas de e-mails por estados: http://www.gueb.de/segmails --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Mon Mar 14 13:13:17 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 14 Mar 2005 13:13:22 -0800 (PST) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id j2ELDCdo020790 for ; Mon, 14 Mar 2005 13:13:13 -0800 Received: from mail.ocs.com.au (pc-kao2.melbourne.sgi.com [134.14.52.228]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id IAA10147 for ; Tue, 15 Mar 2005 08:13:04 +1100 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 2B92D18008D; Tue, 15 Mar 2005 08:13:00 +1100 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id 0727270010B; Tue, 15 Mar 2005 08:13:00 +1100 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id 03C2A1000CC; Tue, 15 Mar 2005 08:13:00 +1100 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: "LIAO, GUANGDENG" Cc: kdb@oss.sgi.com, cgllinux@sjtu.edu.cn Subject: Re: Why the rmmod command removed from 2.6 kernel? In-reply-to: Your message of "Sat, 12 Mar 2005 21:00:08 +0800." <26F44F810A51DF42A127BC2A06BE185E657922@pdsmsx404> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 15 Mar 2005 08:12:59 +1100 Message-ID: <30255.1110834779@ocs3.ocs.com.au> X-Virus-Scanned: ClamAV 0.83/762/Sun Mar 13 15:35:33 2005 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 929 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 Sat, 12 Mar 2005 21:00:08 +0800, "LIAO, GUANGDENG" wrote: >Why the command rmmod is removed from the KDB patch for 2.6 kernel? >Because I know that it exists in the patch for 2.4 kernel. Rusty rewrote the module loader in 2.6, the kdb rmmod command was disabled during that rewrite. The new rmmod tries to stop the system and wait for the refcount to go to zero. That is not going to work with kdb, because kdb has already stopped the system. Trying to rmmod from kdb is almost guaranteed to deadlock. So I never added kdb rmmod back for 2.6. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jfv@bluesong.net Tue Mar 15 17:06:37 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 15 Mar 2005 17:06:44 -0800 (PST) Received: from trane.bluesong.net (bdsl.66.13.29.10.gte.net [66.13.29.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j2G16ZO1001463 for ; Tue, 15 Mar 2005 17:06:36 -0800 Received: by trane.bluesong.net (Postfix, from userid 500) id 358EB241B91; Tue, 15 Mar 2005 17:06:30 -0800 (PST) Date: Tue, 15 Mar 2005 17:06:30 -0800 From: Jack F Vogel To: kdb@oss.sgi.com Cc: jfv@us.ibm.com, lcm@us.ibm.com Subject: PATCH: 2.6.11 i386 changes to use notify callback interface Message-ID: <20050316010630.GA24592@trane.bluesong.net> Reply-To: jfv@bluesong.net Mime-Version: 1.0 Content-type: text/plain Content-Disposition: inline User-Agent: Mutt/1.5.6i X-Virus-Scanned: ClamAV 0.83/762/Sun Mar 13 15:35:33 2005 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 930 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 This is an experimental patch that I did to switch the i386 kernel to use notify_die(), it is based on the x86_64 version that I wrote. This patch is designed to apply over the top of the common and i386 2.6.11 patches. From my point of view the goal is to reduce KDB source intrusion to minimal in the main kernel source, and this patch takes a step in that direction, it is by no means complete. I have built, booted, and minimally tested this, it needs more testing, but I thought I'd give it to you Keith to polish and tweak to your own tastes. Cheers, Jack -- Attached file included as plaintext by Ecartis -- diff -Naur linux-2.6.11/arch/i386/kdb/kdbasupport.c linux-2.6.11-jfv/arch/i386/kdb/kdbasupport.c --- linux-2.6.11/arch/i386/kdb/kdbasupport.c 2005-03-15 03:53:52.000000000 -0800 +++ linux-2.6.11-jfv/arch/i386/kdb/kdbasupport.c 2005-03-15 03:28:34.000000000 -0800 @@ -20,7 +20,7 @@ #include #include #include - +#include #include #include #include @@ -1434,6 +1434,54 @@ } /* + * kdba_entry + * + * This is the interface routine between + * the notifier die_chain and kdb + */ +static int kdba_entry( struct notifier_block *b, unsigned long val, void *v) +{ + struct die_args *args = v; + int err, trap, ret = 0; + struct pt_regs *regs; + + regs = args->regs; + err = args->err; + trap = args->trapnr; + switch (val){ +#if defined(CONFIG_SMP) + case DIE_NMI_IPI: + ret = kdb_ipi(regs, NULL); + break; +#endif + case DIE_OOPS: + ret = kdb(KDB_REASON_OOPS, err, regs); + break; + case DIE_CALL: + ret = kdb(KDB_REASON_ENTER, err, regs); + break; + case DIE_DEBUG: + ret = kdb(KDB_REASON_DEBUG, err, regs); + break; + case DIE_TRAP: + if (trap == 3) // breakpoint + ret = kdb(KDB_REASON_BREAK, err, regs); + // falls thru + default: + break; + } + return (ret ? NOTIFY_BAD : NOTIFY_DONE); +} + +/* + * notifier block for kdb entry + */ +static struct notifier_block kdba_notifier = { + .notifier_call = kdba_entry +}; + + +/* * kdba_init * * Architecture specific initialization. @@ -1454,7 +1502,7 @@ kdba_enable_lbr(); kdb_register("pt_regs", kdba_pt_regs, "address", "Format struct pt_regs", 0); kdb_register("stackdepth", kdba_stackdepth, "[percentage]", "Print processes using >= stack percentage", 0); - + notifier_chain_register(&i386die_chain, &kdba_notifier); return; } diff -Naur linux-2.6.11/arch/i386/kernel/entry.S linux-2.6.11-jfv/arch/i386/kernel/entry.S --- linux-2.6.11/arch/i386/kernel/entry.S 2005-03-15 03:53:52.000000000 -0800 +++ linux-2.6.11-jfv/arch/i386/kernel/entry.S 2005-03-14 06:42:01.000000000 -0800 @@ -147,17 +147,15 @@ popl %eax jmp syscall_exit -#if defined(CONFIG_KDB) -ENTRY(kdb_call) +ENTRY(call_debug) pushl %eax # save orig EAX SAVE_ALL pushl %esp # struct pt_regs pushl $0 # error_code - pushl $7 # KDB_REASON_ENTRY - call kdb + pushl $7 # REASON_ENTRY + call do_call_debug addl $12,%esp # remove args jmp restore_all -#endif /* * Return to user mode is not as complex as all this looks, diff -Naur linux-2.6.11/arch/i386/kernel/i8259.c linux-2.6.11-jfv/arch/i386/kernel/i8259.c --- linux-2.6.11/arch/i386/kernel/i8259.c 2005-03-15 03:53:52.000000000 -0800 +++ linux-2.6.11-jfv/arch/i386/kernel/i8259.c 2005-03-15 02:55:46.000000000 -0800 @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -404,11 +405,7 @@ int vector = FIRST_EXTERNAL_VECTOR + i; if (i >= NR_IRQS) break; -#ifdef CONFIG_KDB - if (vector == KDBENTER_VECTOR) - continue; -#endif - if (vector != SYSCALL_VECTOR) + if (vector != SYSCALL_VECTOR && vector != KDB_VECTOR) set_intr_gate(vector, interrupt[i]); } diff -Naur linux-2.6.11/arch/i386/kernel/io_apic.c linux-2.6.11-jfv/arch/i386/kernel/io_apic.c --- linux-2.6.11/arch/i386/kernel/io_apic.c 2005-03-15 03:53:52.000000000 -0800 +++ linux-2.6.11-jfv/arch/i386/kernel/io_apic.c 2005-03-15 02:52:59.000000000 -0800 @@ -27,9 +27,6 @@ #include #include #include -#ifdef CONFIG_KDB -#include -#endif /* CONFIG_KDB */ #include #include #include @@ -1141,10 +1138,6 @@ current_vector += 8; if (current_vector == SYSCALL_VECTOR) goto next; -#ifdef CONFIG_KDB - if (current_vector == KDBENTER_VECTOR) - goto next; -#endif /* CONFIG_KDB */ if (current_vector >= FIRST_SYSTEM_VECTOR) { offset++; diff -Naur linux-2.6.11/arch/i386/kernel/nmi.c linux-2.6.11-jfv/arch/i386/kernel/nmi.c --- linux-2.6.11/arch/i386/kernel/nmi.c 2005-03-01 23:38:10.000000000 -0800 +++ linux-2.6.11-jfv/arch/i386/kernel/nmi.c 2005-03-15 03:08:29.000000000 -0800 @@ -31,6 +31,7 @@ #include #include #include +#include #include "mach_traps.h" @@ -491,8 +492,13 @@ * wait a few IRQs (5 seconds) before doing the oops ... */ alert_counter[cpu]++; - if (alert_counter[cpu] == 5*nmi_hz) + if (alert_counter[cpu] == 5*nmi_hz) { + if (notify_die(DIE_NMI, "nmi", regs, 0, 2, SIGINT) == NOTIFY_BAD) { + alert_counter[cpu] = 0; + return; + } die_nmi(regs, "NMI Watchdog detected LOCKUP"); + } } else { last_irq_sums[cpu] = sum; alert_counter[cpu] = 0; diff -Naur linux-2.6.11/arch/i386/kernel/smp.c linux-2.6.11-jfv/arch/i386/kernel/smp.c --- linux-2.6.11/arch/i386/kernel/smp.c 2005-03-15 03:53:52.000000000 -0800 +++ linux-2.6.11-jfv/arch/i386/kernel/smp.c 2005-03-15 02:45:22.000000000 -0800 @@ -25,6 +25,7 @@ #include #include +#include #ifdef CONFIG_KDB #include #endif /* CONFIG_KDB */ diff -Naur linux-2.6.11/arch/i386/kernel/traps.c linux-2.6.11-jfv/arch/i386/kernel/traps.c --- linux-2.6.11/arch/i386/kernel/traps.c 2005-03-15 03:53:52.000000000 -0800 +++ linux-2.6.11-jfv/arch/i386/kernel/traps.c 2005-03-15 03:36:16.000000000 -0800 @@ -61,9 +61,6 @@ #include "mach_traps.h" asmlinkage int system_call(void); -#ifdef CONFIG_KDB -asmlinkage int kdb_call(void); -#endif /* CONFIG_KDB */ struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; @@ -100,6 +97,7 @@ asmlinkage void alignment_check(void); asmlinkage void spurious_interrupt_bug(void); asmlinkage void machine_check(void); +asmlinkage void call_debug(void); static int kstack_depth_to_print = 24; struct notifier_block *i386die_chain; @@ -350,10 +348,6 @@ bust_spinlocks(0); die.lock_owner = -1; spin_unlock_irq(&die.lock); -#ifdef CONFIG_KDB - kdb_diemsg = str; - kdb(KDB_REASON_OOPS, err, regs); -#endif /* CONFIG_KDB */ if (in_interrupt()) panic("Fatal exception in interrupt"); @@ -455,7 +449,7 @@ } DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->eip) -#if !defined(CONFIG_KPROBES) && !defined(CONFIG_KDB) +#if !defined(CONFIG_KPROBES) DO_VM86_ERROR( 3, SIGTRAP, "int3", int3) #endif DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow) @@ -551,9 +545,6 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs) { -#ifdef CONFIG_KDB - (void)kdb(KDB_REASON_NMI, reason, regs); -#endif /* CONFIG_KDB */ #ifdef CONFIG_MCA /* Might actually be able to figure out what the guilty party * is. */ @@ -583,9 +574,6 @@ smp_processor_id(), regs->eip); show_registers(regs); printk("console shuts up ...\n"); -#ifdef CONFIG_KDB - kdb(KDB_REASON_NMI, 0, regs); -#endif /* CONFIG_KDB */ console_silent(); spin_unlock(&nmi_print_lock); bust_spinlocks(0); @@ -600,16 +588,6 @@ if (!smp_processor_id()) reason = get_nmi_reason(); -#if defined(CONFIG_SMP) && defined(CONFIG_KDB) - /* - * Call the kernel debugger to see if this NMI is due - * to an KDB requested IPI. If so, kdb will handle it. - */ - if (kdb_ipi(regs, NULL)) { - return; - } -#endif /* defined(CONFIG_SMP) && defined(CONFIG_KDB) */ - if (!(reason & 0xc0)) { if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) == NOTIFY_STOP) @@ -715,11 +693,6 @@ __asm__ __volatile__("movl %%db6,%0" : "=r" (condition)); -#ifdef CONFIG_KDB - if (kdb(KDB_REASON_DEBUG, error_code, regs)) - return; -#endif /* CONFIG_KDB */ - if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, SIGTRAP) == NOTIFY_STOP) return; @@ -782,16 +755,6 @@ return; } -#ifdef CONFIG_KDB -fastcall void do_int3(struct pt_regs * regs, long error_code) -{ - if (kdb(KDB_REASON_BREAK, error_code, regs)) - return; - do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL); -} -#endif /* CONFIG_KDB */ - - /* * Note that we play around with the 'TS' bit in an attempt to get * the correct behaviour even in the presence of the asynchronous @@ -1085,14 +1048,13 @@ set_trap_gate(19,&simd_coprocessor_error); set_system_gate(SYSCALL_VECTOR,&system_call); -#ifdef CONFIG_KDB kdb_enablehwfault(); + /* * A trap gate, used by the kernel to enter the * debugger, preserving all registers. */ - set_trap_gate(KDBENTER_VECTOR, &kdb_call); -#endif /* CONFIG_KDB */ + set_trap_gate(KDB_VECTOR, call_debug); /* * Should be a barrier for any external CPU state. @@ -1101,3 +1063,9 @@ trap_init_hook(); } + +void do_call_debug(struct pt_regs *regs) +{ + notify_die(DIE_CALL, "debug call", regs, 0, 255, SIGINT); +} + diff -Naur linux-2.6.11/include/asm-i386/kdb.h linux-2.6.11-jfv/include/asm-i386/kdb.h --- linux-2.6.11/include/asm-i386/kdb.h 2005-03-15 03:53:52.000000000 -0800 +++ linux-2.6.11-jfv/include/asm-i386/kdb.h 2005-03-15 02:47:40.000000000 -0800 @@ -17,7 +17,7 @@ * is intended to be used from interrupt level, it must use * a non-maskable entry method. */ -#define KDB_ENTER() do {if (kdb_on && !KDB_IS_RUNNING()) { asm("\tint $129\n"); }} while(0) +#define KDB_ENTER() do {if (kdb_on && !KDB_IS_RUNNING()) { asm("\tint $249\n"); }} while(0) /* * Needed for exported symbols. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From olh@suse.de Mon Mar 21 10:52:43 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 21 Mar 2005 10:52:49 -0800 (PST) Received: from mail.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j2LIqgDN021151 for ; Mon, 21 Mar 2005 10:52:42 -0800 Date: Mon, 21 Mar 2005 19:52:33 +0100 From: Olaf Hering To: Keith Owens , kdb@oss.sgi.com Subject: binary garbage in kdb md output Message-ID: <20050321185233.GA7525@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) X-Virus-Scanned: ClamAV 0.83/778/Mon Mar 21 02:48:43 2005 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 931 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 Keith, what do you see with this testapp? I get an ugly dotted square, which usually confuses copy&paste into a bugzilla. Also the mirroring between various bugzilla screws it up even more. All output should be either plain ASCII or UTF-8. I'm sure kdb should not care about any locale other than ASCII, so its better to just mask the non-printable bytes. #include int main(void) { unsigned char buf[2]; buf[0] = 0xc0; buf[1] = '\0'; printf("%s\n", buf); return 0; } The kernel considers 0xc0-0xff as printable chars, this leads to binary garbage. Just mask it to ASCII. Signed-off-by: Olaf Hering Index: linux-2.6.5/kdb/kdbmain.c =================================================================== --- linux-2.6.5.orig/kdb/kdbmain.c +++ linux-2.6.5/kdb/kdbmain.c @@ -2091,7 +2091,7 @@ kdb_md_line(const char *fmtstr, kdb_mach cp = wc.c; #endif wc.word = word; -#define printable_char(c) ({unsigned char __c = c; isprint(__c) ? __c : '.';}) +#define printable_char(c) ({unsigned char __c = toascii(c); isalnum(__c) ? __c : '.';}) switch (bytesperword) { case 8: *c++ = printable_char(*cp++); --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Mon Mar 21 13:09:04 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 21 Mar 2005 13:09:09 -0800 (PST) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id j2LL91Oi005074 for ; Mon, 21 Mar 2005 13:09:02 -0800 Received: from mail.ocs.com.au (pc-kao2.melbourne.sgi.com [134.14.52.228]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id IAA15283 for ; Tue, 22 Mar 2005 08:08:50 +1100 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 4D6A618008D; Tue, 22 Mar 2005 08:08:45 +1100 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id E9A81707F94; Tue, 22 Mar 2005 08:08:44 +1100 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id E63201000CB; Tue, 22 Mar 2005 08:08:44 +1100 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Olaf Hering Cc: kdb@oss.sgi.com Subject: Re: binary garbage in kdb md output In-reply-to: Your message of "Mon, 21 Mar 2005 19:52:33 BST." <20050321185233.GA7525@suse.de> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 22 Mar 2005 08:08:44 +1100 Message-ID: <28034.1111439324@ocs3.ocs.com.au> X-Virus-Scanned: ClamAV 0.83/778/Mon Mar 21 02:48:43 2005 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-archive-position: 932 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, 21 Mar 2005 19:52:33 +0100, Olaf Hering wrote: >Keith, > >what do you see with this testapp? I get an ugly dotted square, which >usually confuses copy&paste into a bugzilla. Also the mirroring between >various bugzilla screws it up even more. All output should be either >plain ASCII or UTF-8. I'm sure kdb should not care about any locale >other than ASCII, so its better to just mask the non-printable bytes. > >#include >int main(void) >{ > unsigned char buf[2]; > buf[0] = 0xc0; > buf[1] = '\0'; > printf("%s\n", buf); > return 0; >} > > > > >The kernel considers 0xc0-0xff as printable chars, this leads to >binary garbage. Just mask it to ASCII. > >Signed-off-by: Olaf Hering > >Index: linux-2.6.5/kdb/kdbmain.c >=================================================================== >--- linux-2.6.5.orig/kdb/kdbmain.c >+++ linux-2.6.5/kdb/kdbmain.c >@@ -2091,7 +2091,7 @@ kdb_md_line(const char *fmtstr, kdb_mach > cp = wc.c; > #endif > wc.word = word; >-#define printable_char(c) ({unsigned char __c = c; isprint(__c) ? __c : '.';}) >+#define printable_char(c) ({unsigned char __c = toascii(c); isalnum(__c) ? __c : '.';}) > switch (bytesperword) { > case 8: > *c++ = printable_char(*cp++); > A better question is why the kernel considers characters above 0x80 to be printable. kdb, like other parts of the kernel, uses the standard function isprint(). I can change kdb to do 'isascii(c) && isprint(c)' which will restrict kdb to characters below 0x80, but the rest of the kernel will still treat characters above 0x80 as printable. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.