From owner-kdb@oss.sgi.com Sun Sep 16 02:41:14 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8G9fEo02590 for kdb-outgoing; Sun, 16 Sep 2001 02:41:14 -0700 Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.101]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8G9fBe02586 for ; Sun, 16 Sep 2001 02:41:11 -0700 Received: from northrelay03.pok.ibm.com (northrelay03.pok.ibm.com [9.117.200.23]) by e1.ny.us.ibm.com (8.9.3/8.9.3) with ESMTP id FAA146388 for ; Sun, 16 Sep 2001 05:38:47 -0400 Received: from bharata.in.ibm.com (bharata.in.ibm.com [9.186.133.24]) by northrelay03.pok.ibm.com (8.11.1m3/NCO v4.98) with ESMTP id f8G9Z2k99504 for ; Sun, 16 Sep 2001 05:35:03 -0400 Received: (from bharata@localhost) by bharata.in.ibm.com (8.11.2/8.11.2) id f8G9fi317720 for kdb@oss.sgi.com; Sun, 16 Sep 2001 15:11:44 +0530 Date: Sun, 16 Sep 2001 15:11:44 +0530 From: Bharata B Rao To: kdb@oss.sgi.com Subject: [PATCH] Calling kdb from DProbes. Message-ID: <20010916151144.A17603@in.ibm.com> Reply-To: bharata@in.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-kdb@oss.sgi.com Precedence: bulk Keith, Here is a small patch(a one line change) to kdb/kdbmain.c(v1.8, kernel 2.4.9) of to enable kdb to be called from DProbes. Presently, when kdb is called with KDB_REASON_CALL, it builds its own register frame. Here it is changed to do so only if no frame is supplied to kdb() and use the frame if it is supplied to kdb(). By doing this, DProbes (or any other facililty) can invoke kdb by supplying its own registers and obtain required backtrace inside kdb. If you find this ok, could you please incorporate this in your next releases, so that future versions of DProbes can make use of exit to kdb facility. Regards, Bharata. -- Bharata B Rao, IBM Linux Technology Center, IBM Software Lab, Bangalore. Ph: 91-80-5262355 Ex: 3962 Mail: bharata@in.ibm.com --- kdbmain.c Sun Sep 16 11:50:31 2001 +++ kdbmain.c.regs Sun Sep 16 13:09:30 2001 @@ -790,7 +790,8 @@ case KDB_REASON_SWITCH: kdb_printf("due to cpu switch\n"); break; - case KDB_REASON_CALL: /* drop through */ + case KDB_REASON_CALL: + if (ef) break; /* drop through if regs is not specified */ case KDB_REASON_PANIC: if (reason == KDB_REASON_CALL) kdb_printf("due to direct function call\n"); From owner-kdb@oss.sgi.com Mon Sep 17 00:34:16 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8H7YGR29248 for kdb-outgoing; Mon, 17 Sep 2001 00:34:16 -0700 Received: from ns.caldera.de (ns.caldera.de [212.34.180.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8H7YDe29245 for ; Mon, 17 Sep 2001 00:34:14 -0700 Received: (from hch@localhost) by ns.caldera.de (8.11.1/8.11.1) id f8H7XIi17862; Mon, 17 Sep 2001 09:33:18 +0200 Date: Mon, 17 Sep 2001 09:33:18 +0200 From: Christoph Hellwig To: kaos@ocs.com.au Cc: kdb@oss.sgi.com Subject: [PATCH] fix kdb compilation Message-ID: <20010917093318.A17697@caldera.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-kdb@oss.sgi.com Precedence: bulk Hi Keith, The attached patch fixes the cmpilation of kdb in my enviroment, in fact I can't see where ATTRIBUTE_UNUSED might be defined elsewhere. I have in my tree for ages and I think it should really become part of the official tree :) Christoph -- Of course it doesn't work. We've performed a software upgrade. --- arch/i386/kdb/i386-dis.c~ Wed Jul 25 15:20:28 2001 +++ arch/i386/kdb/i386-dis.c Wed Jul 25 15:20:53 2001 @@ -54,6 +54,10 @@ #include #endif +#ifndef ATTRIBUTE_UNUSED +#define ATTRIBUTE_UNUSED +#endif + #ifndef UNIXWARE_COMPAT /* Set non-zero for broken, compatible instructions. Set to zero for non-broken opcodes. */ From owner-kdb@oss.sgi.com Mon Sep 17 01:24:55 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8H8Otc30098 for kdb-outgoing; Mon, 17 Sep 2001 01:24:55 -0700 Received: from mail.ocs.com.au (ppp0.ocs.com.au [203.34.97.3]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8H8Oqe30095 for ; Mon, 17 Sep 2001 01:24:52 -0700 Received: (qmail 28442 invoked from network); 17 Sep 2001 08:24:48 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 17 Sep 2001 08:24:48 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id 4E643300095; Mon, 17 Sep 2001 18:23:52 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 3AC2D98; Mon, 17 Sep 2001 18:23:52 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Christoph Hellwig Cc: kdb@oss.sgi.com Subject: Re: [PATCH] fix kdb compilation In-reply-to: Your message of "Mon, 17 Sep 2001 09:33:18 +0200." <20010917093318.A17697@caldera.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 17 Sep 2001 18:23:47 +1000 Message-ID: <2149.1000715027@ocs3.intra.ocs.com.au> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, 17 Sep 2001 09:33:18 +0200, Christoph Hellwig wrote: >The attached patch fixes the cmpilation of kdb in my enviroment, >in fact I can't see where ATTRIBUTE_UNUSED might be defined elsewhere. It is defined in /usr/include/ansidecl.h in any recent binutils. Upgrade your binutils. From owner-kdb@oss.sgi.com Mon Sep 17 01:42:04 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8H8g4L30358 for kdb-outgoing; Mon, 17 Sep 2001 01:42:04 -0700 Received: from ns.caldera.de (ns.caldera.de [212.34.180.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8H8g1e30355 for ; Mon, 17 Sep 2001 01:42:02 -0700 Received: (from hch@localhost) by ns.caldera.de (8.11.1/8.11.1) id f8H8f7v24034; Mon, 17 Sep 2001 10:41:07 +0200 Date: Mon, 17 Sep 2001 10:41:07 +0200 From: Christoph Hellwig To: Keith Owens Cc: Christoph Hellwig , kdb@oss.sgi.com Subject: Re: [PATCH] fix kdb compilation Message-ID: <20010917104107.A23758@caldera.de> References: <20010917093318.A17697@caldera.de> <2149.1000715027@ocs3.intra.ocs.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <2149.1000715027@ocs3.intra.ocs.com.au>; from kaos@ocs.com.au on Mon, Sep 17, 2001 at 06:23:47PM +1000 Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, Sep 17, 2001 at 06:23:47PM +1000, Keith Owens wrote: > On Mon, 17 Sep 2001 09:33:18 +0200, > Christoph Hellwig wrote: > >The attached patch fixes the cmpilation of kdb in my enviroment, > >in fact I can't see where ATTRIBUTE_UNUSED might be defined elsewhere. > > It is defined in /usr/include/ansidecl.h in any recent binutils. > Upgrade your binutils. [hch@ns]$ ld -v GNU ld version 2.10.91 (with BFD 2.10.1.0.4) Doesn't look that old.. i386-dis.c doesn't include ansidecl.h anyway. Christoph -- Of course it doesn't work. We've performed a software upgrade. From owner-kdb@oss.sgi.com Mon Sep 17 01:47:19 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8H8lJA30452 for kdb-outgoing; Mon, 17 Sep 2001 01:47:19 -0700 Received: from mail.ocs.com.au (ppp0.ocs.com.au [203.34.97.3]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8H8lGe30449 for ; Mon, 17 Sep 2001 01:47:16 -0700 Received: (qmail 28717 invoked from network); 17 Sep 2001 08:47:14 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 17 Sep 2001 08:47:13 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id BE313300095; Mon, 17 Sep 2001 18:46:18 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 8BB6798; Mon, 17 Sep 2001 18:46:18 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Christoph Hellwig Cc: kdb@oss.sgi.com Subject: Re: [PATCH] fix kdb compilation In-reply-to: Your message of "Mon, 17 Sep 2001 10:41:07 +0200." <20010917104107.A23758@caldera.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 17 Sep 2001 18:46:13 +1000 Message-ID: <2410.1000716373@ocs3.intra.ocs.com.au> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, 17 Sep 2001 10:41:07 +0200, Christoph Hellwig wrote: >GNU ld version 2.10.91 (with BFD 2.10.1.0.4) Mine says GNU ld version 2.10.91 (with BFD 2.10.91.0.2) >i386-dis.c doesn't include ansidecl.h anyway. It is included via bfd.h. From owner-kdb@oss.sgi.com Mon Sep 17 01:54:39 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8H8sdS30597 for kdb-outgoing; Mon, 17 Sep 2001 01:54:39 -0700 Received: from ns.caldera.de (ns.caldera.de [212.34.180.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8H8sbe30594 for ; Mon, 17 Sep 2001 01:54:37 -0700 Received: (from hch@localhost) by ns.caldera.de (8.11.1/8.11.1) id f8H8rog25614; Mon, 17 Sep 2001 10:53:50 +0200 Date: Mon, 17 Sep 2001 10:53:50 +0200 From: Christoph Hellwig To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: [PATCH] fix kdb compilation Message-ID: <20010917105350.C23758@caldera.de> References: <20010917104107.A23758@caldera.de> <2410.1000716373@ocs3.intra.ocs.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <2410.1000716373@ocs3.intra.ocs.com.au>; from kaos@ocs.com.au on Mon, Sep 17, 2001 at 06:46:13PM +1000 Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, Sep 17, 2001 at 06:46:13PM +1000, Keith Owens wrote: > On Mon, 17 Sep 2001 10:41:07 +0200, > Christoph Hellwig wrote: > >GNU ld version 2.10.91 (with BFD 2.10.1.0.4) > > Mine says GNU ld version 2.10.91 (with BFD 2.10.91.0.2) The version required by Linux itself is 2.9.1.0.25, so could you please either apply the patch (preffered) or write down somewhere what exactly the binutils requirement for kdb is? > > >i386-dis.c doesn't include ansidecl.h anyway. > > It is included via bfd.h. Ups, yes. Not that I think including user headers is a good idea. Christoph -- Of course it doesn't work. We've performed a software upgrade. From owner-kdb@oss.sgi.com Mon Sep 17 02:07:37 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8H97b430890 for kdb-outgoing; Mon, 17 Sep 2001 02:07:37 -0700 Received: from mail.ocs.com.au (ppp0.ocs.com.au [203.34.97.3]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8H97Ye30884 for ; Mon, 17 Sep 2001 02:07:34 -0700 Received: (qmail 28933 invoked from network); 17 Sep 2001 09:07:31 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 17 Sep 2001 09:07:31 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id 8A81D300095; Mon, 17 Sep 2001 19:06:33 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id AF59C98; Mon, 17 Sep 2001 19:06:33 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Christoph Hellwig Cc: kdb@oss.sgi.com Subject: Re: [PATCH] fix kdb compilation In-reply-to: Your message of "Mon, 17 Sep 2001 10:53:50 +0200." <20010917105350.C23758@caldera.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 17 Sep 2001 19:06:28 +1000 Message-ID: <2678.1000717588@ocs3.intra.ocs.com.au> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, 17 Sep 2001 10:53:50 +0200, Christoph Hellwig wrote: >The version required by Linux itself is 2.9.1.0.25, so could >you please either apply the patch (preffered) or write down >somewhere what exactly the binutils requirement for kdb is? You need at least GNU ld version 2.9.5 (with BFD 2.9.5.0.22) for kdb, that is the minimum level I develop on. kdb uses bfd definitions which do not exist before that version, it is not just ATTRIBUTE_UNUSED, there are other declarations as well. Even binutils 2.9.5 defines ATTRIBUTE_UNUSED in ansidecl.h. #ifndef ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* ATTRIBUTE_UNUSED */ From owner-kdb@oss.sgi.com Mon Sep 17 02:42:00 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8H9g0H31697 for kdb-outgoing; Mon, 17 Sep 2001 02:42:00 -0700 Received: from ns.caldera.de (ns.caldera.de [212.34.180.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8H9fve31694 for ; Mon, 17 Sep 2001 02:41:58 -0700 Received: (from hch@localhost) by ns.caldera.de (8.11.1/8.11.1) id f8H9f6f29069; Mon, 17 Sep 2001 11:41:06 +0200 Date: Mon, 17 Sep 2001 11:41:05 +0200 From: Christoph Hellwig To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: [PATCH] fix kdb compilation Message-ID: <20010917114105.A28963@caldera.de> References: <20010917105350.C23758@caldera.de> <2678.1000717588@ocs3.intra.ocs.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <2678.1000717588@ocs3.intra.ocs.com.au>; from kaos@ocs.com.au on Mon, Sep 17, 2001 at 07:06:28PM +1000 Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, Sep 17, 2001 at 07:06:28PM +1000, Keith Owens wrote: > On Mon, 17 Sep 2001 10:53:50 +0200, > Christoph Hellwig wrote: > >The version required by Linux itself is 2.9.1.0.25, so could > >you please either apply the patch (preffered) or write down > >somewhere what exactly the binutils requirement for kdb is? > > You need at least GNU ld version 2.9.5 (with BFD 2.9.5.0.22) for kdb, > that is the minimum level I develop on. kdb uses bfd definitions which > do not exist before that version, it is not just ATTRIBUTE_UNUSED, > there are other declarations as well. Even binutils 2.9.5 defines > ATTRIBUTE_UNUSED in ansidecl.h. > > #ifndef ATTRIBUTE_UNUSED > #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) > #endif /* ATTRIBUTE_UNUSED */ But gcc 2.95.x doesn't and kdb grabs it's ansidecl.h in my setup.. Christoph -- Of course it doesn't work. We've performed a software upgrade. From owner-kdb@oss.sgi.com Mon Sep 17 03:05:42 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8HA5gU32275 for kdb-outgoing; Mon, 17 Sep 2001 03:05:42 -0700 Received: from mail.ocs.com.au (ppp0.ocs.com.au [203.34.97.3]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8HA5de32272 for ; Mon, 17 Sep 2001 03:05:39 -0700 Received: (qmail 29238 invoked from network); 17 Sep 2001 10:05:33 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 17 Sep 2001 10:05:33 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id C5CBA300095; Mon, 17 Sep 2001 20:04:37 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 934F998; Mon, 17 Sep 2001 20:04:37 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Christoph Hellwig Cc: kdb@oss.sgi.com Subject: Re: [PATCH] fix kdb compilation In-reply-to: Your message of "Mon, 17 Sep 2001 11:41:05 +0200." <20010917114105.A28963@caldera.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 17 Sep 2001 20:04:32 +1000 Message-ID: <3036.1000721072@ocs3.intra.ocs.com.au> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, 17 Sep 2001 11:41:05 +0200, Christoph Hellwig wrote: >But gcc 2.95.x doesn't and kdb grabs it's ansidecl.h in my setup.. The problem must be in your setup. I have not seen gcc using its own version of ansidecl.h and nobody else has reported this problem. Neither egcs 2.91.66 nor gcc 2.96 have ansidecl.h, it comes from binutils. From owner-kdb@oss.sgi.com Tue Sep 18 01:21:06 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8I8L6H25070 for kdb-outgoing; Tue, 18 Sep 2001 01:21:06 -0700 Received: from sgi.com (sgi.SGI.COM [192.48.153.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8I8L5e25065 for ; Tue, 18 Sep 2001 01:21:05 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id BAA04447; Tue, 18 Sep 2001 01:20:53 -0700 (PDT) mail_from (kaos@ocs.com.au) Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 7B622300090; Tue, 18 Sep 2001 18:10:55 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 41EBF98; Tue, 18 Sep 2001 18:10:55 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: linux-kernel@vger.kernel.org Cc: kdb@oss.sgi.com Subject: kdb v1.8-2.4.10-pre11 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 18 Sep 2001 18:10:49 +1000 Message-ID: <10797.1000800649@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk ftp://oss.sgi.com/projects/kdb/download/ix86/kdb-v1.8-2.4.10-pre11.bz2 compiles (if you have a compiler that understands __builtin_expect) and runs for me. I have no idea if the information printed by modules kdbm_vm and kdbm_pg is still valid, would any VM expert care to check kdb against the latest VM changes? All patches gratefully accepted. From owner-kdb@oss.sgi.com Mon Sep 24 19:00:17 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8P20Hb07642 for kdb-outgoing; Mon, 24 Sep 2001 19:00:17 -0700 Received: from sgi.com (sgi.SGI.COM [192.48.153.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8P203D07636 for ; Mon, 24 Sep 2001 19:00:03 -0700 Received: from nodin.corp.sgi.com (nodin.corp.sgi.com [192.26.51.193]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id SAA09185 for ; Mon, 24 Sep 2001 18:59:52 -0700 (PDT) mail_from (kaos@melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by nodin.corp.sgi.com (8.11.4/8.11.2/nodin-1.0) with ESMTP id f8P1wss1170099; Mon, 24 Sep 2001 18:58:54 -0700 (PDT) Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 83336300095; Tue, 25 Sep 2001 11:58:52 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 4DEB6B8; Tue, 25 Sep 2001 11:58:52 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: kdb@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: Announce: kdb v1.9 is available for kernel 2.4.10 Date: Tue, 25 Sep 2001 11:58:47 +1000 Message-ID: <16353.1001383127@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-Type: text/plain; charset=us-ascii ftp://oss.sgi.com/projects/kdb/download/ix86/kdb-v1.9-2.4.10.bz2 kdb v1.8 has just been keeping track of Linus and -ac kernels. kdb v1.9 flushes my folder of outstanding kdb patches. Thanks to everybody who sent patches and apologies for the delay in including them. There is also a kdb v1.8 patch against 2.4.10 in that directory, as well as v1.8 patches for 2.4.9-ac. I will not be releasing kdb v1.9 against 2.4.9-ac or 2.4.9-ia64, I am waiting for -ac and -ia64 to sync to 2.4.10. The XFS CVS tree is up to kernel 2.4.10 but is still using kdb v1.8, I will update XFS to kdb v1.9 in two days time. Changelog extract. 2001-09-25 Keith Owens * Update kdb v1.8 to kernel 2.4.10. * kdbm_pg patch from Hugh Dickens. * DProbes patch from Bharata B Rao. * mdWcn and mmW patch from Vamsi Krishna S. * i386 disasm layout patch from Jean-Marc Saffroy. * Work around for 64 bit binutils, Simon Munton. * kdb.mm doc correction by Chris Pascoe. * Enter repeats the last command, IA64 disasm only prints one instruction. Don Dugger. * Allow kdb/modules to be linked into vmlinux. * Remove obsolete code from kdb/modules/kdbm_{pg,vm}.c. * Warn when commands are entered at more prompt. * Add MODULE_AUTHOR, DESCRIPTION, LICENSE. * Release as kdb v1.9. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Exmh version 2.1.1 10/15/1999 iD8DBQE7r+TWi4UHNye0ZOoRAsXhAJ4jPFWrw9LSXtz0sK+QTgoZg0KPPgCfRLdM qynYadSlN/72+3AkNiASe50= =titQ -----END PGP SIGNATURE----- From owner-kdb@oss.sgi.com Sun Sep 30 21:52:25 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f914qPR07675 for kdb-outgoing; Sun, 30 Sep 2001 21:52:25 -0700 Received: from fgwmail6.fujitsu.co.jp (fgwmail6.fujitsu.co.jp [192.51.44.36]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f914qMD07672 for ; Sun, 30 Sep 2001 21:52:22 -0700 Received: from m4.gw.fujitsu.co.jp by fgwmail6.fujitsu.co.jp (8.9.3/3.7W-MX0109-Fujitsu Gateway) id NAA19825 for ; Mon, 1 Oct 2001 13:52:12 +0900 (JST) (envelope-from tachino@open.nm.fujitsu.co.jp) Received: from estartu.open.nm.fujitsu.co.jp by m4.gw.fujitsu.co.jp (8.9.3/3.7W-0110-Fujitsu Domain Master) id NAA24910 for ; Mon, 1 Oct 2001 13:52:11 +0900 (JST) (envelope-from tachino@open.nm.fujitsu.co.jp) Received: from nisaaru.dvs.cs.fujitsu.co.jp (nisaaru [10.34.160.77]) by estartu.open.nm.fujitsu.co.jp (Postfix) with ESMTP id D7CD9228 for ; Mon, 1 Oct 2001 13:52:10 +0900 (JST) Date: Mon, 01 Oct 2001 13:52:10 +0900 Message-ID: From: Tachino Nobuhiro To: kdb@oss.sgi.com Subject: a bug in kdb_parse() User-Agent: Wanderlust/2.7.4 (Too Funky) EMY/1.13.9 (Art is long, life is short) SLIM/1.14.7 () APEL/10.3 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i586-kondara-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-kdb@oss.sgi.com Precedence: bulk Hello, I found a bug in kdb_parse() in v1.9 which causes system hang or reboot when subcommand like "set LINES=50" is entered. Following patch fixes the problem. diff -r -u -N linux-2.4.10.org/kdb/kdbmain.c linux-2.4.10/kdb/kdbmain.c --- linux-2.4.10.org/kdb/kdbmain.c Mon Oct 1 11:28:42 2001 +++ linux-2.4.10/kdb/kdbmain.c Mon Oct 1 13:31:18 2001 @@ -605,6 +605,8 @@ while (*cp && !isspace(*cp) && (*cp != '=')) *cpp++ = *cp++; *cpp++ = '\0'; /* Squash a ws or '=' character */ + if (!*cp++) + break; } } if (!argc) From owner-kdb@oss.sgi.com Sun Sep 30 22:39:11 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f915dBY08469 for kdb-outgoing; Sun, 30 Sep 2001 22:39:11 -0700 Received: from rj.sgi.com (rj.sgi.com [204.94.215.100]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f915d9D08466 for ; Sun, 30 Sep 2001 22:39:09 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by rj.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with ESMTP id f915d3L21078 for ; Sun, 30 Sep 2001 22:39:03 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by nodin.corp.sgi.com (8.11.4/8.11.2/nodin-1.0) with ESMTP id f915c0s2183873; Sun, 30 Sep 2001 22:38:01 -0700 (PDT) Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 28109300095; Mon, 1 Oct 2001 15:37:51 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 7E745B8; Mon, 1 Oct 2001 15:37:51 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Tachino Nobuhiro Cc: kdb@oss.sgi.com Subject: Re: a bug in kdb_parse() In-reply-to: Your message of "Mon, 01 Oct 2001 13:52:10 +0900." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 01 Oct 2001 15:37:45 +1000 Message-ID: <30195.1001914665@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Mon, 01 Oct 2001 13:52:10 +0900, Tachino Nobuhiro wrote: >I found a bug in kdb_parse() in v1.9 which causes system hang or reboot >when subcommand like "set LINES=50" is entered. Thanks for the bug report, I fixed it a different way. Index: 11-pre1.2/kdb/kdbmain.c --- 11-pre1.2/kdb/kdbmain.c Thu, 27 Sep 2001 16:49:25 +1000 kaos (linux-2.4/b/d/49_kdbmain.c 1.1.1.5.1.2.1.2 644) +++ 11-pre1.2(w)/kdb/kdbmain.c Mon, 01 Oct 2001 15:36:57 +1000 kaos (linux-2.4/b/d/49_kdbmain.c 1.1.1.5.1.2.1.2 644) @@ -601,9 +601,12 @@ kdb_parse(char *cmdstr, kdb_eframe_t ef) if ((*cp == '\0') || (*cp == '\n')) break; argv[argc++] = cpp; - /* Skip to next whitespace */ - while (*cp && !isspace(*cp) && (*cp != '=')) - *cpp++ = *cp++; + /* Copy to next whitespace or '=' */ + while (*cp && !isspace(*cp)) { + if ((*cpp = *cp++) == '=') + break; + ++cpp; + } *cpp++ = '\0'; /* Squash a ws or '=' character */ } }