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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_2DEC6ECC6194905D15D8E6D5@qq.com>
Date:	Wed, 13 May 2015 22:14:54 +0800
From:	"王龙" <wanglong@...qinren.net>
To:	"rostedt" <rostedt@...dmis.org>,
	"jkosina" <jkosina@...e.cz>,
	"paulmck" <paulmck@...ux.vnet.ibm.com>,
	"pmladek" <pmladek@...e.cz>,
	"dzickus" <dzickus@...hat.com>
Cc:	"johannes" <johannes@...solutions.net>,
	"koct9i" <koct9i@...il.com>,
	"tglx" <tglx@...utronix.de>,
	"mingo" <mingo@...hat.com>,
	"hpa" <hpa@...or.com>,
	"x86" <x86@...nel.org>,
	"atomlin" <atomlin@...hat.com>,
	"akpm" <akpm@...ux-foundation.org>,
	"sasha.levin" <sasha.levin@...cle.com>,
	"linux-kernel" <linux-kernel@...r.kernel.org>,
	"peifeiyue" <peifeiyue@...wei.com>,
	"long.wanglong" <long.wanglong@...wei.com>,
	"morgan.wang" <morgan.wang@...wei.com>
Subject: [RFC] how to perform a safe NMI stack trace on all CPUs on x86?

Hi all,

In kernel before 3.19, when trigger_all_cpu_backtrace() is called on x86, 
it will trigger an NMI on each CPU and call show_regs(). But this can lead
to a hard lock up if the NMI comes in on another printk().

The commit a9edc88093287183ac934be44f295f183b2c62dd (x86/nmi: Perform a safe 
NMI stack trace on all CPUs) fix this problem on kernel mainline. when the NMI 
triggers, it switches the printk routine for that CPU to call a NMI safe printk 
function that records the printk in a per_cpu seq_buf descriptor. After all 
NMIs have finished recording its data, the seq_bufs are printed in a safe 
context. But how do we fix this problem in older version of kernel(eg, 3.10 stable)? 
The 3.10 stable has no "switch printk routine" and "seq_buf" infrastructures.

Could anyone give me some ideas?

Best Regards
Wang Long

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