Skip to contentSkip to conversation

Patch to use gdb's bt in crash - works great with kgdb! - KGDB in Linus Kernel.

RFC Piet Delaney 5 participants 12 messages Aug 30, 2006 – Dec 13, 2006 5 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#5 lore raw
In reply to a message not in the archive
Quoted 11 lines · Vivek Goyal
Quoted 9 lines · Piet Delaney
Quoted 4 lines

Simple question -- and to be quite honest with you -- I don't understand why you wouldn't want to simply use gdb alone in this case?

I don't see any reason for core file not to be read correctly by gdb. It's convenient to use gdb directly sometimes, for example while using the ddd GUI.

Quoted 5 lines

You can run gdb to open core files as of today but the debugging capability will be limited. For ex. kernel core headers have the info of linearly mapped region only and they don't contain the virt address info of non-linearly mapped regions. So one can not debug the non-linearly mapped regions like modules.

Amit's modified gdb might help for that problem. I haven't used it but it allows gdb to load debug information about modules. You can also use a script Amit wrote to explicitly load module info into stock gdb; that also might work with kernel core files.

Quoted 8 lines
Quoted 5 lines

kgdb isn't having any problems with kernel threads back traces. The kernel objects are tweaked with dwarf code, but I see no problem with using the same paradigm with crash. Works great.

Can you give some more details on what do you mean by kernel objects are tweaked with dwarf code.

Attached is the cfi_annotations.patch patch from the kgdb-2.6.16 patch which is part of the kgdb patch series. I believe George Anzinger used a similar dwarf patch in the 2.6 mm series patches that Andrew provided. I think Tom Rini wrote both of them.

Quoted 6 lines
Quoted 3 lines

I'd prefer to have crash and ddd+gdb operate on kernel core files.

You can already do that. Its just a matter of figuring out how to get good backtraces both with "crash" as well as "gdb".

I think Tom Rini's cfi_annotations could be a big part of that solution.

Quoted 9 lines
Quoted 9 lines

Even better it would be nice to be able to simulate execution on a stack of a core file to be able to re-execute code that caused the crash. I frequently found it convenient after a panic to move the pc to the end of panic, and continue back up the stack to a break point at the system call. Then I'd use the GUI to move the pc to before the execution of the system call and execute it again and watch how the return value was derived that caused the panic.

Quoted 8 lines
Quoted 5 lines

I expect that if you run a kgdb kernel, including the drarf code, that gdb will have no problem with core dumps. It's convenient to have kgdb configured in the kernel and have the option to continue analysis later with gdb/crash.

Is kgdb mainline? I think some time back Andrew had dropped the patches from -mm too.

Yes, I think he had a number of issues with the kgdb patch but I can't recall reading exactly what they are. One I believe is that the kgdb patch should be completly non-invasive if not configured in. Currently some files that are patched don't have #ifdef CONFIG_KGDB in them. I noticed one last night while checking in some code.

I'd like to put those #ifdef's back in and make it part of the std distribution. As I recall George Anzinger's patch had absolutely no impact on the kernel if not configured in. Seems very important to me.

Quoted 3 lines

I don't know if distros carry kgdb or not? So not sure
for how many people will it be helpful to enable kgdb and then take core dumps for better back traces.

More for larger servers like a Sun NUMA system. I'd find it convenient to be able to go back a look at a crash of something that I looked at previously. Might be good for bug reports to have references to core files backing up a bug fix.

Quoted 4 lines

I don't know much about tweaking objects with dwarf code but got a general question. Why can't it be an independent patch in kernel independent of kgdb. (If it helps in getting better backtraces.)

Exactly. Locally I just checked in code that I expect will be useful for kgdb or kdump. Stuff like compiling the kernel -O0 and converting static inline functions to inline. Code to provide dwarf info and save registers during a panic seem to also qualify.

My preference is for kgdb, like kexec, to become part of the mainstream kernel as a configurable component. Perhaps Andrew could enumerate his issues. It would make cooperation between kgdb and crash a bit easier and make kernel debugging a lot easier for the masses. Recent kgdb patches seem to be getting much better.

-piet

Quoted 4 lines

Thanks
Vivek

Signature · 4 lines
Piet Delaney
BlueLane Teck
W: (408) 200-5256; [email protected]
H: (408) 243-8872; [email protected]
#6 lore raw
Quoted 2 lines · On Wed, 30 Aug 2006 14:41:32 -0700 Piet Delaney <[email protected]> wrote:

