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@...>
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
--