Subject: + panic-call-panic-handlers-before-kmsg_dump.patch added to -mm tree To: keescook@xxxxxxxxxxxx,anton@xxxxxxxxxx,ccross@xxxxxxxxxxx,markivx@xxxxxxxxxxxxxx,peterz@xxxxxxxxxxxxx,rusty@xxxxxxxxxxxxxxx,sboyd@xxxxxxxxxxxxxx,tony.luck@xxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 19 Jul 2013 14:46:45 -0700 The patch titled Subject: panic: call panic handlers before kmsg_dump has been added to the -mm tree. Its filename is panic-call-panic-handlers-before-kmsg_dump.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/panic-call-panic-handlers-before-kmsg_dump.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/panic-call-panic-handlers-before-kmsg_dump.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Kees Cook <keescook@xxxxxxxxxxxx> Subject: panic: call panic handlers before kmsg_dump Since the panic handlers may produce additional information (via printk) for the kernel log, it should be reported as part of the panic output saved by kmsg_dump(). Without this re-ordering, nothing that adds information to a panic will show up in pstore's view when kmsg_dump runs, and is therefore not visible to crash reporting tools that examine pstore output. Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Anton Vorontsov <anton@xxxxxxxxxx> Cc: Colin Cross <ccross@xxxxxxxxxxx> Acked-by: Tony Luck <tony.luck@xxxxxxxxx> Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> Cc: Vikram Mulukutla <markivx@xxxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/panic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -puN kernel/panic.c~panic-call-panic-handlers-before-kmsg_dump kernel/panic.c --- a/kernel/panic.c~panic-call-panic-handlers-before-kmsg_dump +++ a/kernel/panic.c @@ -123,10 +123,14 @@ void panic(const char *fmt, ...) */ smp_send_stop(); - kmsg_dump(KMSG_DUMP_PANIC); - + /* + * Run any panic handlers, including those that might need to + * add information to the kmsg dump output. + */ atomic_notifier_call_chain(&panic_notifier_list, 0, buf); + kmsg_dump(KMSG_DUMP_PANIC); + bust_spinlocks(0); if (!panic_blink) _ Patches currently in -mm which might be from keescook@xxxxxxxxxxxx are origin.patch drivers-mtd-chips-gen_probec-refactor-call-to-request_module.patch isdn-clean-up-debug-format-string-usage.patch binfmt_elfc-use-get_random_int-to-fix-entropy-depleting.patch panic-call-panic-handlers-before-kmsg_dump.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html