My preference is for kgdb, like kexec, to become part of the mainstream kernel as a configurable component.

Me too. And I expect I could talk Linus into it if a) it works well on a transport other-than-rs232 and b) the patches are nice and clean.

Quoted 2 lines

Perhaps Andrew
could enumerate his issues.

a) and b) above. Plus: I'd want to see a maintainance person or team who respond promptly to email and who remain reasonably engaged with what's going on in the mainline kernel. Because if problems crop up (and they will), I don't want to have to be the bunny who has to worry about them...

#11 lore raw
In reply to Piet Delaney
Quoted 29 lines · On Wed, 30 Aug 2006 14:41:32 -0700 Piet Delaney wrote:
Quoted 11 lines · Vivek Goyal
Quoted 9 lines · Piet Delaney
Quoted 4 lines

Simple question -- and to be quite honest with you -- I don't understand why you wouldn't want to simply use gdb alone in this case?

I don't see any reason for core file not to be read correctly by gdb. It's convenient to use gdb directly sometimes, for example while using the ddd GUI.

Quoted 5 lines

You can run gdb to open core files as of today but the debugging capability will be limited. For ex. kernel core headers have the info of linearly mapped region only and they don't contain the virt address info of non-linearly mapped regions. So one can not debug the non-linearly mapped regions like modules.

Amit's modified gdb might help for that problem. I haven't used it but it allows gdb to load debug information about modules. You can also use a script Amit wrote to explicitly load module info into stock gdb; that also might work with kernel core files.

Quoted 6 lines
Quoted 5 lines

kgdb isn't having any problems with kernel threads back traces. The kernel objects are tweaked with dwarf code, but I see no problem with using the same paradigm with crash. Works great.

Quoted 7 lines
Quoted 2 lines

Can you give some more details on what do you mean by kernel objects are tweaked with dwarf code.

Attached is the cfi_annotations.patch patch from the kgdb-2.6.16 patch which is part of the kgdb patch series. I believe George Anzinger used a similar dwarf patch in the 2.6 mm series patches that Andrew provided. I think Tom Rini wrote both of them.

ENOPATCH

---
~Randy

#12 lore raw
Quoted 34 lines · Randy.Dunlap
Quoted 32 lines · On Wed, 30 Aug 2006 14:41:32 -0700 Piet Delaney wrote:
Quoted 11 lines · Vivek Goyal
Quoted 9 lines · Piet Delaney
Quoted 4 lines

Simple question -- and to be quite honest with you -- I don't understand why you wouldn't want to simply use gdb alone in this case?

I don't see any reason for core file not to be read correctly by gdb. It's convenient to use gdb directly sometimes, for example while using the ddd GUI.

Quoted 5 lines

You can run gdb to open core files as of today but the debugging capability will be limited. For ex. kernel core headers have the info of linearly mapped region only and they don't contain the virt address info of non-linearly mapped regions. So one can not debug the non-linearly mapped regions like modules.

Amit's modified gdb might help for that problem. I haven't used it but it allows gdb to load debug information about modules. You can also use a script Amit wrote to explicitly load module info into stock gdb; that also might work with kernel core files.

Quoted 8 lines
Quoted 5 lines

kgdb isn't having any problems with kernel threads back traces. The kernel objects are tweaked with dwarf code, but I see no problem with using the same paradigm with crash. Works great.

Can you give some more details on what do you mean by kernel objects are tweaked with dwarf code.

Quoted 6 lines
Quoted 4 lines

Attached is the cfi_annotations.patch patch from the kgdb-2.6.16 patch which is part of the kgdb patch series. I believe George Anzinger used a similar dwarf patch in the 2.6 mm series patches that Andrew provided. I think Tom Rini wrote both of them.

ENOPATCH

Opps.

-piet

Quoted 3 lines

---
~Randy

Signature · 4 lines
Piet Delaney
BlueLane Teck
W: (408) 200-5256; [email protected]
H: (408) 243-8872; [email protected]

