Skip to contentSkip to conversation

calls to notify_die missing -> ftrace_dump_on_oops non-functional

DISCUSSION Uwe Kleine-König 2 participants 4 messages Sep 12, 2009 – Sep 13, 2009 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

Hello,

I noticed yesterday that ARM doesn't call notify_die (added in

1eeb66a (move die notifier handling to common code)

).

As ftrace_dump_on_oops depends on this function being called I don't get an ftrace dump in my oopses.

Locally I added

	notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);

at the end of __die() in arch/arm/kernel/traps.c but I think this is not completely correct because---assuming I understood it correctly---notify_die returning NOTIFY_STOP should stop the process dying. Christoph, is this correct?

Dying on ARM looks quite different to dying on x86. Russell, what's your position here? Would you accept a patch that makes them more similar?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-K?nig            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
#1 lore raw
Quoted 3 lines · Uwe Kleine-K?nig

Dying on ARM looks quite different to dying on x86. Russell, what's your position here? Would you accept a patch that makes them more similar?

The position is that I got tired of chasing x86 in this area, and we've got what was the most correct implementation that I could come up with. We do quite a number of things differently from x86, including providing as complete as possible siginfo stuff everywhere possible.

So, here's a patch which does an overall update to the ARM die() implementation, including adding the notify support, kexec support and loglevel stuff to printks.

I'm not entirely happy with this at present because it now means that die() can now return - this requires all callers to die() to be audited to ensure that they do something sane when die() does return.

arch/arm/include/asm/system.h +1 -2
index d65b2f5..5b66e51 100644
@@ -73,8 +73,7 @@ extern unsigned int mem_fclk_21285;
 
 struct pt_regs;
 
-void die(const char *msg, struct pt_regs *regs, int err)
-		__attribute__((noreturn));
+void die(const char *msg, struct pt_regs *regs, int err);
 
 struct siginfo;
 void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info,
arch/arm/kernel/traps.c +46 -29

192 lines not on this page · raw message

#2 lore raw

Hello Russell,

Quoted 11 lines · Russell King - ARM Linux
Quoted 3 lines · Uwe Kleine-K?nig

Dying on ARM looks quite different to dying on x86. Russell, what's your position here? Would you accept a patch that makes them more similar?

The position is that I got tired of chasing x86 in this area, and we've got what was the most correct implementation that I could come up with. We do quite a number of things differently from x86, including providing as complete as possible siginfo stuff everywhere possible.

Quoted 3 lines

So, here's a patch which does an overall update to the ARM die() implementation, including adding the notify support, kexec support and loglevel stuff to printks.

There are still a few printks without loglevel. Is this intended? Just looking at the patch, I think it's good. I will test it for a while in my tree. Thanks.

Quoted 4 lines

I'm not entirely happy with this at present because it now means that die() can now return - this requires all callers to die() to be audited to ensure that they do something sane when die() does return.

I don't promise to have a look, but I will note it on my todolist.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-K?nig            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
#3 lore raw
Quoted 14 lines · Uwe Kleine-K?nig

Hello Russell,

Quoted 11 lines · Russell King - ARM Linux
Quoted 3 lines · Uwe Kleine-K?nig

Dying on ARM looks quite different to dying on x86. Russell, what's your position here? Would you accept a patch that makes them more similar?

The position is that I got tired of chasing x86 in this area, and we've got what was the most correct implementation that I could come up with. We do quite a number of things differently from x86, including providing as complete as possible siginfo stuff everywhere possible.

Quoted 6 lines
Quoted 3 lines

So, here's a patch which does an overall update to the ARM die() implementation, including adding the notify support, kexec support and loglevel stuff to printks.

There are still a few printks without loglevel. Is this intended? Just looking at the patch, I think it's good. I will test it for a while in my tree. Thanks.

Getting them into the backtrace isn't easy atm - that's also used for printing stuff other than just the oops, and we currently have no easy way to provide the log level to it. Eg, we wouldn't want things like the task debug backtraces to be printed at EMERG level.