From kaos@sgi.com Wed Sep 1 03:59:47 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 03:59:53 -0700 (PDT) Received: from mail.ocs.com.au (mail.ocs.com.au [202.147.117.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81AxagV012782 for ; Wed, 1 Sep 2004 03:59:42 -0700 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 6C8F41800AC; Wed, 1 Sep 2004 20:59:07 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id ED20CC2183; Wed, 1 Sep 2004 20:59:01 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id E89EA1406EC; Wed, 1 Sep 2004 20:59:01 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: "Vladimir G. Ivanovic" Cc: kdb@oss.sgi.com Subject: Re: Kernel build problem In-reply-to: Your message of "Tue, 31 Aug 2004 23:07:04 MST." <200409010607.i81674r4010138@bach.leonora.org> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Wed, 01 Sep 2004 20:59:00 +1000 Message-ID: <5368.1094036340@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 810 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, 31 Aug 2004 23:07:04 -0700, "Vladimir G. Ivanovic" wrote: >I applied the KDB v4.4-2.6.9-rc1 patches to linux-2.6.8-1.533 (*), and >now I get a strange build error: > > /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S: Assembler messages: > /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S:431: Error: symbol `int80_ret_start_marker' is already defined > /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S:431: Error: symbol `int80_ret_end_marker' is already defined > >Here's the compilation line that causes the error: > > gcc -Wp,-MD,arch/i386/kernel/.entry.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.8-1.533/include -D__ASSEMBLY__ -I/usr/src/linux-2.6.8-1.533/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -m32 -traditional -m32 -c -o arch/i386/kernel/entry.o /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S > >But, here's the rub: int80_ret_start_marker is not being redefined at >line 431 of entry.S AFAICT. If I grep through all the sources, I find >that int80_ret_start_marker is only referenced twice: > > # find . -name "*[chS]" -exec fgrep -Hn int80_ret_end_marker {} \; > ./arch/i386/kernel/entry.S:140: cmpl $int80_ret_end_marker, %eax; \ > ./arch/i386/kernel/entry.S:171:int80_ret_end_marker: \ >and neither of them are at line 431. > >What gives? Would someone illuminate me? int80_ret_end_marker is only defined once, but in a macro. If the macro gets used twice, you end up with a duplicate label. Why on earth somebody defined a macro so it can only be used once is beyond me, macros are meant to be reusable. Add this fix. Index: linux-2.6.8/arch/i386/kernel/entry.S =================================================================== --- linux-2.6.8.orig/arch/i386/kernel/entry.S 2004-09-01 17:05:09.000000000 +1000 +++ linux-2.6.8/arch/i386/kernel/entry.S 2004-09-01 20:52:58.000000000 +1000 @@ -294,7 +294,7 @@ ENTRY(kdb_call) pushl $7 # KDB_REASON_ENTRY call kdb addl $12,%esp # remove args - RESTORE_ALL + jmp restore_all #endif /* BTW, the grep family now supports recursive search, this is much faster. grep -rIHn int80_ret_end_marker . --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From vladimir@acm.org Wed Sep 1 07:07:29 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 07:07:35 -0700 (PDT) Received: from bach.leonora.org (dsl081-052-249.sfo1.dsl.speakeasy.net [64.81.52.249]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81E7SLl021053 for ; Wed, 1 Sep 2004 07:07:29 -0700 Received: from bach.leonora.org (localhost.localdomain [127.0.0.1]) by bach.leonora.org (8.12.11/8.12.11) with ESMTP id i81E7H0K004630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Sep 2004 07:07:17 -0700 Received: from bach.leonora.org (vladimir@localhost) by bach.leonora.org (8.12.11/8.12.11/Submit) with ESMTP id i81E7Fj4004624; Wed, 1 Sep 2004 07:07:16 -0700 Message-Id: <200409011407.i81E7Fj4004624@bach.leonora.org> From: "Vladimir G. Ivanovic" Reply-To: "Vladimir G. Ivanovic" To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: Kernel build problem In-Reply-To: Your message of "Wed, 01 Sep 2004 20:59:00 +1000." <5368.1094036340@ocs3.ocs.com.au> X-Mailer: MH-E 7.81; nmh 1.0.4; XEmacs 21.4 (patch 15) Date: Wed, 01 Sep 2004 07:07:15 -0700 X-archive-position: 811 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: vladimir@acm.org Precedence: bulk X-list: kdb Keith, Thanks for your quick response! 1. Should I file a Fedora bug? 2. I didn't know about grep's "-r" option. Works like a charm (and it's nearly twice as fast as "find . -type f -exec fgrep..."). 3. I'm now getting a different error: gcc -Wp,-MD,kdb/modules/.kdbm_pg.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.8-1.533/include -I/usr/src/linux-2.6.8-1.533/kdb/modules -Ikdb/modules -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts -mpreferred-stack-boundary=2 -march=pentium3 -fno-optimize-sibling-calls -I/usr/src/linux-2.6.8-1.533/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -O2 -g -Wdeclaration-after-statement -DKBUILD_BASENAME=kdbm_pg -DKBUILD_MODNAME=kdbm_pg -c -o kdb/modules/kdbm_pg.o /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c: In function `kdbm_show_page': /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: `PG_maplock' undeclared (first use in this function) /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: (Each undeclared identifier is reported only once /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: for each function it appears in.) The only occurrence of PG_maplock is on line 284 of kdbm_pg.c. Should I be using a v4.4-2.6.8 patch instead? --- Vladimir -- Vladimir G. Ivanovic http://leonora.org/~vladimir Palo Alto, CA 94306 +1 650 678 8014 >>>>> "ko" == Keith Owens writes: ko> On Tue, 31 Aug 2004 23:07:04 -0700, ko> "Vladimir G. Ivanovic" wrote: >> I applied the KDB v4.4-2.6.9-rc1 patches to linux-2.6.8-1.533 (*), and >> now I get a strange build error: >> >> /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S: Assembler messages: >> /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S:431: Error: symbol `int80_ret_start_marker' is already defined >> /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S:431: Error: symbol `int80_ret_end_marker' is already defined >> >> Here's the compilation line that causes the error: >> >> gcc -Wp,-MD,arch/i386/kernel/.entry.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.8-1.533/include -D__ASSEMBLY__ -I/usr/src/linux-2.6.8-1.533/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -m32 -traditional -m32 -c -o arch/i386/kernel/entry.o /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S >> >> But, here's the rub: int80_ret_start_marker is not being redefined at >> line 431 of entry.S AFAICT. If I grep through all the sources, I find >> that int80_ret_start_marker is only referenced twice: >> >> # find . -name "*[chS]" -exec fgrep -Hn int80_ret_end_marker {} \; >> ./arch/i386/kernel/entry.S:140: cmpl $int80_ret_end_marker, %eax; \ >> ./arch/i386/kernel/entry.S:171:int80_ret_end_marker: \ >> and neither of them are at line 431. >> >> What gives? Would someone illuminate me? ko> ko> int80_ret_end_marker is only defined once, but in a macro. If the ko> macro gets used twice, you end up with a duplicate label. Why on earth ko> somebody defined a macro so it can only be used once is beyond me, ko> macros are meant to be reusable. Add this fix. ko> ko> Index: linux-2.6.8/arch/i386/kernel/entry.S ko> =================================================================== ko> --- linux-2.6.8.orig/arch/i386/kernel/entry.S 2004-09-01 17:05:09.000000000 +1000 ko> +++ linux-2.6.8/arch/i386/kernel/entry.S 2004-09-01 20:52:58.000000000 +1000 ko> @@ -294,7 +294,7 @@ ENTRY(kdb_call) ko> pushl $7 # KDB_REASON_ENTRY ko> call kdb ko> addl $12,%esp # remove args ko> - RESTORE_ALL ko> + jmp restore_all ko> #endif ko> ko> /* ko> ko> BTW, the grep family now supports recursive search, this is much faster. ko> ko> grep -rIHn int80_ret_end_marker . --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@ocs.com.au Wed Sep 1 08:24:49 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 08:24:56 -0700 (PDT) Received: from mail.ocs.com.au (mail.ocs.com.au [202.147.117.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81FOGem028678 for ; Wed, 1 Sep 2004 08:24:40 -0700 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id CFF961800AB; Thu, 2 Sep 2004 00:54:26 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id A9CDEC2183; Thu, 2 Sep 2004 00:54:17 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id 9FDEB1406EC; Thu, 2 Sep 2004 00:54:17 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: "Vladimir G. Ivanovic" Cc: kdb@oss.sgi.com Subject: Re: Kernel build problem In-reply-to: Your message of "Wed, 01 Sep 2004 07:07:15 MST." <200409011407.i81E7Fj4004624@bach.leonora.org> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 02 Sep 2004 00:54:16 +1000 Message-ID: <11981.1094050456@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 812 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@ocs.com.au Precedence: bulk X-list: kdb On Wed, 01 Sep 2004 07:07:15 -0700, "Vladimir G. Ivanovic" wrote: >Keith, > >Thanks for your quick response! > >1. Should I file a Fedora bug? Waste of time. RedHat do not want kdb in their trees. >3. I'm now getting a different error: > > gcc -Wp,-MD,kdb/modules/.kdbm_pg.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.8-1.533/include -I/usr/src/linux-2.6.8-1.533/kdb/modules -Ikdb/modules -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts -mpreferred-stack-boundary=2 -march=pentium3 -fno-optimize-sibling-calls -I/usr/src/linux-2.6.8-1.533/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -O2 -g -Wdeclaration-after-statement -DKBUILD_BASENAME=kdbm_pg -DKBUILD_MODNAME=kdbm_pg -c -o kdb/modules/kdbm_pg.o /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c > /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c: In function `kdbm_show_page': > /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: `PG_maplock' undeclared (first use in this function) > /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: (Each undeclared identifier is reported only once > /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: for each function it appears in.) > >The only occurrence of PG_maplock is on line 284 of kdbm_pg.c. Should I >be using a v4.4-2.6.8 patch instead? One of the Fedora patches has deleted PG_maplock from include/linux/page-flags.h. Comparing 2.6.8 with FC3 shows these differences. --- 2.6.8/include/linux/page-flags.h +++ FC3/include/linux/page-flags.h @@ -69,14 +69,11 @@ #define PG_private 12 /* Has something at ->private */ #define PG_writeback 13 /* Page is under writeback */ #define PG_nosave 14 /* Used for system suspend/resume */ -#define PG_maplock 15 /* Lock bit for rmap to ptes */ +#define PG_compound 15 /* Part of a compound page */ #define PG_swapcache 16 /* Swap page: swp_entry_t in private */ #define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ #define PG_reclaim 18 /* To be reclaimed asap */ -#define PG_compound 19 /* Part of a compound page */ - -#define PG_anon 20 /* Anonymous: anon_vma in mapping */ /* @@ -236,6 +233,7 @@ #define PageReserved(page) test_bit(PG_reserved, &(page)->flags) #define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags) #define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags) +#define __ClearPageReserved(page) __clear_bit(PG_reserved, &(page)->flags) #define SetPagePrivate(page) set_bit(PG_private, &(page)->flags) #define ClearPagePrivate(page) clear_bit(PG_private, &(page)->flags) @@ -292,10 +290,6 @@ #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) -#define PageAnon(page) test_bit(PG_anon, &(page)->flags) -#define SetPageAnon(page) set_bit(PG_anon, &(page)->flags) -#define ClearPageAnon(page) clear_bit(PG_anon, &(page)->flags) - #ifdef CONFIG_SWAP #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) #define SetPageSwapCache(page) set_bit(PG_swapcache, &(page)->flags) You will have to adjust the kdb code to compensate. It is a pity that RedHat do not want kdb, it means that RH users have a lot of trouble trying to debug their systems. OTOH SuSE are happy to include kdb in their distributions. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From CDunn@Empirix.com Wed Sep 1 08:57:24 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 08:57:30 -0700 (PDT) Received: from empwilex1.empirix.com ([12.38.203.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81FvLSa029826 for ; Wed, 1 Sep 2004 08:57:24 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Subject: RE: Kernel build problem Date: Wed, 1 Sep 2004 11:57:06 -0400 Message-ID: <2A9AA9C52024F94A96634E39B9858FF166B969@empwilex1.empirix.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Kernel build problem Thread-Index: AcSQOR33isXE1n/wRnqYPIYlsxWVqwAAjKWg From: "Dunn, Charles" To: "Keith Owens" Cc: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i81FvLSa029826 X-archive-position: 813 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: CDunn@Empirix.com Precedence: bulk X-list: kdb > It is a pity that > RedHat do not want kdb, it means that RH users have a lot of trouble > trying to debug their systems. OTOH SuSE are happy to include kdb in > their distributions. I agree 1000%! I went around and around with RH sales about this. No complaints about the sales person, she really tried to get to the bottom of why this is the way it is, and she even found the answer.. In talking with her it was clear that in 99% of her conversations with RH engineers the attitude was one of: "Debuggers produce bad fixes. Always. Debuggers are evil.".. This is like blaming forks for a person being overweight. Any tool can be used badly. No debugger is a substitute for understanding the code and producing a good solution. But a debugger can illuminate specific problem causes and shorten the debug cycle like few other tools can... This whole debugger thing with RH has been frustrating beyond words. We may even switch from RH to SuSe because of this, but mostly because RH seems to enjoy making life hard for embedded products makers who want to use RH. We are building VoIP test equipment and want to use RH as the OS inside.. They are making us jump through hoops that Microsoft hasn't even thought of yet. It's getting close to the point where it would be cheaper per box sold to have Windows inside than Linux.. Am I crazy or is that just a tad upside down from where Linux is supposed to be going??? -Charlie Dunn Empirix Inc. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From vladimir@acm.org Wed Sep 1 09:27:48 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 09:27:57 -0700 (PDT) Received: from bach.leonora.org (dsl081-052-249.sfo1.dsl.speakeasy.net [64.81.52.249]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81GRRvN030718 for ; Wed, 1 Sep 2004 09:27:28 -0700 Received: from bach.leonora.org (localhost.localdomain [127.0.0.1]) by bach.leonora.org (8.12.11/8.12.11) with ESMTP id i81GRGlX011767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 1 Sep 2004 09:27:17 -0700 Received: from bach.leonora.org (vladimir@localhost) by bach.leonora.org (8.12.11/8.12.11/Submit) with ESMTP id i81GQkbP011759; Wed, 1 Sep 2004 09:27:16 -0700 Message-Id: <200409011627.i81GQkbP011759@bach.leonora.org> From: "Vladimir G. Ivanovic" Reply-To: "Vladimir G. Ivanovic" To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: Kernel build problem In-Reply-To: Your message of "Thu, 02 Sep 2004 00:54:16 +1000." <11981.1094050456@ocs3.ocs.com.au> X-Mailer: MH-E 7.81; nmh 1.0.4; XEmacs 21.4 (patch 15) Date: Wed, 01 Sep 2004 09:26:46 -0700 X-archive-position: 814 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: vladimir@acm.org Precedence: bulk X-list: kdb OK, thanks (again). --- Vladimir -- Vladimir G. Ivanovic http://leonora.org/~vladimir Palo Alto, CA 94306 +1 650 678 8014 >>>>> "ko" == Keith Owens writes: ko> On Wed, 01 Sep 2004 07:07:15 -0700, ko> "Vladimir G. Ivanovic" wrote: >> Keith, >> >> Thanks for your quick response! >> >> 1. Should I file a Fedora bug? ko> ko> Waste of time. RedHat do not want kdb in their trees. ko> >> 3. I'm now getting a different error: >> >> gcc -Wp,-MD,kdb/modules/.kdbm_pg.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.8-1.533/include -I/usr/src/linux-2.6.8-1.533/kdb/modules -Ikdb/modules -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts -mpreferred-stack-boundary=2 -march=pentium3 -fno-optimize-sibling-calls -I/usr/src/linux-2.6.8-1.533/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -O2 -g -Wdeclaration-after-statement -DKBUILD_BASENAME=kdbm_pg -DKBUILD_MODNAME=kdbm_pg -c -o kdb/modules/kdbm_pg.o /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c >> /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c: In function `kdbm_show_page': >> /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: `PG_maplock' undeclared (first use in this function) >> /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: (Each undeclared identifier is reported only once >> /usr/src/linux-2.6.8-1.533/kdb/modules/kdbm_pg.c:284: error: for each function it appears in.) >> >> The only occurrence of PG_maplock is on line 284 of kdbm_pg.c. Should I >> be using a v4.4-2.6.8 patch instead? ko> ko> One of the Fedora patches has deleted PG_maplock from ko> include/linux/page-flags.h. Comparing 2.6.8 with FC3 shows these ko> differences. ko> ko> --- 2.6.8/include/linux/page-flags.h ko> +++ FC3/include/linux/page-flags.h ko> @@ -69,14 +69,11 @@ ko> #define PG_private 12 /* Has something at ->private */ ko> #define PG_writeback 13 /* Page is under writeback */ ko> #define PG_nosave 14 /* Used for system suspend/resume */ ko> -#define PG_maplock 15 /* Lock bit for rmap to ptes */ ko> +#define PG_compound 15 /* Part of a compound page */ ko> ko> #define PG_swapcache 16 /* Swap page: swp_entry_t in private */ ko> #define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ ko> #define PG_reclaim 18 /* To be reclaimed asap */ ko> -#define PG_compound 19 /* Part of a compound page */ ko> - ko> -#define PG_anon 20 /* Anonymous: anon_vma in mapping */ ko> ko> ko> /* ko> @@ -236,6 +233,7 @@ ko> #define PageReserved(page) test_bit(PG_reserved, &(page)->flags) ko> #define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags) ko> #define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags) ko> +#define __ClearPageReserved(page) __clear_bit(PG_reserved, &(page)->flags) ko> ko> #define SetPagePrivate(page) set_bit(PG_private, &(page)->flags) ko> #define ClearPagePrivate(page) clear_bit(PG_private, &(page)->flags) ko> @@ -292,10 +290,6 @@ ko> #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) ko> #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) ko> ko> -#define PageAnon(page) test_bit(PG_anon, &(page)->flags) ko> -#define SetPageAnon(page) set_bit(PG_anon, &(page)->flags) ko> -#define ClearPageAnon(page) clear_bit(PG_anon, &(page)->flags) ko> - ko> #ifdef CONFIG_SWAP ko> #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) ko> #define SetPageSwapCache(page) set_bit(PG_swapcache, &(page)->flags) ko> ko> ko> You will have to adjust the kdb code to compensate. It is a pity that ko> RedHat do not want kdb, it means that RH users have a lot of trouble ko> trying to debug their systems. OTOH SuSE are happy to include kdb in ko> their distributions. ko> ko> --------------------------- ko> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From CDunn@Empirix.com Wed Sep 1 09:48:00 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 09:48:06 -0700 (PDT) Received: from empwilex1.empirix.com ([12.38.203.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81GlxZY031854 for ; Wed, 1 Sep 2004 09:48:00 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Subject: RE: Kernel build problem Date: Wed, 1 Sep 2004 12:47:41 -0400 Message-ID: <2A9AA9C52024F94A96634E39B9858FF166B96A@empwilex1.empirix.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Kernel build problem Thread-Index: AcSQQBW7CSwctXiTS5m8fjkWa7Y1CAAAE8fw From: "Dunn, Charles" To: "Vladimir G. Ivanovic" Cc: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i81GlxZY031854 X-archive-position: 815 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: CDunn@Empirix.com Precedence: bulk X-list: kdb Yes, I agree that the original source of this is Linus's belief that debuggers make for bad fixes. And, the folks at RH can still think for themselves. They choose to follow the path they are on. Other distributions manage to include kdb, RH could as well, but they choose not to.. It's not fair to blame Linus for what RH does either... -Charlie -----Original Message----- From: Vladimir G. Ivanovic [mailto:vladimir@acm.org] Sent: Wednesday, September 01, 2004 12:24 PM To: Dunn, Charles Cc: linux-scsi@vger.kernel.org Subject: Re: Kernel build problem To be fair, it's not really a Red Hat issue, but rather Linus's belief that debuggers lead to patching symptoms rather than fixing the underlying problem. --- Vladimir -- Vladimir G. Ivanovic http://leonora.org/~vladimir Palo Alto, CA 94306 +1 650 678 8014 >>>>> "cd" == Charles Dunn writes: >> It is a pity that >> RedHat do not want kdb, it means that RH users have a lot of trouble >> trying to debug their systems. OTOH SuSE are happy to include kdb in >> their distributions. cd> cd> I agree 1000%! I went around and around with RH sales about this. No cd> complaints about the sales person, she really tried to get to the bottom cd> of why this is the way it is, and she even found the answer.. In talking cd> with her it was clear that in 99% of her conversations with RH engineers cd> the attitude was one of: "Debuggers produce bad fixes. Always. Debuggers cd> are evil.".. cd> cd> This is like blaming forks for a person being overweight. Any tool can cd> be used badly. No debugger is a substitute for understanding the code cd> and producing a good solution. But a debugger can illuminate specific cd> problem causes and shorten the debug cycle like few other tools can... cd> This whole debugger thing with RH has been frustrating beyond words. We cd> may even switch from RH to SuSe because of this, but mostly because RH cd> seems to enjoy making life hard for embedded products makers who want to cd> use RH. We are building VoIP test equipment and want to use RH as the OS cd> inside.. They are making us jump through hoops that Microsoft hasn't cd> even thought of yet. It's getting close to the point where it would be cd> cheaper per box sold to have Windows inside than Linux.. Am I crazy or cd> is that just a tad upside down from where Linux is supposed to be cd> going??? cd> cd> -Charlie Dunn cd> Empirix Inc. cd> cd> cd> cd> --------------------------- cd> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From CDunn@Empirix.com Wed Sep 1 12:18:56 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 12:19:04 -0700 (PDT) Received: from empwilex1.empirix.com ([12.38.203.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81JIrT1001805 for ; Wed, 1 Sep 2004 12:18:56 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Subject: RE: Kernel build problem Date: Wed, 1 Sep 2004 15:18:41 -0400 Message-ID: <2A9AA9C52024F94A96634E39B9858FF166B96E@empwilex1.empirix.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Kernel build problem Thread-Index: AcSQU+1Ytw99urNFQvmeRC+eT38BxAAAqsDg From: "Dunn, Charles" To: "Erik Mouw" Cc: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i81JIrT1001805 X-archive-position: 816 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: CDunn@Empirix.com Precedence: bulk X-list: kdb Maybe I'm crazy but Linus's analogy doesn't seem to apply at all. Basically what he's saying is that if you want stronger rabbits, make them run.. Well, you know, eventually, the rabbit is fast enough, there's no need to keep covering the same ground over and over again. Eventually you just want details about a problem to help you understand the bigger issue. The whole "NT has a nice debugger" issue is an emotional argument that doesn't hold water.. Just because NT did something it's automatically bad, I don't think so... California has major faults to, but people still live there and seem to enjoy it.. :-) To be honest, I have zero desire to spend time in an emotional discussion over a non-emotional issue. If I want that I can go get a soapbox and start talking politics (in a different forum of course).. I don't need that aggravation at work too... That stuff is like teaching a pig to sing. It doesn't work and it annoys the pig. People are no longer discussing differing logical viewpoints, it's religion, and no one is going to be convinced.. So why start the fight.. I will just do what I have to do, to get my job done.. At the end of the day, Linus et al don't pay my mortgage. But, thanks for finding the original quote! -Charlie -----Original Message----- From: Erik Mouw [mailto:erik@harddisk-recovery.com] Sent: Wednesday, September 01, 2004 2:46 PM To: Vladimir G. Ivanovic Cc: Dunn, Charles; linux-scsi@vger.kernel.org Subject: Re: Kernel build problem On Wed, Sep 01, 2004 at 09:23:55AM -0700, Vladimir G. Ivanovic wrote: > To be fair, it's not really a Red Hat issue, but rather Linus's belief > that debuggers lead to patching symptoms rather than fixing the > underlying problem. FYI, here is the complete quote: "The debugger is akin to giving the _rabbits_ a bazooka. The poor wolf doesn't get any sharper teeth. Yeah, it sure helps against wolves. They explode in pretty patterns of red drops flying _everywhere_. Cool. But it doesn't help against a rabbit gene pool that is slowly deteriorating because there is nothing to keep them from breeding, and no darwin to make sure that it's the fastest and strongest that breeds. You mentioned how NT has the nicest debugger out there. Contemplate it." - Linus Torvalds Feel free to start a discussion about this on linux-kernel, but be forewarned that it usually ends in a flamewar. Erik -- +-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From CDunn@Empirix.com Wed Sep 1 14:25:57 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 14:26:02 -0700 (PDT) Received: from empwilex1.empirix.com ([12.38.203.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i81LPugc015066 for ; Wed, 1 Sep 2004 14:25:57 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Subject: Does SuSE 9.1 Pro have kdb built in?? Date: Wed, 1 Sep 2004 17:25:49 -0400 Message-ID: <2A9AA9C52024F94A96634E39B9858FF166B973@empwilex1.empirix.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Does SuSE 9.1 Pro have kdb built in?? Thread-Index: AcR5rB4WmqzES1sdTzGtGSuwePPm8QWvT8YQ From: "Dunn, Charles" To: "Keith Owens" Cc: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i81LPugc015066 X-archive-position: 817 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: CDunn@Empirix.com Precedence: bulk X-list: kdb Earlier this month, Keith Owens said: > Ask Redhat (about their patch for kdb). I do patches against > the standard kernels. Distributors > add their own patches, some of which conflict with kdb, so it is up to > the distributors to add kdb to their tree. RedHat does not appear to be > interested, SuSE SLES9 has built in kdb. We did ask RedHat, and the answers to this and other questions were bad enough that they failed our qualification.. We are moving on to SuSE.. Does anyone on the list know if kdb is built into (or available as a patch) SuSE 9.1 Professional? I tried customer support (talked to a very helpful, pleasant gentleman) but he didn't know about kdb support in 9.1 Pro... Many thanks! -Charlie Dunn Empirix Inc. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From rambhagat@yahoo.com Wed Sep 1 16:33:18 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 16:33:23 -0700 (PDT) Received: from web53509.mail.yahoo.com (web53509.mail.yahoo.com [206.190.37.70]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i81NXHS9021594 for ; Wed, 1 Sep 2004 16:33:18 -0700 Message-ID: <20040901233304.92924.qmail@web53509.mail.yahoo.com> Received: from [66.42.159.237] by web53509.mail.yahoo.com via HTTP; Thu, 02 Sep 2004 00:33:04 BST Date: Thu, 2 Sep 2004 00:33:04 +0100 (BST) From: =?iso-8859-1?q?RamBhagat=20Gupta?= Subject: ls or cat support on kdb prompt To: kdb@oss.sgi.com MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 818 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: rambhagat@yahoo.com Precedence: bulk X-list: kdb Hi All, Does anyone have any idea if there is support for ls/cat at kdb prompt. This would have been useful to look for logs or configuration files without having to reboot the machine. I was checking kdb version 4.4 for linux kernel 2.6.8 but found only support for dmesg. Is there some patch available for it? Thanks Ram Gupta ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Sep 1 17:07:23 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 17:07:30 -0700 (PDT) Received: from mail.ocs.com.au (mail.ocs.com.au [202.147.117.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8207EjE022160 for ; Wed, 1 Sep 2004 17:07:20 -0700 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 722391800B1; Thu, 2 Sep 2004 10:06:40 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id 03202C21F1; Thu, 2 Sep 2004 10:06:39 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id 8E4031406EC; Thu, 2 Sep 2004 10:06:39 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: "Dunn, Charles" Cc: kdb@oss.sgi.com Subject: Re: Does SuSE 9.1 Pro have kdb built in?? In-reply-to: Your message of "Wed, 01 Sep 2004 17:25:49 -0400." <2A9AA9C52024F94A96634E39B9858FF166B973@empwilex1.empirix.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 02 Sep 2004 10:06:38 +1000 Message-ID: <26999.1094083598@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 819 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, 1 Sep 2004 17:25:49 -0400, "Dunn, Charles" wrote: > >Earlier this month, Keith Owens said: > >> Ask Redhat (about their patch for kdb). I do patches against=20 >> the standard kernels. Distributors >> add their own patches, some of which conflict with kdb, so it is up to >> the distributors to add kdb to their tree. RedHat does not appear to >be >> interested, SuSE SLES9 has built in kdb. > >We did ask RedHat, and the answers to this and other questions were bad >enough that they failed our qualification.. We are moving on to SuSE.. >Does anyone on the list know if kdb is built into (or available as a >patch) SuSE 9.1 Professional? I tried customer support (talked to a very >helpful, pleasant gentleman) but he didn't know about kdb support in 9.1 >Pro...=20 The kdb v4.3 patch is definitely included in SLES9 (SuSE Linux Enterprise Server), not to be confused with SuSE 9.1. SLES9 is the one that SuSE target at big systems; SUSE 9.1 is the personal, home and small business version. I do not have a copy of SuSE 9.1 Professional, but assuming that it uses one of these kernels /pub/linux/suse/suse/i386/9.1/suse/src/kernel-source-2.6.4-52.src.rpm /pub/linux/suse/suse/i386/update/9.1/rpm/src/kernel-source-2.6.5-7.108.src.rpm then yes, it contains kdb v4.3. AFAIK kdb is not turned on by default, so you have to rebuild the kernel yourself, but at least the patch is already integrated. I will see about getting SuSE 9.1 updated to kdb v4.4. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Sep 1 17:16:44 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 17:16:50 -0700 (PDT) Received: from mail.ocs.com.au (mail.ocs.com.au [202.147.117.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i820GdtC022599 for ; Wed, 1 Sep 2004 17:16:42 -0700 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 28DB11800B1; Thu, 2 Sep 2004 10:16:21 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id 1F2C5C21F1; Thu, 2 Sep 2004 10:16:23 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id 1BEFC1406EC; Thu, 2 Sep 2004 10:16:23 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: =?iso-8859-1?q?RamBhagat=20Gupta?= Cc: kdb@oss.sgi.com Subject: Re: ls or cat support on kdb prompt In-reply-to: Your message of "Thu, 02 Sep 2004 00:33:04 +0100." <20040901233304.92924.qmail@web53509.mail.yahoo.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 02 Sep 2004 10:16:22 +1000 Message-ID: <27326.1094084182@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 820 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, 2 Sep 2004 00:33:04 +0100 (BST), =?iso-8859-1?q?RamBhagat=20Gupta?= wrote: >Hi All, >Does anyone have any idea if there is support for >ls/cat at kdb prompt. This would have been useful to >look for logs or configuration files without having to >reboot the machine. I was checking kdb version 4.4 for >linux kernel 2.6.8 but found only support for dmesg. >Is there some patch available for it? No, and there never will be. When kdb is in control, the system is completely stopped. No interrupts, no I/O, nothing moves. That is the only safe way to debug a kernel, especially when you are debugging a filesystem problem. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From c-d.hailfinger.kernel.2004@gmx.net Wed Sep 1 19:12:58 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 19:13:03 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i822CvAO024385 for ; Wed, 1 Sep 2004 19:12:58 -0700 Received: (qmail 13738 invoked by uid 65534); 2 Sep 2004 02:12:43 -0000 Received: from linux13.zdv.uni-tuebingen.de (EHLO gmx.net) (134.2.18.13) by mail.gmx.net (mp022) with SMTP; 02 Sep 2004 04:12:43 +0200 X-Authenticated: #21910825 Message-ID: <41353C16.5090402@gmx.net> Date: Wed, 01 Sep 2004 05:03:50 +0200 From: Carl-Daniel Hailfinger User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114 X-Accept-Language: de, en MIME-Version: 1.0 To: Keith Owens CC: "Dunn, Charles" , kdb@oss.sgi.com Subject: Re: Does SuSE 9.1 Pro have kdb built in?? References: <26999.1094083598@ocs3.ocs.com.au> In-Reply-To: <26999.1094083598@ocs3.ocs.com.au> Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-archive-position: 821 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: c-d.hailfinger.kernel.2004@gmx.net Precedence: bulk X-list: kdb Keith Owens schrieb: > On Wed, 1 Sep 2004 17:25:49 -0400, > "Dunn, Charles" wrote: > >>Earlier this month, Keith Owens said: >> >> >>>Ask Redhat (about their patch for kdb). I do patches against=20 >>>the standard kernels. Distributors >>>add their own patches, some of which conflict with kdb, so it is up to >>>the distributors to add kdb to their tree. RedHat does not appear to >>>be interested, SuSE SLES9 has built in kdb. >> >>We did ask RedHat, and the answers to this and other questions were bad >>enough that they failed our qualification.. We are moving on to SuSE.. >>Does anyone on the list know if kdb is built into (or available as a >>patch) SuSE 9.1 Professional? I tried customer support (talked to a very >>helpful, pleasant gentleman) but he didn't know about kdb support in 9.1 >>Pro...=20 > > > The kdb v4.3 patch is definitely included in SLES9 (SuSE Linux > Enterprise Server), not to be confused with SuSE 9.1. SLES9 is the one > that SuSE target at big systems; SUSE 9.1 is the personal, home and > small business version. > > I do not have a copy of SuSE 9.1 Professional, but assuming that it > uses one of these kernels > > /pub/linux/suse/suse/i386/9.1/suse/src/kernel-source-2.6.4-52.src.rpm > /pub/linux/suse/suse/i386/update/9.1/rpm/src/kernel-source-2.6.5-7.108.src.rpm > > then yes, it contains kdb v4.3. AFAIK kdb is not turned on by default, > so you have to rebuild the kernel yourself, but at least the patch is > already integrated. I will see about getting SuSE 9.1 updated to kdb > v4.4. Charles: Only kernel-debug*rpm have kdb turned on by default. IIRC SUSE 9.1 Professional doesn't ship with such a package. However, if you need kdb you probably also need enterprise grade support and SLES9 would be the way to go. You can download an evaluation version at http://www.novell.com/products/linuxenterpriseserver/eval.html The fully functional SLES9 eval should enable you to test kdb and other features (provided you install the right rpm). There is a lesser known service by SUSE where they make daily snapshots of their current test kernels available at ftp://ftp.suse.com/pub/projects/kernel/kotd/i386/ You will find kernel-debug*rpm there. These kernels normally contain an activated kdb, but all kernels in this directory have an EXPERIMENTAL nature and you get to keep the pieces if it breaks. Please do not use them on production systems. Keith: About getting SUSE 9.1 updated to kdb v4.4, I doubt it will happen because version upgrades introduce bigger chances of breakage than small bugfixes. However, past experience suggests they will have the latest _stable_ kernel patches when they release their next product. You could watch the directory mentioned above in the meantime. HTH, Carl-Daniel -- http://www.hailfinger.org/ --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From pj@sgi.com Wed Sep 1 19:15:50 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 19:15:56 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i822FosX024426 for ; Wed, 1 Sep 2004 19:15:50 -0700 Received: from spindle.corp.sgi.com (spindle.corp.sgi.com [198.29.75.13]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i823LuKG014419 for ; Wed, 1 Sep 2004 20:21:56 -0700 Received: from mtv-vpn-hw-pj-2 (mtv-vpn-hw-pj-2.corp.sgi.com [134.15.25.219]) by spindle.corp.sgi.com (8.12.9/8.12.9/generic_config-1.2) with SMTP id i822FfKh41184954; Wed, 1 Sep 2004 19:15:41 -0700 (PDT) Date: Wed, 1 Sep 2004 19:15:55 -0700 From: Paul Jackson To: Keith Owens Cc: CDunn@Empirix.com, kdb@oss.sgi.com Subject: Re: Does SuSE 9.1 Pro have kdb built in?? Message-Id: <20040901191555.444506b7.pj@sgi.com> In-Reply-To: <26999.1094083598@ocs3.ocs.com.au> References: <2A9AA9C52024F94A96634E39B9858FF166B973@empwilex1.empirix.com> <26999.1094083598@ocs3.ocs.com.au> Organization: SGI X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-archive-position: 822 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: pj@sgi.com Precedence: bulk X-list: kdb I'm running on SuSE 9.1 Professional right now, from a fairly default installation. I see: Kernel: /usr/src/linux-2.6.5-7.104 and four sets of config files and build scripts, under: /usr/src/linux-obj/i386/{bigsmp,debug,default,smp} In these .config files, only the 'debug' set has kdb enabled. I didn't do anything conscious choosing or installing a kernel. Under /boot, I see that only the 'default' kernel was built. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Sep 1 19:28:15 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 19:28:21 -0700 (PDT) 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 i822SAJH024646 for ; Wed, 1 Sep 2004 19:28:13 -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 MAA28345 for ; Thu, 2 Sep 2004 12:27:55 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id BFDEBC2183; Thu, 2 Sep 2004 12:27:55 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id B5FB31406EC; Thu, 2 Sep 2004 12:27:55 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Carl-Daniel Hailfinger Cc: "Dunn, Charles" , kdb@oss.sgi.com, anton@au.ibm.com Subject: Re: Does SuSE 9.1 Pro have kdb built in?? In-reply-to: Your message of "Wed, 01 Sep 2004 05:03:50 +0200." <41353C16.5090402@gmx.net> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 02 Sep 2004 12:27:54 +1000 Message-ID: <3107.1094092074@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 823 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, 01 Sep 2004 05:03:50 +0200, Carl-Daniel Hailfinger wrote: >Keith Owens schrieb: >> I will see about getting SuSE 9.1 updated to kdb v4.4. > >Keith: About getting SUSE 9.1 updated to kdb v4.4, I doubt it will happen >because version upgrades introduce bigger chances of breakage than small >bugfixes. However, past experience suggests they will have the latest >_stable_ kernel patches when they release their next product. You could >watch the directory mentioned above in the meantime. I had come to the same conclusion. kdb v4.4 should be in SuSE 9.2[*], SuSE 9.1 will stay on kdb v4.3. [*] Assuming that we can get the ppc64 tree upgraded to kdb v4.4 at some stage. The ppc developers do not send me kdb patches, instead they include kdb in their own bk tree and update it there, with no feedback to the list. This means that ppc64 tends to trail the rest of kdb, which causes problems for distributions that support kdb on multiple architectures. I would really like a separate ppc64 kdb patch so it can be tracked and updated as required. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From c-d.hailfinger.kernel.2004@gmx.net Wed Sep 1 19:39:27 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 19:39:31 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i822dP6n024854 for ; Wed, 1 Sep 2004 19:39:26 -0700 Received: (qmail 23879 invoked by uid 65534); 2 Sep 2004 02:39:12 -0000 Received: from linux13.zdv.uni-tuebingen.de (EHLO gmx.net) (134.2.18.13) by mail.gmx.net (mp011) with SMTP; 02 Sep 2004 04:39:12 +0200 X-Authenticated: #21910825 Message-ID: <4135424C.9070305@gmx.net> Date: Wed, 01 Sep 2004 05:30:20 +0200 From: Carl-Daniel Hailfinger User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114 X-Accept-Language: de, en MIME-Version: 1.0 To: Paul Jackson CC: Keith Owens , CDunn@empirix.com, kdb@oss.sgi.com Subject: Re: Does SuSE 9.1 Pro have kdb built in?? References: <2A9AA9C52024F94A96634E39B9858FF166B973@empwilex1.empirix.com> <26999.1094083598@ocs3.ocs.com.au> <20040901191555.444506b7.pj@sgi.com> In-Reply-To: <20040901191555.444506b7.pj@sgi.com> Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-archive-position: 824 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: c-d.hailfinger.kernel.2004@gmx.net Precedence: bulk X-list: kdb Paul Jackson schrieb: > I'm running on SuSE 9.1 Professional right now, from a fairly default > installation. I see: > > Kernel: > > /usr/src/linux-2.6.5-7.104 > > and four sets of config files and build scripts, under: > > /usr/src/linux-obj/i386/{bigsmp,debug,default,smp} > > In these .config files, only the 'debug' set has kdb enabled. > > I didn't do anything conscious choosing or installing a kernel. > Under /boot, I see that only the 'default' kernel was built. Actually, YaST chooses the right kernel for you automatically. You will notice that the -bigsmp and -smp kernels are on the media, too. Regards, Carl-Daniel -- http://www.hailfinger.org/ --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From pj@sgi.com Wed Sep 1 19:57:35 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 01 Sep 2004 19:57:43 -0700 (PDT) Received: from omx1.americas.sgi.com (omx1-ext.sgi.com [192.48.179.11]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i822vX90025516 for ; Wed, 1 Sep 2004 19:57:35 -0700 Received: from spindle.corp.sgi.com (spindle.corp.sgi.com [198.29.75.13]) by omx1.americas.sgi.com (8.12.10/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i822vO0f015776 for ; Wed, 1 Sep 2004 21:57:24 -0500 Received: from mtv-vpn-hw-pj-2 (mtv-vpn-hw-pj-2.corp.sgi.com [134.15.25.219]) by spindle.corp.sgi.com (8.12.9/8.12.9/generic_config-1.2) with SMTP id i822vJKh41627456; Wed, 1 Sep 2004 19:57:19 -0700 (PDT) Date: Wed, 1 Sep 2004 19:57:33 -0700 From: Paul Jackson To: Paul Jackson Cc: kaos@sgi.com, CDunn@Empirix.com, kdb@oss.sgi.com Subject: Re: Does SuSE 9.1 Pro have kdb built in?? Message-Id: <20040901195733.697c3702.pj@sgi.com> In-Reply-To: <20040901191555.444506b7.pj@sgi.com> References: <2A9AA9C52024F94A96634E39B9858FF166B973@empwilex1.empirix.com> <26999.1094083598@ocs3.ocs.com.au> <20040901191555.444506b7.pj@sgi.com> Organization: SGI X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-archive-position: 825 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: pj@sgi.com Precedence: bulk X-list: kdb One more detail - the file: /usr/src/linux/kdb/ChangeLog begins with the lines: 2004-06-07 Linas Vepstas * Apply Keith Owens' per_cpu patch 2004-04-11 Keith Owens * Unlock sn_sal_lock before entering kdb from sn_serial. * kdb v4.3-2.6.5-common-2. 2004-04-05 Keith Owens * kdb v4.3-2.6.5-common-1. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From CDunn@Empirix.com Thu Sep 2 18:09:57 2004 Received: with ECARTIS (v1.0.0; list kdb); Thu, 02 Sep 2004 18:10:02 -0700 (PDT) Received: from empwilex1.empirix.com ([12.38.203.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8319smC013727 for ; Thu, 2 Sep 2004 18:09:56 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Subject: RE: Does SuSE 9.1 Pro have kdb built in?? Date: Thu, 2 Sep 2004 21:09:41 -0400 Message-ID: <2A9AA9C52024F94A96634E39B9858FF166B97B@empwilex1.empirix.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Does SuSE 9.1 Pro have kdb built in?? Thread-Index: AcSQgNKg9v20LP/lT5SdYFUrvXzYRwA0ac8g From: "Dunn, Charles" To: "Keith Owens" Cc: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i8319smC013727 X-archive-position: 826 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: CDunn@Empirix.com Precedence: bulk X-list: kdb Just FYI.. I installed SuSE 9.1 Professional today, and kdb is in fact part of the kernel. It's not turned on in the installed binaries, but no patch is required... Thanks for all the help along the way guys! -Charlie Dunn Empirix Inc. -----Original Message----- From: Keith Owens [mailto:kaos@sgi.com] Sent: Wednesday, September 01, 2004 8:07 PM To: Dunn, Charles Cc: kdb@oss.sgi.com Subject: Re: Does SuSE 9.1 Pro have kdb built in?? On Wed, 1 Sep 2004 17:25:49 -0400, "Dunn, Charles" wrote: > >Earlier this month, Keith Owens said: > >> Ask Redhat (about their patch for kdb). I do patches against=20 >> the standard kernels. Distributors >> add their own patches, some of which conflict with kdb, so it is up to >> the distributors to add kdb to their tree. RedHat does not appear to >be >> interested, SuSE SLES9 has built in kdb. > >We did ask RedHat, and the answers to this and other questions were bad >enough that they failed our qualification.. We are moving on to SuSE.. >Does anyone on the list know if kdb is built into (or available as a >patch) SuSE 9.1 Professional? I tried customer support (talked to a very >helpful, pleasant gentleman) but he didn't know about kdb support in 9.1 >Pro...=20 The kdb v4.3 patch is definitely included in SLES9 (SuSE Linux Enterprise Server), not to be confused with SuSE 9.1. SLES9 is the one that SuSE target at big systems; SUSE 9.1 is the personal, home and small business version. I do not have a copy of SuSE 9.1 Professional, but assuming that it uses one of these kernels /pub/linux/suse/suse/i386/9.1/suse/src/kernel-source-2.6.4- 52.src.rpm /pub/linux/suse/suse/i386/update/9.1/rpm/src/kernel-source- 2.6.5-7.108.src.rpm then yes, it contains kdb v4.3. AFAIK kdb is not turned on by default, so you have to rebuild the kernel yourself, but at least the patch is already integrated. I will see about getting SuSE 9.1 updated to kdb v4.4. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sridhar_sds@yahoo.co.in Thu Sep 9 23:31:11 2004 Received: with ECARTIS (v1.0.0; list kdb); Thu, 09 Sep 2004 23:31:16 -0700 (PDT) Received: from web8504.mail.in.yahoo.com (web8504.mail.in.yahoo.com [202.43.219.166]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i8A6V9n2010433 for ; Thu, 9 Sep 2004 23:31:10 -0700 Message-ID: <20040910063055.83698.qmail@web8504.mail.in.yahoo.com> Received: from [203.199.164.2] by web8504.mail.in.yahoo.com via HTTP; Thu, 09 Sep 2004 23:30:55 PDT Date: Thu, 9 Sep 2004 23:30:55 -0700 (PDT) From: sudarshan sridhar Subject: Unable to get kdb To: kdb@oss.sgi.com MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-archive-position: 827 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sridhar_sds@yahoo.co.in Precedence: bulk X-list: kdb Hi, i applied patches kdb-v4.4-2.6.7-common-1 and kdb-v4.4-2.6.7-i386-1 to my linux kernel 2.6.7 and selected all debugging options and recompiled the kernel. Kernel was compiled installed properly. But i didn't get any command "kdb" to invoke kdb. Please reply me how to get kdb command and start with it. i searched /usr/bin,/usr/sbin and /sbin and i didn't find kdb command. reply me how to get the command. regards, sridhar _______________________________ Do you Yahoo!? Shop for Back-to-School deals on Yahoo! Shopping. http://shopping.yahoo.com/backtoschool --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Thu Sep 9 23:53:20 2004 Received: with ECARTIS (v1.0.0; list kdb); Thu, 09 Sep 2004 23:53:26 -0700 (PDT) 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 i8A6rIJj011771 for ; Thu, 9 Sep 2004 23:53:19 -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 QAA03808 for ; Fri, 10 Sep 2004 16:53:03 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id E9ABCC2186; Fri, 10 Sep 2004 16:52:54 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id DA3951406E7; Fri, 10 Sep 2004 16:52:54 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: sudarshan sridhar Cc: kdb@oss.sgi.com Subject: Re: Unable to get kdb In-reply-to: Your message of "Thu, 09 Sep 2004 23:30:55 MST." <20040910063055.83698.qmail@web8504.mail.in.yahoo.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 10 Sep 2004 16:52:53 +1000 Message-ID: <15550.1094799173@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 828 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, 9 Sep 2004 23:30:55 -0700 (PDT), sudarshan sridhar wrote: >Hi, > i applied patches kdb-v4.4-2.6.7-common-1 and > kdb-v4.4-2.6.7-i386-1 to my linux kernel 2.6.7 and >selected all debugging options and recompiled the >kernel. Kernel was compiled installed properly. But i >didn't get any command "kdb" to invoke kdb. >Please reply me how to get kdb command and start with >it. i searched /usr/bin,/usr/sbin and /sbin and i >didn't find kdb command. reply me how to get the >command. man linux/Documentation/kdb/kdb.mm, under Getting Started. Documentation: : Information created by the developer and ignored by the users. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From slurndal@3leafnetworks.com Fri Sep 17 08:01:57 2004 Received: with ECARTIS (v1.0.0; list kdb); Fri, 17 Sep 2004 08:02:02 -0700 (PDT) Received: from penguin.local (mail.stormventures.com [64.160.35.194]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8HF1vG8012180 for ; Fri, 17 Sep 2004 08:01:57 -0700 Received: by penguin.local (Postfix, from userid 500) id 29AE415BFE4; Fri, 17 Sep 2004 08:01:17 -0700 (PDT) Date: Fri, 17 Sep 2004 08:01:16 -0700 From: Scott Lurndal To: kdb@oss.sgi.com Subject: Small patch for x86_64 to version 4.4 Message-ID: <20040917150116.GA27901@pendragon.stormventures.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Content-Transfer-Encoding: 8bit X-archive-position: 829 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: scott.lurndal@3leafnetworks.com Precedence: bulk X-list: kdb Keith, Here is a small patch for the x86_64 to allow the kdbm_pg module to compile successfully. Using the following: kdb-v4.4-2.6.8-common-1 kdb-v4.4-2.6.8-x86-64-1 linux-2.6.8.1.tar scott $ diff -Nu /tmp/kdbm_pg.c kdb/modules/kdbm_pg.c --- /tmp/kdbm_pg.c 2004-09-17 07:57:20.087444744 -0700 +++ kdb/modules/kdbm_pg.c 2004-09-17 07:57:03.324993024 -0700 @@ -463,7 +463,7 @@ -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) && !defined(CONFIG_X86_64) /* According to Steve Lord, this code is ix86 specific. Patches to extend it to * other architectures will be greatefully accepted. */ @@ -528,7 +528,7 @@ kdb_printf(" high page count: %6d\n", page_counts[8]); return 0; } -#endif /* CONFIG_X86 */ +#endif /* CONFIG_X86 && !CONFIG_X86_64 */ static int __init kdbm_pg_init(void) { @@ -541,7 +541,7 @@ kdb_register("inode_pages", kdbm_inode_pages, "", "Display pages in an inode", 0); kdb_register("req", kdbm_request, "", "dump request struct", 0); kdb_register("rqueue", kdbm_rqueue, "", "dump request queue", 0); -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) && !defined(CONFIG_X86_64) kdb_register("memmap", kdbm_memmap, "", "page table summary", 0); #endif return 0; @@ -559,7 +559,7 @@ kdb_unregister("inode_pages"); kdb_unregister("req"); kdb_unregister("rqueue"); -#ifdef CONFIG_X86 +#if defined(CONFIG_X86) && !defined(CONFIG_X86_64) kdb_unregister("memmap"); #endif } --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From SRS0+8c5e9f7f586ba4bff26a+390+infradead.org+hch@phoenix.srs.infradead.org Fri Sep 17 09:38:38 2004 Received: with ECARTIS (v1.0.0; list kdb); Fri, 17 Sep 2004 09:38:43 -0700 (PDT) Received: from phoenix.infradead.org (imladris.demon.co.uk [193.237.130.41]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8HGcbEp021845 for ; Fri, 17 Sep 2004 09:38:38 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #2 (Red Hat Linux)) id 1C8Lkf-0003zU-4v; Fri, 17 Sep 2004 17:38:25 +0100 Date: Fri, 17 Sep 2004 17:38:25 +0100 From: Christoph Hellwig To: Scott Lurndal Cc: kdb@oss.sgi.com Subject: Re: Small patch for x86_64 to version 4.4 Message-ID: <20040917173824.A15293@infradead.org> References: <20040917150116.GA27901@pendragon.stormventures.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040917150116.GA27901@pendragon.stormventures.com>; from scott.lurndal@3leafnetworks.com on Fri, Sep 17, 2004 at 08:01:16AM -0700 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html Content-Transfer-Encoding: 8bit X-archive-position: 830 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: kdb > +#if defined(CONFIG_X86) && !defined(CONFIG_X86_64) > /* According to Steve Lord, this code is ix86 specific. Patches to extend it to > * other architectures will be greatefully accepted. > */ This ifdef (and comment) don't make sense. The code won't even copile on i386 when CONFIG_DISCONTIGMEM is set. It should test !CONFIG_DISCONTIGMEM and maybe !CONFIG_VIRTUAL_MEM_MAP for some strange ia64 thingy. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From saroj_d@yahoo.com Mon Sep 20 06:09:40 2004 Received: with ECARTIS (v1.0.0; list kdb); Mon, 20 Sep 2004 06:09:45 -0700 (PDT) Received: from web50604.mail.yahoo.com (web50604.mail.yahoo.com [206.190.38.91]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i8KD9d78014505 for ; Mon, 20 Sep 2004 06:09:39 -0700 Message-ID: <20040920130923.4030.qmail@web50604.mail.yahoo.com> Received: from [128.222.32.10] by web50604.mail.yahoo.com via HTTP; Mon, 20 Sep 2004 14:09:23 BST Date: Mon, 20 Sep 2004 14:09:23 +0100 (BST) From: SAROJ DAS Subject: Using hardware register for setting BP To: kdb@oss.sgi.com MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 831 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: saroj_d@yahoo.com Precedence: bulk X-list: kdb Hi All, Is it possible to set hardware data-access BP at a variable address? I am trying to set the BP at THIS_MODULE->uc.usecount of a module by the following method. kdb> bpha c7000010 DATAA 4 [the address c7000010, I got by printing from the module itself] But the BP does not seem to be hitting when it's supposed to be. I am using i686 m/c on SuSE. My queries are the following 1) Am I right in setting the hardware BP as indicated, if not what is the proper method ? 2) How to know the address of a variable thru KDB which is not visible in /proc/ksyms ? 3) Is there anything else I need to do about it? Please let me know. Thanks in Advance skd ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Mon Sep 20 21:32:07 2004 Received: with ECARTIS (v1.0.0; list kdb); Mon, 20 Sep 2004 21:32:11 -0700 (PDT) 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 i8L4W56h020515 for ; Mon, 20 Sep 2004 21:32:06 -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 OAA09058 for ; Tue, 21 Sep 2004 14:31:49 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 5FDDBC00AC; Tue, 21 Sep 2004 14:31:49 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 38CCE1406E7; Tue, 21 Sep 2004 14:31:48 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: SAROJ DAS Cc: kdb@oss.sgi.com Subject: Re: Using hardware register for setting BP In-reply-to: Your message of "Mon, 20 Sep 2004 14:09:23 +0100." <20040920130923.4030.qmail@web50604.mail.yahoo.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 21 Sep 2004 14:31:47 +1000 Message-ID: <5441.1095741107@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 832 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, 20 Sep 2004 14:09:23 +0100 (BST), SAROJ DAS wrote: >Hi All, >Is it possible to set hardware data-access BP at a >variable address? The hardware breakpoint setting in kdb is unreliable, especially in SMP systems. The code needs a complete redesign to make it reliable. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jim.houston@comcast.net Tue Sep 28 07:33:04 2004 Received: with ECARTIS (v1.0.0; list kdb); Tue, 28 Sep 2004 07:33:09 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8SEX3Nn002463 for ; Tue, 28 Sep 2004 07:33:04 -0700 Received: from new.localdomain (h00e098094f32.ne.client2.attbi.com[24.60.234.83]) by comcast.net (sccrmhc13) with ESMTP id <2004092814324501600b3tq8e> (Authid: houston.jim); Tue, 28 Sep 2004 14:32:46 +0000 Date: 28 Sep 2004 10:29:31 -0400 Message-Id: From: Jim Houston To: jfv@bluesong.NET, kaos@sgi.com, kdb@oss.sgi.com Subject: [PATCH] kdb line editing broken on x86_64 Reply-to: jim.houston@comcast.net X-archive-position: 833 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, Keith, The line editing characters are not handled correctly in the x86_64 version of kdba_io.c.  The attached patch makes the x86_64 code match the i386. Jim Houston - Concurrent Computer Corp. -- diff -urN -X /home/jhouston/dontdiff linux-2.6.8.1/arch/x86_64/kdb/kdba_io.c 2.6-redhawk/arch/x86_64/kdb/kdba_io.c --- linux-2.6.8.1/arch/x86_64/kdb/kdba_io.c 2004-09-02 15:18:00.000000000 -0400 +++ 2.6-redhawk/arch/x86_64/kdb/kdba_io.c 2004-09-28 10:29:29.716570405 -0400 @@ -97,17 +97,6 @@ ch = serial_inp(&kdb_serial, UART_RX); if (ch == 0x7f) ch = 8; - if (ch == '\t') - ch = ' '; - if (ch == 8) { /* BS */ - ; - } else if (ch == 13) { /* Enter */ - kdb_printf("\n"); - } else { - if (!isprint(ch)) - return(-1); - kdb_printf("%c", ch); - } return ch; } return -1; @@ -215,6 +204,26 @@ return 8; } + /* Special Key */ + switch (scancode) { + case 0xF: /* Tab */ + return 9; + case 0x53: /* Del */ + return 4; + case 0x47: /* Home */ + return 1; + case 0x4F: /* End */ + return 5; + case 0x4B: /* Left */ + return 2; + case 0x48: /* Up */ + return 16; + case 0x50: /* Down */ + return 14; + case 0x4D: /* Right */ + return 6; + } + if (scancode == 0xe0) { return -1; } @@ -287,11 +296,6 @@ return 13; } - /* - * echo the character. - */ - kdb_printf("%c", keychar&0xff); - return keychar & 0xff; } @@ -337,46 +341,6 @@ NULL }; -char * -kdba_read(char *buffer, size_t bufsize) -{ - char *cp = buffer; - char *bufend = buffer+bufsize-2; /* Reserve space for newline and null byte */ - - for (;;) { - int key; - get_char_func *f; - for (f = &poll_funcs[0]; ; ++f) { - if (*f == NULL) { - /* Reset NMI watchdog once per poll loop */ - touch_nmi_watchdog(); - f = &poll_funcs[0]; - } - key = (*f)(); - if (key != -1) - break; - } - - /* Echo is done in the low level functions */ - switch (key) { - case 8: /* backspace */ - if (cp > buffer) { - kdb_printf("\b \b"); - --cp; - } - break; - case 10: /* enter */ - case 13: /* enter */ - *cp++ = '\n'; - *cp++ = '\0'; - return buffer; - default: - if (cp < bufend) - *cp++ = key; - break; - } - } -} void kdba_local_arch_setup(void) { --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jim.houston@comcast.net Tue Sep 28 10:14:56 2004 Received: with ECARTIS (v1.0.0; list kdb); Tue, 28 Sep 2004 10:15:02 -0700 (PDT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8SHEtfV013078 for ; Tue, 28 Sep 2004 10:14:56 -0700 Received: from new.localdomain (h00e098094f32.ne.client2.attbi.com[24.60.234.83]) by comcast.net (sccrmhc12) with ESMTP id <2004092817143701200qotf5e> (Authid: houston.jim); Tue, 28 Sep 2004 17:14:38 +0000 Date: 28 Sep 2004 13:11:22 -0400 Message-Id: From: Jim Houston To: kaos@sgi.com, kdb@oss.sgi.com Subject: kdb symbol completion is broken Reply-to: jim.houston@comcast.net X-archive-position: 834 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, The kdb symbol completion code is broken (at least in kdb-v4.4-2.6.8). For example, if you enter timer_int and hit TAB, Kdb should recognize that there is only one possible symbol and complete the name as timer_interrupt. I had this working in the verison of kdb that I ported to linux-2.6 last fall. I did a quick merge of my version of the symbol table code and got this working. I could send you a patch if you like. Jim Houston - Concurrent Computer Corp. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Tue Sep 28 20:32:04 2004 Received: with ECARTIS (v1.0.0; list kdb); Tue, 28 Sep 2004 20:32:09 -0700 (PDT) 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 i8T3W25h020237 for ; Tue, 28 Sep 2004 20:32:03 -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 NAA20540 for ; Wed, 29 Sep 2004 13:31:45 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 84645C00AC; Wed, 29 Sep 2004 13:31:40 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 79C7B1406E7; Wed, 29 Sep 2004 13:31:40 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: jim.houston@comcast.net Cc: kdb@oss.sgi.com Subject: Re: kdb symbol completion is broken In-reply-to: Your message of "28 Sep 2004 13:11:22 -0400." Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Wed, 29 Sep 2004 13:31:39 +1000 Message-ID: <3469.1096428699@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 835 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 28 Sep 2004 13:11:22 -0400, Jim Houston wrote: >Hi Keith, > >The kdb symbol completion code is broken (at least in kdb-v4.4-2.6.8). >For example, if you enter timer_int and hit TAB, Kdb should >recognize that there is only one possible symbol and complete >the name as timer_interrupt. It works for me, you have to press tab twice to get the symbol completion. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jim.houston@comcast.net Tue Sep 28 21:25:56 2004 Received: with ECARTIS (v1.0.0; list kdb); Tue, 28 Sep 2004 21:26:03 -0700 (PDT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8T4Pr7I022106 for ; Tue, 28 Sep 2004 21:25:56 -0700 Received: from [192.168.0.1] (h00e098094f32.ne.client2.attbi.com[24.60.234.83]) by comcast.net (sccrmhc12) with SMTP id <20040929042536012009gbsse> (Authid: houston.jim); Wed, 29 Sep 2004 04:25:36 +0000 Subject: Re: kdb symbol completion is broken From: Jim Houston Reply-To: jim.houston@comcast.net To: Keith Owens Cc: kdb@oss.sgi.com In-Reply-To: <3469.1096428699@kao2.melbourne.sgi.com> References: <3469.1096428699@kao2.melbourne.sgi.com> Content-type: text/plain Organization: Message-Id: <1096431730.1070.84.camel@new.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 29 Sep 2004 00:22:11 -0400 Content-Transfer-Encoding: 8bit X-archive-position: 836 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 Tue, 2004-09-28 at 23:31, Keith Owens wrote: > On 28 Sep 2004 13:11:22 -0400, > Jim Houston wrote: > >Hi Keith, > > > >The kdb symbol completion code is broken (at least in kdb-v4.4-2.6.8). > >For example, if you enter timer_int and hit TAB, Kdb should > >recognize that there is only one possible symbol and complete > >the name as timer_interrupt. > > It works for me, you have to press tab twice to get the symbol > completion. Hi Keith, Have a look at Sonic Zhang's description of this feature here: http://oss.sgi.com/archives/kdb/2002-12/msg00047.html A single TAB should complete the partial symbol if it uniquely matches a single symbol. If there are several symbols which match the prefix the first TAB will add the common portion of the symbol names. Its all about not having to type long symbol names. The second TAB lists the matching symbols. Yes this part works. Jim Houston - Concurrent Computer Corp. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@ocs.com.au Tue Sep 28 21:34:48 2004 Received: with ECARTIS (v1.0.0; list kdb); Tue, 28 Sep 2004 21:35:01 -0700 (PDT) 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 i8T4YidI022299 for ; Tue, 28 Sep 2004 21:34:47 -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 OAA21739 for ; Wed, 29 Sep 2004 14:34:22 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 88301C00AC; Wed, 29 Sep 2004 14:34:18 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 7C6E81406E7; Wed, 29 Sep 2004 14:34:18 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: jim.houston@comcast.net Cc: kdb@oss.sgi.com Subject: Re: kdb symbol completion is broken In-reply-to: Your message of "29 Sep 2004 00:22:11 -0400." <1096431730.1070.84.camel@new.localdomain> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Wed, 29 Sep 2004 14:34:17 +1000 Message-ID: <5028.1096432457@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 837 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@ocs.com.au Precedence: bulk X-list: kdb On 29 Sep 2004 00:22:11 -0400, Jim Houston wrote: >On Tue, 2004-09-28 at 23:31, Keith Owens wrote: >> On 28 Sep 2004 13:11:22 -0400, >> Jim Houston wrote: >> >Hi Keith, >> > >> >The kdb symbol completion code is broken (at least in kdb-v4.4-2.6.8). >> >For example, if you enter timer_int and hit TAB, Kdb should >> >recognize that there is only one possible symbol and complete >> >the name as timer_interrupt. >> >> It works for me, you have to press tab twice to get the symbol >> completion. > >Hi Keith, > >Have a look at Sonic Zhang's description of this feature here: > > http://oss.sgi.com/archives/kdb/2002-12/msg00047.html > >A single TAB should complete the partial symbol if it uniquely matches >a single symbol. If there are several symbols which match the >prefix the first TAB will add the common portion of the symbol >names. Its all about not having to type long symbol names. Unfortunately Sonic Zhang's had a nasty bug in it - the tab completion overwrote the current buffer without checking if they buffer was long enough to hold the result. In 2.4 that could sometimes result in oops during tab completion. If you have a patch that maintains the tab completion without buffer overruns, I will take it. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jim.houston@comcast.net Wed Sep 29 11:56:46 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 29 Sep 2004 11:56:54 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8TIujpG002975 for ; Wed, 29 Sep 2004 11:56:45 -0700 Received: from new.localdomain (h00e098094f32.ne.client2.attbi.com[24.60.234.83]) by comcast.net (sccrmhc13) with ESMTP id <20040929185626016001ajmbe> (Authid: houston.jim); Wed, 29 Sep 2004 18:56:27 +0000 Date: 29 Sep 2004 14:53:08 -0400 Message-Id: From: Jim Houston To: kaos@sgi.com, kdb@oss.sgi.com Subject: [PATCH] fix symbol completion Reply-to: jim.houston@comcast.net X-archive-position: 838 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, Attached is a patch which will fix the kdb symbol completion problem I described yesterday. It replaces most of the symbol table handling with the version from the port I did last fall. I have not looked at the code yet to check for the buffer overflow you described. As long as the buffers are larger than the longest symbol in the kernel/module symbol tables I would not expect a problem. Jim Houston - Concurrent Computer Corp. -- diff -urN -Xdontdiff linux-2.6.8.1.orig/include/linux/module.h linux-2.6.8.1/include/linux/module.h --- linux-2.6.8.1.orig/include/linux/module.h 2004-08-23 16:38:06.000000000 -0400 +++ linux-2.6.8.1/include/linux/module.h 2004-09-29 13:33:11.249170728 -0400 @@ -437,6 +437,11 @@ unsigned long *symbolsize, unsigned long *offset, char **modname); +#ifdef CONFIG_KDB +/* Kdb access to symbol table. */ +const char *module_symbol_index(unsigned int index, + unsigned long *value, const char **modname); +#endif /* CONFIG_KDB */ /* For extable.c to search modules' exception tables. */ const struct exception_table_entry *search_module_extables(unsigned long addr); @@ -518,6 +523,15 @@ return 0; } +#ifdef CONFIG_KDB +/* Kdb access to symbol table. */ +static inline const char *module_symbol_index(unsigned int index, + unsigned long *value, const char **modname) +{ + return NULL; +} +#endif /* CONFIG_KDB */ + static inline int register_module_notifier(struct notifier_block * nb) { /* no events will happen anyway, so this can always succeed */ diff -urN -Xdontdiff linux-2.6.8.1.orig/kdb/kdbsupport.c linux-2.6.8.1/kdb/kdbsupport.c --- linux-2.6.8.1.orig/kdb/kdbsupport.c 2004-09-02 15:18:00.000000000 -0400 +++ linux-2.6.8.1/kdb/kdbsupport.c 2004-09-29 13:22:21.707916008 -0400 @@ -27,14 +27,6 @@ #include #include -#ifdef CONFIG_MODULES -extern struct list_head *kdb_modules; -#endif - -/* These will be re-linked against their real values during the second link stage */ -extern unsigned long kallsyms_addresses[] __attribute__((weak));; -extern unsigned long kallsyms_num_syms __attribute__((weak)); -extern char kallsyms_names[] __attribute__((weak)); /* * Symbol table functions. @@ -46,7 +38,7 @@ * Return the address of the given symbol. * * Parameters: - * symname Character string containing symbol name + * symname Character string containing symbol name * symtab Structure to receive results * Outputs: * Returns: @@ -57,55 +49,12 @@ * Remarks: */ -int -kdbgetsymval(const char *symname, kdb_symtab_t *symtab) -{ - int i; - char *name = kallsyms_names; - char namebuf[128]; - if (KDB_DEBUG(AR)) - kdb_printf("kdbgetsymval: symname=%s, symtab=%p\n", symname, symtab); - memset(symtab, 0, sizeof(*symtab)); - - namebuf[127] = 0; - namebuf[0] = 0; - for (i = 0; i < kallsyms_num_syms; i++) { - unsigned prefix = *name++; - strncpy(namebuf + prefix, name, 127 - prefix); - if (strcmp(namebuf, symname) == 0) { - /* found */ - symtab->sym_start = kallsyms_addresses[i]; - if (KDB_DEBUG(AR)) - kdb_printf("kdbgetsymval: returns 1, symtab->sym_start=0x%lx\n", symtab->sym_start); - return(1); - } - name += strlen(name) + 1; - } -#ifdef CONFIG_MODULES - { - struct module *mod; - /* look into modules */ - list_for_each_entry(mod, kdb_modules, list) { - for (i = 1; i < mod->num_symtab; i++) { - if (mod->symtab[i].st_shndx == SHN_UNDEF) - continue; - name = mod->strtab + mod->symtab[i].st_name; - if (strcmp(name, symname) == 0) { - /* found */ - symtab->sym_start = mod->symtab[i].st_value; - if (KDB_DEBUG(AR)) - kdb_printf("kdbgetsymval: returns 1, symtab->sym_start=0x%lx\n", symtab->sym_start); - return(1); - } - } - } - } -#endif /* CONFIG_MODULES */ - if (KDB_DEBUG(AR)) - kdb_printf("kdbgetsymval: returns 0\n"); - return(0); -} +/* These will be re-linked against their real values during the second link stage */ +extern unsigned long kallsyms_addresses[] __attribute__((weak)); +extern unsigned long kallsyms_num_syms __attribute__((weak)); +extern char kallsyms_names[] __attribute__((weak)); +extern char _end; /* * kdbnearsym @@ -114,8 +63,8 @@ * less than 'addr'. * * Parameters: - * addr Address to check for symbol near - * symtab Structure to receive results + * addr Address to check for symbol near + * symtab Structure to receive results * Outputs: * Returns: * 0 No sections contain this address, symtab zero filled @@ -123,189 +72,164 @@ * Locking: * None. * Remarks: - * 2.6 kallsyms has a "feature" where it unpacks the name into a string. - * If that string is reused before the caller expects it then the caller - * sees its string change without warning. To avoid cluttering up the - * main kdb code with lots of kdb_strdup, tests and kfree calls, kdbnearsym - * maintains an LRU list of the last few unique strings. The list is sized - * large enough to hold active strings, no kdb caller of kdbnearsym makes - * more than ~20 later calls before using a saved value. */ int kdbnearsym(unsigned long addr, kdb_symtab_t *symtab) { - int ret; - unsigned long symbolsize; - unsigned long offset; - static char *knt[100]; /* kdb name table, arbitrary size */ -#define knt1_size 128 /* must be >= kallsyms table size */ - char *knt1 = kmalloc(knt1_size, GFP_ATOMIC); + const char *name; + char *modname; + long size, offset; + int h, l , m; - if (!knt1) { - kdb_printf("kdbnearsym: addr=0x%lx cannot kmalloc knt1\n", addr); + if (!kallsyms_addresses) { + kdb_printf("kdbnearsym: no symbol table\n"); return 0; } - - if (KDB_DEBUG(AR)) - kdb_printf("kdbnearsym: addr=0x%lx, symtab=%p\n", addr, symtab); - + name = NULL; + if (addr > (unsigned long)&_end) { + name = module_address_lookup(addr, &size, &offset, &modname); + } else if (addr > PAGE_OFFSET) { + l = 0; + h = kallsyms_num_syms-1; + m = (h+l)/2; + while (h > l+1) { + if (kallsyms_addresses[m] > addr) + h = m; + else + l = m; + m = (h+l)/2; + } + if (kallsyms_addresses[h] <= addr) + l = h; + h = l+1; + name = kallsyms_names; + for (m = 0; m < l ; m++) + name += strlen(name)+1; + size = kallsyms_addresses[h] - kallsyms_addresses[l]; + offset = addr - kallsyms_addresses[l]; + modname = NULL; + } memset(symtab, 0, sizeof(*symtab)); - symtab->sym_name = kallsyms_lookup(addr, &symbolsize , &offset, (char **)(&symtab->mod_name), knt1); + if (!name) + return 0; + symtab->sym_name = name; symtab->sym_start = addr - offset; - symtab->sym_end = symtab->sym_start + symbolsize; - ret = symtab->sym_name != NULL && *(symtab->sym_name) != '\0'; + symtab->sym_end = addr - offset + size; + symtab->mod_name = modname ? modname : "kernel"; + return 1; +} - if (ret) { - int i; - /* Another 2.6 kallsyms "feature". Sometimes the sym_name is - * set but the buffer passed into kallsyms_lookup is not used, - * so it contains garbage. The caller has to work out which - * buffer needs to be saved. - * - * What was Rusty smoking when he wrote that code? - */ - if (symtab->sym_name != knt1) { - strncpy(knt1, symtab->sym_name, knt1_size); - knt1[knt1_size-1] = '\0'; - } - for (i = 0; i < ARRAY_SIZE(knt); ++i) { - if (knt[i] && strcmp(knt[i], knt1) == 0) - break; - } - if (i >= ARRAY_SIZE(knt)) { - memcpy(knt, knt+1, sizeof(knt[0])*(ARRAY_SIZE(knt)-1)); - i = ARRAY_SIZE(knt)-1; - } else { - kfree(knt1); - knt1 = knt[i]; - memcpy(knt+i, knt+i+1, sizeof(knt[0])*(ARRAY_SIZE(knt)-i-1)); - i = ARRAY_SIZE(knt) - 1; - } - knt[i] = knt1; - symtab->sym_name = knt[i]; - } +#define first_symbol(index, string, value, module) \ + index = 0; \ + string = kallsyms_names; \ + module = NULL; \ + value = kallsyms_addresses[0]; - if (symtab->mod_name == NULL) - symtab->mod_name = "kernel"; - if (KDB_DEBUG(AR)) - kdb_printf("kdbnearsym: returns %d symtab->sym_start=0x%lx, symtab->mod_name=%p, symtab->sym_name=%p (%s)\n", ret, symtab->sym_start, symtab->mod_name, symtab->sym_name, symtab->sym_name); - return ret; -} +#define next_symbol(index, string, value, module) \ + if (++index < kallsyms_num_syms) { \ + string += strlen(string)+1; \ + value = kallsyms_addresses[index]; \ + } else { \ + string = module_symbol_index(index-kallsyms_num_syms, &value, &module); \ + } -/* - * kallsyms_symbol_complete - * - * Parameters: - * prefix_name prefix of a symbol name to lookup - * Returns: - * Number of symbols which match the given prefix. - */ +/* paramter prefix_name is a buffer provided by the caller, it must ends with '\0'. */ +/* return the extra string together with the given prefix of a symbol name. */ +/* return 0 means no prefix string is found. */ +/* return >0 means prefix string is found. */ +/* Prefix of a symbol name to lookup */ int kallsyms_symbol_complete(char *prefix_name) { - char *name = kallsyms_names; - int i; - char namebuf[128]; - int prefix_len = strlen(prefix_name); - int number = 0; - - /* look into kernel symbols */ - - for (i=0; i < kallsyms_num_syms; i++) { - unsigned prefix = *name++; - strncpy(namebuf + prefix, name, 127 - prefix); - if (strncmp(namebuf, prefix_name, prefix_len) == 0) { - /* found */ - ++number; - } - name += strlen(name) + 1; - } -#ifdef CONFIG_MODULES - { - struct module *mod; - /* look into modules symbols */ - list_for_each_entry(mod, kdb_modules, list) { - for (i = 1; i < mod->num_symtab; i++) { - if (mod->symtab[i].st_shndx == SHN_UNDEF) - continue; - name = mod->strtab + mod->symtab[i].st_name; - if (strncmp(name, prefix_name, prefix_len) == 0) { - /* found */ - ++number; + int prefix_len=strlen(prefix_name); + int last_pos=0; + int number=0; + const char *p, *mod; + unsigned long value; + int i, j; + + first_symbol(i, p, value, mod); + while (p) { + if (strncmp(p, prefix_name,prefix_len) == 0) { + if (number++ == 0) { + last_pos = strlen(p); + strncpy(prefix_name, p, last_pos+1); + } else { + for (j = prefix_len ; j < last_pos; j++) { + if (!p[j] || p[j] != prefix_name[j]) { + last_pos = j; + prefix_name[j] = '\0'; + break; + } + } } } + next_symbol(i, p, value, mod); } - } -#endif /* CONFIG_MODULES */ + return number; } -/* - * kallsyms_symbol_next - * - * Parameters: - * prefix_name prefix of a symbol name to lookup - * flag 0 means search from the head, 1 means continue search. - * Returns: - * 1 if a symbol matches the given prefix. - * 0 if no string found - */ +/* paramter prefix_name is a buffer provided by the caller, it must ends with '\0'. */ +/* parameter flag = 0 means search from the head, flag = 1 means continue search. */ +/* return a symbol string which matches the given prefix. */ +/* return 0 means no prefix string is found. */ +/* return >0 means prefix string is found. */ + +static unsigned int current_index; +static const char *current_string; -int kallsyms_symbol_next(char *prefix_name, int flag) +/* Prefix of a symbol name to lookup */ +/* Indicate if search from the head */ +int kallsyms_symbol_next( char *prefix_name, int flag) { - int prefix_len = strlen(prefix_name); - char namebuf[128]; - static int i; - static char *name; - static struct module *mod; - - if (flag) { - /* continue searching */ - i++; - name += strlen(name) + 1; - } else { - /* new search */ - i = 0; - name = kallsyms_names; - mod = (struct module *)NULL; + int prefix_len=strlen(prefix_name); + unsigned long value; + const char *p, *mod; + + + if(!flag) { + first_symbol(current_index, current_string, value, mod); } - if (mod == (struct module *)NULL) { - /* look into kernel symbols */ - for (; i < kallsyms_num_syms; i++) { - unsigned prefix = *name++; - strncpy(namebuf + prefix, name, 127 - prefix); - if (strncmp(namebuf, prefix_name, prefix_len) == 0) { - /* found */ - strncpy(prefix_name, namebuf, strlen(namebuf)+1); - return(1); - } - name += strlen(name) + 1; + while ((p = current_string)) { + next_symbol(current_index, current_string, value, mod); + if (strncmp(p, prefix_name,prefix_len) == 0) { + strncpy(prefix_name, p, strlen(p)+1); + return 1; } -#ifdef CONFIG_MODULES - /* not found */ - i = 1; - mod = list_entry(kdb_modules->next, struct module, list); - } - /* look into modules */ - for (; &mod->list != kdb_modules; mod = - list_entry(mod->list.next, struct module, list)) - for (; i < mod->num_symtab; i++) { - if (mod->symtab[i].st_shndx == SHN_UNDEF) - continue; - name = mod->strtab + mod->symtab[i].st_name; - if (strncmp(name, prefix_name, prefix_len) == 0) { - /* found */ - strncpy(prefix_name, name, strlen(name)+1); - return(1); - } - } -#else /* CONFIG_MODULES */ } -#endif /* CONFIG_MODULES */ - return(0); + return 0; +} + +int +kdbgetsymval(const char *symname, kdb_symtab_t *symtab) +{ + unsigned long value; + const char *p, *mod; + int i; + + if (!kallsyms_addresses) { + kdb_printf("kdbgetsymval: no symbol table\n"); + return 0; + } + first_symbol(i, p, value, mod); + while (p) { + if (strcmp(p, symname) == 0) + break; + next_symbol (i, p, value, mod); + } + if (!p) + return 0; + /* + * Use the value based lookup to find the symbol's size. + */ + i = kdbnearsym(value, symtab); + /* return the name we matched. */ + symtab->sym_name = p; + return(i); } #if defined(CONFIG_SMP) Binary files linux-2.6.8.1.orig/kernel/config_data.gz and linux-2.6.8.1/kernel/config_data.gz differ diff -urN -Xdontdiff linux-2.6.8.1.orig/kernel/kallsyms.c linux-2.6.8.1/kernel/kallsyms.c --- linux-2.6.8.1.orig/kernel/kallsyms.c 2004-09-02 15:18:00.000000000 -0400 +++ linux-2.6.8.1/kernel/kallsyms.c 2004-09-29 12:20:44.000000000 -0400 @@ -14,11 +14,7 @@ #include #include -#ifdef CONFIG_KDB -#define kdb 1 -#else -#define kdb 0 -#endif +static int stem_compression = 1; /* These will be re-linked against their real values during the second link stage */ extern unsigned long kallsyms_addresses[] __attribute__((weak)); @@ -27,7 +23,6 @@ /* Defined by the linker script. */ extern char _stext[], _etext[], _sinittext[], _einittext[]; -extern char _end[]; /* for CONFIG_KDB */ static inline int is_kernel_inittext(unsigned long addr) { @@ -44,12 +39,6 @@ return 0; } -/* kdb treats all kernel addresses as valid, including data */ -static inline int is_kernel(unsigned long addr) -{ - return (addr >= (unsigned long)_stext && addr <= (unsigned long)_end); -} - /* Lookup the address for this symbol. Returns 0 if not found. */ unsigned long kallsyms_lookup_name(const char *name) { @@ -82,30 +71,26 @@ namebuf[KSYM_NAME_LEN] = 0; namebuf[0] = 0; - if ((kdb && is_kernel(addr)) || - (!kdb && (is_kernel_text(addr) || is_kernel_inittext(addr)))) { + + if (is_kernel_text(addr) || is_kernel_inittext(addr)) { unsigned long symbol_end; char *name = kallsyms_names; /* They're sorted, we could be clever here, but who cares? */ for (i = 0; i < kallsyms_num_syms; i++) { - if (kallsyms_addresses[i] > kallsyms_addresses[best] && + if (kallsyms_addresses[i] >= kallsyms_addresses[best] && kallsyms_addresses[i] <= addr) best = i; } + /* Grab name */ - for (i = 0; i <= best; i++) { - unsigned prefix = *name++; - strncpy(namebuf + prefix, name, KSYM_NAME_LEN - prefix); - name += strlen(name) + 1; - } /* At worst, symbol ends at end of section. */ if (is_kernel_inittext(addr)) symbol_end = (unsigned long)_einittext; else - symbol_end = kdb ? (unsigned long)_end : (unsigned long)_etext; + symbol_end = (unsigned long)_etext; /* Search for next non-aliased symbol */ for (i = best+1; i < kallsyms_num_syms; i++) { @@ -118,7 +103,18 @@ *symbolsize = symbol_end - kallsyms_addresses[best]; *modname = NULL; *offset = addr - kallsyms_addresses[best]; - return namebuf; + if (stem_compression) { + for (i = 0; i <= best; i++) { + unsigned prefix = *name++; + strncpy(namebuf + prefix, name, KSYM_NAME_LEN - prefix); + name += strlen(name) + 1; + } + return namebuf; + } + for (i = 0; i < best; i++) + name += strlen(name)+1; + strncpy(namebuf, name, KSYM_NAME_LEN); + return name; } return module_address_lookup(addr, symbolsize, offset, modname); @@ -185,7 +181,11 @@ /* First char of each symbol name indicates prefix length shared with previous name (stem compression). */ - stemlen = kallsyms_names[off++]; + if (stem_compression) { + stemlen = kallsyms_names[off++]; + } else { + stemlen = 0; + } strlcpy(iter->name+stemlen, kallsyms_names + off, KSYM_NAME_LEN+1-stemlen); @@ -318,6 +318,8 @@ entry = create_proc_entry("kallsyms", 0444, NULL); if (entry) entry->proc_fops = &kallsyms_operations; + + stem_compression = kallsyms_names ? (*kallsyms_names == 0) : 0; return 0; } __initcall(kallsyms_init); diff -urN -Xdontdiff linux-2.6.8.1.orig/kernel/module.c linux-2.6.8.1/kernel/module.c --- linux-2.6.8.1.orig/kernel/module.c 2004-09-02 15:18:00.000000000 -0400 +++ linux-2.6.8.1/kernel/module.c 2004-09-29 12:20:44.000000000 -0400 @@ -38,6 +38,10 @@ #include #include +#ifdef CONFIG_KDB +#include +#endif + #if 0 #define DEBUGP printk #else @@ -2038,6 +2042,30 @@ } #endif /* CONFIG_KALLSYMS */ +#ifdef CONFIG_KDB +/* + * Allow the debugger to iterate over the symbols for all of + * the currently loaded modules. The enumeration of the + * symbols will change when ever a module loaded or unloaded. + */ +const char *module_symbol_index(unsigned int index, + unsigned long *value, const char **modname) +{ + struct module *mod; + + list_for_each_entry(mod, &modules, list) { + if (index < mod->num_symtab) { + *value = mod->symtab[index].st_value; + *modname = mod->name; + return mod->strtab + mod->symtab[index].st_name; + } + index -= mod->num_symtab; + } + return NULL; + +} +#endif + /* Called by the /proc file system to return a list of modules. */ static void *m_start(struct seq_file *m, loff_t *pos) { diff -urN -Xdontdiff linux-2.6.8.1.orig/Makefile linux-2.6.8.1/Makefile --- linux-2.6.8.1.orig/Makefile 2004-09-02 15:18:00.000000000 -0400 +++ linux-2.6.8.1/Makefile 2004-09-29 12:24:14.000000000 -0400 @@ -577,7 +577,12 @@ endef quiet_cmd_kallsyms = KSYM $@ +# Disable stem compression and add data symbols for kdb +ifdef CONFIG_KDB +cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) --no-stem-compression --all-symbols > $@ +else cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) $(foreach x,$(CONFIG_KALLSYMS_ALL),--all-symbols) > $@ +endif .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE $(call if_changed_dep,as_o_S) diff -urN -Xdontdiff linux-2.6.8.1.orig/scripts/kallsyms.c linux-2.6.8.1/scripts/kallsyms.c --- linux-2.6.8.1.orig/scripts/kallsyms.c 2004-08-23 16:38:09.000000000 -0400 +++ linux-2.6.8.1/scripts/kallsyms.c 2004-09-29 12:20:44.000000000 -0400 @@ -12,6 +12,7 @@ #include #include #include +#include struct sym_entry { unsigned long long addr; @@ -24,11 +25,12 @@ static int size, cnt; static unsigned long long _stext, _etext, _sinittext, _einittext; static int all_symbols = 0; +static int stem_compression = 1; static void usage(void) { - fprintf(stderr, "Usage: kallsyms [--all-symbols] < in.map > out.S\n"); + fprintf(stderr, "Usage: kallsyms [--no-stem-compression][--all-symbols] < in.map > out.S\n"); exit(1); } @@ -131,7 +133,7 @@ for (i = 0; i < cnt; i++) { if (!symbol_valid(&table[i])) continue; - + printf("\tPTR\t%#llx\n", table[i].addr); valid++; } @@ -153,10 +155,16 @@ if (!symbol_valid(&table[i])) continue; - for (k = 0; table[i].sym[k] && table[i].sym[k] == prev[k]; ++k) - ; + if (stem_compression) { + for (k = 0; table[i].sym[k] && table[i].sym[k] == prev[k]; ++k) + ; + + printf("\t.byte 0x%02x\n\t.asciz\t\"%s\"\n", + k, table[i].sym + k); + } else { + printf("\t.asciz\t\"%s\"\n", table[i].sym); + } - printf("\t.byte 0x%02x\n\t.asciz\t\"%s\"\n", k, table[i].sym + k); prev = table[i].sym; } printf("\n"); @@ -165,10 +173,13 @@ int main(int argc, char **argv) { - if (argc == 2 && strcmp(argv[1], "--all-symbols") == 0) - all_symbols = 1; - else if (argc != 1) - usage(); + while(++argv,--argc) { + if (strcmp(*argv, "--all-symbols") == 0) + all_symbols = 1; + else if (strcmp(*argv, "--no-stem-compression") == 0) + stem_compression = 0; + else usage(); + } read_map(stdin); write_src(); --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Sep 29 19:19:19 2004 Received: with ECARTIS (v1.0.0; list kdb); Wed, 29 Sep 2004 19:19:27 -0700 (PDT) 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 i8U2JIDG006037 for ; Wed, 29 Sep 2004 19:19:19 -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 MAA18329 for ; Thu, 30 Sep 2004 12:19:01 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 11EDAC00AC; Thu, 30 Sep 2004 12:18:57 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 0E6E41406E7; Thu, 30 Sep 2004 12:18:57 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: jim.houston@comcast.net Cc: kdb@oss.sgi.com Subject: Re: [PATCH] fix symbol completion In-reply-to: Your message of "29 Sep 2004 14:53:08 -0400." Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 30 Sep 2004 12:18:56 +1000 Message-ID: <6851.1096510736@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 839 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 29 Sep 2004 14:53:08 -0400, Jim Houston wrote: >Attached is a patch which will fix the kdb symbol completion >problem I described yesterday. It replaces most of the symbol >table handling with the version from the port I did last fall. Your patch hits 7 files Makefile | 5 include/linux/module.h | 14 + kdb/kdbsupport.c | 350 +++++++++++++++++++------------------------------ kernel/kallsyms.c | 48 +++--- kernel/module.c | 28 +++ scripts/kallsyms.c | 29 ++-- 7 files changed, 229 insertions(+), 245 deletions(-) Too intrusive into the rest of the kernel. Smaller and less intrusive (only changes kdb) patch below. >I have not looked at the code yet to check for the buffer >overflow you described. As long as the buffers are larger >than the longest symbol in the kernel/module symbol tables >I would not expect a problem. Overflow could occur with a long command line and tab completion. I added a paranoid maximum length parameter to avoid this. include/linux/kdbprivate.h | 2 - kdb/kdb_io.c | 5 ++-- kdb/kdbsupport.c | 46 ++++++++++++++++++++++++++++++++++++--------- 3 files changed, 41 insertions(+), 12 deletions(-) Index: linux/include/linux/kdbprivate.h =================================================================== --- linux.orig/include/linux/kdbprivate.h Wed Sep 29 16:54:05 2004 +++ linux/include/linux/kdbprivate.h Thu Sep 30 11:43:23 2004 @@ -91,7 +91,7 @@ typedef struct __ksymtab { unsigned long sym_end; } kdb_symtab_t; extern int kallsyms_symbol_next(char *prefix_name, int flag); -extern int kallsyms_symbol_complete(char *prefix_name); +extern int kallsyms_symbol_complete(char *prefix_name, int max_len); /* * Exported Symbols for kernel loadable modules to use. Index: linux/kdb/kdb_io.c =================================================================== --- linux.orig/kdb/kdb_io.c Wed Sep 29 16:54:05 2004 +++ linux/kdb/kdb_io.c Thu Sep 30 11:47:44 2004 @@ -316,8 +316,9 @@ kdb_read(char *buffer, size_t bufsize) else p_tmp = tmpbuffer; len = strlen(p_tmp); + count = kallsyms_symbol_complete(p_tmp, sizeof(tmpbuffer) - (p_tmp - tmpbuffer)); if (tab == 2) { - if((count=kallsyms_symbol_complete(p_tmp))>0) { + if (count > 0) { kdb_printf("\n%d symbols are found.", count); if(count>dtab_count) { count=dtab_count; @@ -337,7 +338,7 @@ kdb_read(char *buffer, size_t bufsize) } } else { - if(kallsyms_symbol_complete(p_tmp)>0) { + if (count > 0) { len_tmp = strlen(p_tmp); strncpy(p_tmp+len_tmp,cp, lastchar-cp+1); len_tmp = strlen(p_tmp); Index: linux/kdb/kdbsupport.c =================================================================== --- linux.orig/kdb/kdbsupport.c Wed Sep 29 16:54:05 2004 +++ linux/kdb/kdbsupport.c Thu Sep 30 12:11:30 2004 @@ -199,26 +199,52 @@ kdbnearsym(unsigned long addr, kdb_symta * * Parameters: * prefix_name prefix of a symbol name to lookup + * max_len maximum length that can be returned * Returns: * Number of symbols which match the given prefix. + * Notes: + * prefix_name is changed to contain the longest unique prefix that + * starts with this prefix (tab completion). */ -int kallsyms_symbol_complete(char *prefix_name) +static char ks_namebuf[128], ks_namebuf_prev[128]; + +static void +ksc_maximum(int number, int max_len, int *prev_len) +{ + /* Work out the longest name that matches the prefix */ + int i; + if (number == 1) { + *prev_len = min_t(int, max_len-1, strlen(ks_namebuf)); + memcpy(ks_namebuf_prev, ks_namebuf, *prev_len); + ks_namebuf_prev[*prev_len] = '\0'; + return; + } + for (i = 0; i < *prev_len; ++i) { + if (ks_namebuf[i] != ks_namebuf_prev[i]) { + *prev_len = i; + ks_namebuf_prev[i] = '\0'; + break; + } + } +} + +int kallsyms_symbol_complete(char *prefix_name, int max_len) { char *name = kallsyms_names; int i; - char namebuf[128]; - int prefix_len = strlen(prefix_name); + int prefix_len = strlen(prefix_name), prev_len = 0; int number = 0; /* look into kernel symbols */ for (i=0; i < kallsyms_num_syms; i++) { unsigned prefix = *name++; - strncpy(namebuf + prefix, name, 127 - prefix); - if (strncmp(namebuf, prefix_name, prefix_len) == 0) { + strncpy(ks_namebuf + prefix, name, 127 - prefix); + if (strncmp(ks_namebuf, prefix_name, prefix_len) == 0) { /* found */ ++number; + ksc_maximum(number, max_len, &prev_len); } name += strlen(name) + 1; } @@ -234,11 +260,14 @@ int kallsyms_symbol_complete(char *prefi if (strncmp(name, prefix_name, prefix_len) == 0) { /* found */ ++number; + ksc_maximum(number, max_len, &prev_len); } } } } #endif /* CONFIG_MODULES */ + if (prev_len > prefix_len) + memcpy(prefix_name, ks_namebuf_prev, prev_len+1); return number; } @@ -256,7 +285,6 @@ int kallsyms_symbol_complete(char *prefi int kallsyms_symbol_next(char *prefix_name, int flag) { int prefix_len = strlen(prefix_name); - char namebuf[128]; static int i; static char *name; static struct module *mod; @@ -276,10 +304,10 @@ int kallsyms_symbol_next(char *prefix_na /* look into kernel symbols */ for (; i < kallsyms_num_syms; i++) { unsigned prefix = *name++; - strncpy(namebuf + prefix, name, 127 - prefix); - if (strncmp(namebuf, prefix_name, prefix_len) == 0) { + strncpy(ks_namebuf + prefix, name, 127 - prefix); + if (strncmp(ks_namebuf, prefix_name, prefix_len) == 0) { /* found */ - strncpy(prefix_name, namebuf, strlen(namebuf)+1); + strncpy(prefix_name, ks_namebuf, strlen(ks_namebuf)+1); return(1); } name += strlen(name) + 1; --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.