There are some parts of the kernel where you simply cannot unwind past. This does not, however, stop GDB from trying, and getting stuck in an infinite loop (it will get garbage back, try and unwind that, repeat). The way to fix this is to manually insert some DWARF2 information into the kernel so that GDB will cleanly (or almost cleanly, it will get the same frame twice, and stop) stop. George wrote much of the IMHO hard part here (i386 & the macros) and I expanded this to all of the other arches. This adds a small amount to the DEBUG_INFO=y kernel size, but that's not unexpected.

 Makefile                     |    9
 arch/arm/kernel/entry-armv.S |    2
 arch/i386/kernel/entry.S     |  111 +++++-
 arch/i386/kernel/head.S      |    5
 arch/i386/kernel/process.c   |   20 +
 arch/i386/kernel/smpboot.c   |    3
 arch/x86_64/kernel/entry.S   |    2
 include/asm-arm/kgdb.h       |    7
 include/asm-generic/kgdb.h   |   34 +
 include/asm-i386/kgdb.h      |   59 +--
 include/asm-mips/kgdb.h      |    4
 include/asm-powerpc/kgdb.h   |    1
 include/asm-sh/kgdb.h        |    1
 include/asm-x86_64/kgdb.h    |    4
 include/linux/dwarf2-lang.h  |  300 ++++++++++++++++
 include/linux/dwarf2.h       |  775 +++++++++++++++++++++++++++++++++++++++++++
 scripts/dwarfh.awk           |   19 +
 17 files changed, 1324 insertions(+), 32 deletions(-)
Makefile +7 -2
Index: linux-2.6.16/Makefile
===================================================================
@@ -1001,7 +1001,8 @@
 MRPROPER_DIRS  += include/config include2
 MRPROPER_FILES += .config .config.old include/asm .version .old_version \
                   include/linux/autoconf.h include/linux/version.h \
-		  .kernelrelease Module.symvers tags TAGS cscope*
+		   include/linux/dwarf2-defs.h .kernelrelease \
+			Module.symvers tags TAGS cscope*
 
 # clean - Delete most, but leave enough to build external modules
 #
@@ -1347,4 +1348,8 @@
 
 endif	# skip-makefile
 
-FORCE:
+include/linux/dwarf2-defs.h: $(srctree)/include/linux/dwarf2.h $(srctree)/scripts/dwarfh.awk
+	mkdir -p include/linux/
+	awk -f $(srctree)/scripts/dwarfh.awk $(srctree)/include/linux/dwarf2.h > include/linux/dwarf2-defs.h
+
+FORCE: include/linux/dwarf2-defs.h
arch/i386/kernel/process.c +20 -0
Index: linux-2.6.16/arch/i386/kernel/process.c
===================================================================
@@ -330,7 +330,27 @@
 	"call *%ebx\n\t"
 	"pushl %eax\n\t"
 	"call do_exit\n"
+	"kernel_thread_helper_end:\n\t"
 	".previous");
+#ifdef CONFIG_KGDB
+#include <linux/dwarf2-lang.h>
+
+	/* This dwarf code tells gdb that this is the end of the unwind */
+	/* This uses the CFA set up for pc=1 located in entry.S */
+#define _ESP 4
+#define _PC  8
+#define _EIP 8
+__asm__(
+	QUOTE_THIS(
+		CFI_preamble(dwarf_4,_PC,1,1)
+		CFA_define_reference(_ESP,0)	/* Stack pointer */
+		CFA_undefine_reg(_EIP)
+		CFI_postamble()
+
+		FDE_preamble(dwarf_4,kernel_thread_helper,kernel_thread_helper_end)
+		FDE_postamble()
+		));
+#endif
 
 /*
  * Create a kernel thread
arch/i386/kernel/head.S +4 -1
Index: linux-2.6.16/arch/i386/kernel/head.S
===================================================================
@@ -11,6 +11,7 @@
 #include <linux/config.h>
 #include <linux/threads.h>
 #include <linux/linkage.h>
+#include <asm/kgdb.h>
 #include <asm/segment.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
@@ -332,7 +333,9 @@
 L6:
 	jmp L6			# main should never return here, but
 				# just in case, we know what happens.
-
+	/* This dwarf code tells gdb that this is the end of the unwind */
+	/* This uses the CFA set up for pc=1 located in entry.S */
+	CFI_END_FRAME(is386)
 /*
  * We depend on ET to be correct. This checks for 287/387.
  */
arch/i386/kernel/entry.S +108 -3

132 lines not on this page · raw message

