Am Freitag, den 03.10.2014, 10:17 +0200 schrieb Richard Weinberger: > On Fri, Oct 3, 2014 at 1:21 AM, Thomas Meyer <tho...@m3y3r.de> wrote: > > Hi, > > > > When you pass an initrd to UML and the size of the initrd is too big for > > the current kernel memory, a panic() call is done with the message("Out > > of memory"). > > > > But this message never hits the stdout as the following stack trace > > dumps because there is no current_thread_info() in the UML stack, which > > is still active at this time: > > Do you see the message if you boot UML with the earlyprintk parameter?
No it doesn't. The UML kernel crashes will trying to print the stack trace. I tried this drop in arch/um/kernel/dump_stack.c: #include <linux/kernel.h> #include <linux/export.h> #include <linux/sched.h> #include <linux/smp.h> #include <linux/atomic.h> #include <kern_util.h> void dump_stack(void) { struct thread_info* ti = current_thread_info(); if(is_kernel_addr(ti)) { dump_stack_print_info(KERN_DEFAULT); show_stack(NULL, NULL); } else { printk(KERN_CRIT "Dump_stack from non-kernel stack!\n"); } } EXPORT_SYMBOL(dump_stack); But this doesn't help as UML will crash then in kernel/panic.c while trying to call atomic_notifier_call_chain(&panic_notifier_list, 0, buf); I think the root cause is that current_thread_info() returns an invalid thread_info. The proper fix would be to also have the UML stack an valid thread_info at the begin of the stack, pointing to init_thread_info. but don't know how to do this. what do you think about this? with kind regards thomas ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel