lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 30 Nov 2012 17:03:53 +0530
From:	Kalash Nainwal <kalash@...stanetworks.com>
To:	linux-kernel@...r.kernel.org
Cc:	Kalash Nainwal <kalash@...stanetworks.com>
Subject: panic doesn't get invoked on oops when panic_on_oops is set

Hi,

An oops doesn't result in panic() call even when panic_on_oops
is set (if we've a crash kernel loaded). The reason seems to be
that from oops codepath before calling panic(), we call
crash_kexec() if panic_on_oops is set:

void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)

{
       if (regs && kexec_should_crash(current))
                crash_kexec(regs);  <====== I'm hitting this
        .
        .
        if (panic_on_oops)
                 panic("Fatal exception");  <==== I want this to be hit
        do_exit(signr);
}

int kexec_should_crash(struct task_struct *p)
{
          if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
                   return 1;
           return 0;
}

If we let panic() get called from oops_end(), we would eventually
call crash_kexec() from panic() anyway. Isn't it?

Then is the panic_on_oops check in kexec_should_crash()
redundant? Or there's reason behind this behavior?

Would greatly appreciate any response here. Also please CC me
as I am not part of linux-kernel list.

Regards,
-Kalash
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