arch/i386/kernel/smpboot.c +3 -0
Index: linux-2.6.16/arch/i386/kernel/smpboot.c
===================================================================
@@ -564,6 +564,9 @@
 
 	asm volatile(
 		"movl %0,%%esp\n\t"
+#ifdef CONFIG_KGDB
+		"pushl end_of_stack_stop_unwind_function\n\t"
+#endif
 		"jmp *%1"
 		:
 		:"r" (current->thread.esp),"r" (current->thread.eip));
arch/x86_64/kernel/entry.S +2 -0
Index: linux-2.6.16/arch/x86_64/kernel/entry.S
===================================================================
@@ -42,6 +42,7 @@
 #include <asm/thread_info.h>
 #include <asm/hw_irq.h>
 #include <asm/page.h>
+#include <asm/kgdb.h>
 
 	.code64
 
@@ -860,6 +861,7 @@
 	UNFAKE_STACK_FRAME
 	ret
 	CFI_ENDPROC
+	CFI_END_FRAME(kernel_thread)
 
 	
 child_rip:
arch/arm/kernel/entry-armv.S +2 -0
Index: linux-2.6.16/arch/arm/kernel/entry-armv.S
===================================================================
@@ -16,6 +16,7 @@
  */
 #include <linux/config.h>
 
+#include <asm/kgdb.h>
 #include <asm/memory.h>
 #include <asm/glue.h>
 #include <asm/vfpmacros.h>
@@ -232,6 +233,7 @@
 	beq	preempt_return			@ go again
 	b	1b
 #endif
+	CFI_END_FRAME(__irq_svc)
 
 	.align	5
 __und_svc:
include/asm-x86_64/kgdb.h +4 -0
Index: linux-2.6.16/include/asm-x86_64/kgdb.h
===================================================================
@@ -6,6 +6,8 @@
  * Copyright (C) 2001-2004 Amit S. Kale
  */
 
+#include <asm-generic/kgdb.h>
+
 /*
  *  Note that this register image is in a different order than
  *  the register image that Linux produces at interrupt time.
@@ -36,6 +38,8 @@
 #define NUMREGBYTES		((_PS+1)*8)
 #define NUMCRITREGBYTES		(8 * 8)		/* 8 registers. */
 
+/* Help GDB to know when to stop backtracing. */
+#define CFI_END_FRAME(func)	__CFI_END_FRAME(_PC,_RSP,func)
 #ifndef __ASSEMBLY__
 /* BUFMAX defines the maximum number of characters in inbound/outbound
  * buffers at least NUMREGBYTES*2 are needed for register packets, and
include/asm-powerpc/kgdb.h +1 -0
Index: linux-2.6.16/include/asm-powerpc/kgdb.h
===================================================================
@@ -23,6 +23,7 @@
 #ifndef __POWERPC_KGDB_H__
 #define __POWERPC_KGDB_H__
 
+#include <asm-generic/kgdb.h>
 #ifndef __ASSEMBLY__
 
 #define BREAK_INSTR_SIZE	4
include/asm-mips/kgdb.h +4 -0
Index: linux-2.6.16/include/asm-mips/kgdb.h
===================================================================
@@ -2,6 +2,9 @@
 #ifndef _ASM_KGDB_H_
 #define _ASM_KGDB_H_
 
+#include <asm-generic/kgdb.h>
+
+#ifndef __ASSEMBLY__
 #define BUFMAX			2048
 #define NUMREGBYTES		(90*sizeof(long))
 #define NUMCRITREGBYTES		(12*sizeof(long))
@@ -17,5 +20,6 @@
 
 extern int kgdb_early_setup;
 
+#endif				/* !__ASSEMBLY__ */
 #endif				/* _ASM_KGDB_H_ */
 #endif				/* __KERNEL__ */
