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-prev] [day] [month] [year] [list]
Message-ID: <928CFBE8E7CB0040959E56B4EA41A77E0CDD7B78@irsmsx504.ger.corp.intel.com>
Date:	Fri, 16 Jan 2009 15:03:48 +0000
From:	"Metzger, Markus T" <markus.t.metzger@...el.com>
To:	Steven Rostedt <srostedt@...hat.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"hpa@...or.com" <hpa@...or.com>,
	"markus.t.metzger@...il.com" <markus.t.metzger@...il.com>
Subject: RE: [patch 3/5] x86, ftrace, hw-branch-tracer: dump on oops

>-----Original Message-----
>From: Steven Rostedt [mailto:srostedt@...hat.com]
>Sent: Friday, January 16, 2009 3:55 PM
>To: Metzger, Markus T
>Cc: linux-kernel@...r.kernel.org; mingo@...e.hu; tglx@...utronix.de; hpa@...or.com;
>markus.t.metzger@...il.com
>Subject: Re: [patch 3/5] x86, ftrace, hw-branch-tracer: dump on oops
>
>BTW, you have two 1/5 patches but no 2/5 patch.
>
>On Fri, 2009-01-16 at 11:58 +0100, Markus Metzger wrote:
>> Dump the branch trace on an oops (based on ftrace_dump_on_oops).
>
>Does the ftrace_dump_on_oops not work?  We may want to change
>ftrace_dump to see if a tracer has been registered, and use its format
>for output.

It does work and I am using it.
It only works one time, though. Ftrace kills itself before dumping its buffer.

The trace is collected in a separate buffer. trace_hw_branch_oops() reads that buffer and adds the trace to the ftrace buffer, so ftrace can then dump it.


>>       bts_trace_stop(tr);
>>       unregister_hotcpu_notifier(&bts_hotcpu_notifier);
>> +
>> +     hw_branch_trace = NULL;
>
>unless you test hw_branch_trace for content, I usually never NULL the
>local tracer variable. This prevents races. The worst that can happen
>without nulling it, is that your tracer will write into another tracer's
>buffer. No real harm done. But if you have it as null and a race
>happens, you can crash the kernel.

Sounds reasonable. I'll change it.

regards,
markus.

---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

--
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