Re: [git pull] kgdb-light -v9

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Andi Kleen <andi@...>, Frank Ch. Eigler <fche@...>, <linux-kernel@...>, Roland McGrath <roland@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>
Date: Tuesday, February 12, 2008 - 6:03 am

On Tue, Feb 12, 2008 at 12:03:35AM +0100, Ingo Molnar wrote:

First nobody answered the "kgdb clean enough for a module"
high level question yet. Is it good enough for that?


A timeout for waiting for other CPUs is actually not a bad idea for a 
debugger. After all you still want to debug even if some other CPUs
are dead.


If it's very clean you should consider sharing it with kdump.


Pretty much all the proc output and sysfs show functions rely on these return 
values, so if there is a problem it is likely very obscure.


The 64bit gdb actually supports segment registers:

static int amd64_linux_gregset64_reg_offset[] =
{
  RAX * 8, RBX * 8,             /* %rax, %rbx */
  RCX * 8, RDX * 8,             /* %rcx, %rdx */
  RSI * 8, RDI * 8,             /* %rsi, %rdi */
  RBP * 8, RSP * 8,             /* %rbp, %rsp */
  R8 * 8, R9 * 8,               /* %r8 ... */
  R10 * 8, R11 * 8,
  R12 * 8, R13 * 8,
  R14 * 8, R15 * 8,             /* ... %r15 */
  RIP * 8, EFLAGS * 8,          /* %rip, %eflags */
  CS * 8, SS * 8,               /* %cs, %ss */
  DS * 8, ES * 8,               /* %ds, %es */
  FS * 8, GS * 8,               /* %fs, %gs */
  -1, -1, -1, -1, -1, -1, -1, -1,
  -1, -1, -1, -1, -1, -1, -1, -1,
  -1, -1, -1, -1, -1, -1, -1, -1,
  -1, -1, -1, -1, -1, -1, -1, -1, -1,
  ORIG_RAX * 8
};


You silently overwrite any user ptrace hw breakpoints right? To do it cleanly 
would still require a reservation frame work.


All the kerneldoc comments are useless if you don't add the file
to Documentation/DocBook/*.tmpl


I don't think that case should happen during roundup for once. If it happens 
something is wrong.

In fact both handling DIE_NMI and DIE_NMI_IPI is fishy too.


That seems weird. I think other parts try to support user mode debugging
too. In theory there is no reason it shouldn't be able to do this
(except that you have to make sure to not break regular gdb of course) 


This means kcrash will have priority won't it? Doesn't seem correct.



Ok I have not checked, but I hope you have strong protections against
reentry of the debugger just in case an exception here falls down to
the die notifiers


That wrapper should not be needed; everybody can use instruction_pointer()
directly, no?



... Ok i already commented on the hex mess.



e.g. you surely don't need sprintf return values for that one.


I still don't think this check makes sense.


Hmm, so idle thread numbers depend on a sysctl? That seems weird.
Would be probably better to just give them negative numbers.




You don't think find_task_by_pid() will handle 0 tid?



Whatever that shadowpid is. Seems like a weird concept.


It's still likely to deadlock on MP I think

[...] Haven't read further.

-Andi

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kgdb in git-x86#mm review, Andi Kleen, (Sun Feb 10, 9:53 pm)
Re: kgdb in git-x86#mm review, Mark Lord, (Mon Feb 11, 12:03 pm)
Re: kgdb in git-x86#mm review, Frank Ch. Eigler, (Mon Feb 11, 11:32 am)
Re: [git pull] kgdb-light -v8,, Jan Kiszka, (Mon Feb 11, 12:41 pm)
Re: [git pull] kgdb-light -v8,, Ingo Molnar, (Mon Feb 11, 12:54 pm)
[git pull] kgdb-light -v9, Ingo Molnar, (Mon Feb 11, 7:03 pm)
Re: [git pull] kgdb-light -v9, Andi Kleen, (Tue Feb 12, 6:03 am)
[git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 7:27 am)
Re: [git pull] kgdb-light -v10, Domenico Andreoli, (Tue Feb 12, 9:18 am)
Re: [git pull] kgdb-light -v10, Jason Wessel, (Tue Feb 12, 9:59 am)
Re: [git pull] kgdb-light -v10, Domenico Andreoli, (Tue Feb 12, 11:45 am)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 8:19 am)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 8:38 am)
Re: [git pull] kgdb-light -v10, Jason Wessel, (Tue Feb 12, 9:30 am)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 10:39 am)
Re: [git pull] kgdb-light -v10, Jason Wessel, (Tue Feb 12, 10:35 am)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 11:36 am)
Re: [git pull] kgdb-light -v10, Jason Wessel, (Tue Feb 12, 12:21 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 1:10 pm)
Re: [git pull] kgdb-light -v10, Jason Wessel, (Tue Feb 12, 12:48 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 9:50 am)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 11:28 am)
Re: [git pull] kgdb-light -v10, Linus Torvalds, (Tue Feb 12, 12:46 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 2:20 pm)
Re: [git pull] kgdb-light -v10, Andrew Morton, (Tue Feb 12, 2:20 pm)
Re: [git pull] kgdb-light -v10, Frank Ch. Eigler, (Tue Feb 12, 3:34 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 4:16 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 3:16 pm)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 5:01 pm)
Re: [git pull] kgdb-light -v10, Linus Torvalds, (Tue Feb 12, 2:11 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 3:22 pm)
Re: [git pull] kgdb-light -v10, Linus Torvalds, (Tue Feb 12, 3:01 pm)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 1:01 pm)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 1:10 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 12:11 pm)
Re: [git pull] kgdb-light -v10, Linus Torvalds, (Tue Feb 12, 12:25 pm)
Re: [git pull] kgdb-light -v10, Jason Wessel, (Fri Feb 15, 4:36 pm)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 12:42 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 1:07 pm)
Re: [RFC][PATCH] modular kgdb-light, Jason Wessel, (Fri Feb 15, 4:24 pm)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 12:24 pm)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 1:01 pm)
Re: [git pull] kgdb-light -v10, Ingo Molnar, (Tue Feb 12, 11:16 am)
Re: [git pull] kgdb-light -v10, Andi Kleen, (Tue Feb 12, 11:28 am)
Re: [git pull] kgdb-light -v9, Roland McGrath, (Tue Feb 12, 6:26 am)
Re: [git pull] kgdb-light -v9, Ingo Molnar, (Tue Feb 12, 6:34 am)
Re: [git pull] kgdb-light -v9, Sam Ravnborg, (Tue Feb 12, 5:35 am)
Re: kgdb in git-x86#mm review, Andi Kleen, (Mon Feb 11, 12:11 pm)