include/asm-generic/kgdb.h +34 -0
Index: linux-2.6.16/include/asm-generic/kgdb.h
===================================================================
@@ -0,0 +1,34 @@
+/*
+ * include/asm-generic/kgdb.h
+ *
+ * This provides the assembly level information so that KGDB can provide
+ * a GDB that has been patched with enough information to know to stop
+ * trying to unwind the function.
+ *
+ * Author: Tom Rini <[email protected]>
+ *
+ * 2005 (c) MontaVista Software, Inc. This file is licensed under the terms
+ * of the GNU General Public License version 2. This program is licensed
+ * "as is" without any warranty of any kind, whether express or implied.
+ */
+
+#ifndef __ASM_GENERIC_KGDB_H__
+#define __ASM_GENERIC_KGDB_H__
+
+#include <linux/dwarf2-lang.h>
+#ifdef __ASSEMBLY__
+#ifdef CONFIG_KGDB
+/* This MUST be put at the end of a given assembly function */
+#define __CFI_END_FRAME(pc,sp,func)			\
+CAT3(.Lend_,func,:)					\
+	CFI_preamble(func,pc,0x1,-DATA_ALIGN_FACTOR)	\
+	CFA_define_reference(sp, 0)			\
+	CFA_undefine_reg(pc)				\
+	CFI_postamble()					\
+	FDE_preamble(func,func,CAT3(.Lend,_,func))	\
+	FDE_postamble()
+#else
+#define __CFI_END_FRAME(pc,sp,fn)
+#endif				/* CONFIG_KGDB */
+#endif				/* __ASSEMBLY__ */
+#endif				/* __ASM_GENERIC_KGDB_H__ */
include/linux/dwarf2.h +775 -0

775 lines not on this page · raw message

include/linux/dwarf2-lang.h +300 -0

300 lines not on this page · raw message

include/asm-arm/kgdb.h +6 -1
Index: linux-2.6.16/include/asm-arm/kgdb.h
===================================================================
@@ -14,6 +14,7 @@
 
 #include <linux/config.h>
 #include <asm/ptrace.h>
+#include <asm-generic/kgdb.h>
 
 
 /*
@@ -48,6 +49,7 @@
 
 extern void kgdb_handle_bus_error(void);
 extern int kgdb_fault_expected;
+#endif /* !__ASSEMBLY__ */
 
 /*
  * From Amit S. Kale:
@@ -83,5 +85,8 @@
 #define	_PC		15
 #define	_CPSR		(GDB_MAX_REGS - 1)
 
-#endif /* !__ASSEMBLY__ */
+/* So that we can denote the end of a frame for tracing, in the simple
+ * case. */
+#define CFI_END_FRAME(func)	__CFI_END_FRAME(_PC,_SP,func)
+
 #endif /* __ASM_KGDB_H__ */
include/asm-i386/kgdb.h +34 -25

73 lines not on this page · raw message

include/asm-sh/kgdb.h +1 -0
Index: linux-2.6.16/include/asm-sh/kgdb.h
===================================================================
@@ -14,6 +14,7 @@
 #ifndef __KGDB_H
 #define __KGDB_H
 
+#include <asm-generic/kgdb.h>
 /* Based on sh-gdb.c from gdb-6.1, Glenn
      Engel at HP  Ben Lee and Steve Chamberlain */
 #define NUMREGBYTES	112	/* 92 */
scripts/dwarfh.awk +19 -0
Index: linux-2.6.16/scripts/dwarfh.awk
===================================================================
@@ -0,0 +1,19 @@
+BEGIN {
+	print "#ifndef  _ELF_DWARF_H"
+		print "/* Machine generated from dwarf2.h by scripts/dwarfh.awk */"
+}
+$2 == "=" {
+	gsub(/,/, "", $3)
+	print "#define " $1 "\t " $3
+}
+$1 == "#define" {
+	print $0
+	while( index($0,"\\") == length($0)){
+		getline
+		print $0
+	}
+}
+/.*/ {}
+END {
+	print "#endif"
+}
#7 lore raw
In reply to Andrew Morton
Quoted 4 lines · On Wed, 30 Aug 2006 14:48:22 -0700 Andrew Morton <[email protected]> wrote:

Plus: I'd want to see a maintainance person or team who
respond promptly to email and who remain reasonably engaged with what's going on in the mainline kernel. Because if problems crop up (and they will), I don't want to have to be the bunny who has to worry about them...

umm, clarification needed here.

No criticism of the present maintainers intended! Last time I grabbed the kgdb patches from sf.net they applied nicely, worked quite reliably (much better than the old ones I'd been trying to sustain) and had been tremendously cleaned up.

But if we're to move this work from sf.net to kernel.org, the kgdb maintainers' workload, email load, turnaround time requirements, bug-difficulty and everything else will go up quite a lot, at least short-term. If they don't want to volunteer take that on (perfectly legit and sane) then things should stay as they are.

(otoh, a merge would decrease their patch-maintenance load, and would increase the number of people who fix things for them, and might attract new maintainers).

It's a big step.

#8 lore raw

How about an enumerated list of issues with the existing kgdb patches?

Quoted 8 lines · Andrew Morton
Quoted 4 lines · On Wed, 30 Aug 2006 14:48:22 -0700 Andrew Morton <[email protected]> wrote:

Plus: I'd want to see a maintainance person or team who
respond promptly to email and who remain reasonably engaged with what's going on in the mainline kernel. Because if problems crop up (and they will), I don't want to have to be the bunny who has to worry about them...

Quoted 6 lines

umm, clarification needed here.

No criticism of the present maintainers intended! Last time I grabbed the kgdb patches from sf.net they applied nicely, worked quite reliably (much better than the old ones I'd been trying to sustain) and had been tremendously cleaned up.

So why did you stop including them in the mm patch?

I recall your quality issue and Tom was all in favor of resolving them. Was it too much work cleaning up the patches to meet your needs that lead to the patch being dropped from the mm series?

kgdb over ethernet is working great, and it looks like there is plenty of support on the SF mailing list.

Quoted 6 lines

But if we're to move this work from sf.net to kernel.org, the kgdb maintainers' workload, email load, turnaround time requirements, bug-difficulty and everything else will go up quite a lot, at least short-term. If they don't want to volunteer take that on (perfectly legit and sane) then things should stay as they are.

I've only read a positive point of view on resolving the issues on the mailing list.

Quoted 4 lines

(otoh, a merge would decrease their patch-maintenance load, and would increase the number of people who fix things for them, and might attract new maintainers).

I agree, it would likely attract many more maintainers and be easier to maintain with git than patches.

Quoted 2 lines

It's a big step.

How about a concrete list of patch quality issues that the group can address to allow your weekly addition to the mm patch as a set toward eventually integration.

Wouldn't getting kgdb back into the mm patch series be a reasonable first step eventual maintenance in kernel.org? I hadn't even noticed that it had been dropped until today's discussion in the crash mailing list.

-piet

Signature · 4 lines
Piet Delaney
BlueLane Teck
W: (408) 200-5256; [email protected]
H: (408) 243-8872; [email protected]
#9 lore raw

Re: How about an enumerated list of issues with the existing kgdb patches?

Quoted 9 lines · On Wed, 30 Aug 2006 19:42:32 -0700 Piet Delaney <[email protected]> wrote:
Quoted 8 lines · Andrew Morton
Quoted 4 lines · On Wed, 30 Aug 2006 14:48:22 -0700 Andrew Morton <[email protected]> wrote:

Plus: I'd want to see a maintainance person or team who
respond promptly to email and who remain reasonably engaged with what's going on in the mainline kernel. Because if problems crop up (and they will), I don't want to have to be the bunny who has to worry about them...

Quoted 8 lines
Quoted 6 lines

umm, clarification needed here.

No criticism of the present maintainers intended! Last time I grabbed the kgdb patches from sf.net they applied nicely, worked quite reliably (much better than the old ones I'd been trying to sustain) and had been tremendously cleaned up.

So why did you stop including them in the mm patch?

Some change in 2.6.17-pre caused it to all stop working.

Quoted 4 lines

I recall your quality issue and Tom was all in favor of resolving them. Was it too much work cleaning up the patches to meet your needs that lead to the patch being dropped from the mm series?

It all seems reasonably clean now, but I haven't looked closely (nor have I had to)

Quoted 2 lines

kgdb over ethernet is working great, and it looks like there is plenty of support on the SF mailing list.

good.

Quoted 11 lines
Quoted 2 lines

It's a big step.

How about a concrete list of patch quality issues that the group can address to allow your weekly addition to the mm patch as a set toward eventually integration.

From whom? me?

Wouldn't getting kgdb back into the mm patch series be a reasonable first step eventual maintenance in kernel.org?

Is on my todo list somewhere.

#13 lore raw
In reply to Piet Delaney
Quoted 4 lines · Piet Delaney
Quoted 2 lines

ENOPATCH

Opps.

What an ugly patch!

But it should be totally obsolete with the unwinder work Jan and me have been doing recently which does this all properly. .18 isn't quite there yet in all cases, but .19 will be hopefully.

-Andi

#14 lore raw
Quoted 11 lines · Andi Kleen
Quoted 4 lines · Piet Delaney
Quoted 2 lines

ENOPATCH

Opps.

What an ugly patch!

But it should be totally obsolete with the unwinder work Jan and me have been doing recently which does this all properly. .18 isn't quite there yet in all cases, but .19 will be hopefully.

Indeed. But quite functional. Have you guys been doing i386 as well? This kind of thing was needed to convince gdb when it really was time to stop trying unwind in a few cases, but looks quite bad on x86_64/i386. Thankfully getting it to stop on ARM was pretty easy (but it wasn't full/true annotations).

Signature · 1 line
Tom Rini
#15 lore raw
Quoted 7 lines · Tom Rini
Quoted 6 lines · Andi Kleen
Quoted 4 lines · Piet Delaney
Quoted 2 lines

ENOPATCH

Opps.

Quoted 7 lines
Quoted 5 lines

What an ugly patch!

But it should be totally obsolete with the unwinder work Jan and me have been doing recently which does this all properly. .18 isn't quite there yet in all cases, but .19 will be hopefully.

Indeed. But quite functional. Have you guys been doing i386 as well?

Yes.

-Andi

P.S.: Please don't include member only lists in linux-kernel cc lists. Dropped.

#16 lore raw
In reply to Tom Rini
Quoted 13 lines · Tom Rini
Quoted 11 lines · Andi Kleen
Quoted 4 lines · Piet Delaney
Quoted 2 lines

ENOPATCH

Opps.

What an ugly patch!

But it should be totally obsolete with the unwinder work Jan and me have been doing recently which does this all properly. .18 isn't quite there yet in all cases, but .19 will be hopefully.

Quoted 5 lines

Indeed. But quite functional. Have you guys been doing i386 as well? This kind of thing was needed to convince gdb when it really was time to stop trying unwind in a few cases, but looks quite bad on x86_64/i386. Thankfully getting it to stop on ARM was pretty easy (but it wasn't full/true annotations).

I wonder if we are killing a fly with a sledgehammer. On SunOS 4.1.4 I just patched the top of stack with a NULL pointer. With SPARC the kernel uses different registers than the user and don't recall their being a problem with a NULL pointer being at the top of the kernel stack. Is there a problem with the i386 architecture with the top of the kernel stack having a NULL pointer? My guess is that it's needed to return to the right place in user space.

-piet

Quoted 1 line
Signature · 4 lines
Piet Delaney
BlueLane Teck
W: (408) 200-5256; [email protected]
H: (408) 243-8872; [email protected]
#10 lore raw

Re: How about an enumerated list of issues with the existing kgdb patches?

In reply to Andrew Morton
Quoted 23 lines · Andrew Morton
Quoted 9 lines · On Wed, 30 Aug 2006 19:42:32 -0700 Piet Delaney <[email protected]> wrote:
Quoted 8 lines · Andrew Morton
Quoted 4 lines · On Wed, 30 Aug 2006 14:48:22 -0700 Andrew Morton <[email protected]> wrote:

Plus: I'd want to see a maintainance person or team who
respond promptly to email and who remain reasonably engaged with what's going on in the mainline kernel. Because if problems crop up (and they will), I don't want to have to be the bunny who has to worry about them...

Quoted 8 lines
Quoted 6 lines

umm, clarification needed here.

No criticism of the present maintainers intended! Last time I grabbed the kgdb patches from sf.net they applied nicely, worked quite reliably (much better than the old ones I'd been trying to sustain) and had been tremendously cleaned up.

So why did you stop including them in the mm patch?

Some change in 2.6.17-pre caused it to all stop working.

Quoted 7 lines
Quoted 4 lines

I recall your quality issue and Tom was all in favor of resolving them. Was it too much work cleaning up the patches to meet your needs that lead to the patch being dropped from the mm series?

It all seems reasonably clean now, but I haven't looked closely (nor have I had to)

Any suggestions on how to progress?

Quoted 19 lines
Quoted 3 lines

kgdb over ethernet is working great, and it looks like there is plenty of support on the SF mailing list.

good.

Quoted 11 lines
Quoted 2 lines

It's a big step.

How about a concrete list of patch quality issues that the group can address to allow your weekly addition to the mm patch as a set toward eventually integration.

From whom? me?

Wouldn't getting kgdb back into the mm patch series be a reasonable first step eventual maintenance in kernel.org?

Is on my todo list somewhere.

Signature · 4 lines
Piet Delaney                                    Phone: (408) 200-5256
Blue Lane Technologies                          Fax:   (408) 200-5299
10450 Bubb Rd.
Cupertino, Ca. 95014                            Email: [email protected]