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]
Date:	Tue, 19 Mar 2013 14:02:34 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>, Jiri Olsa <jolsa@...hat.com>,
	Salman Qazi <sqazi@...gle.com>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>
Subject: Re: [PATCH] perf,x86: fix uninitialized pt_regs in intel_pmu_drain_bts_buffer()

On Tue, Mar 19, 2013 at 1:58 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, 2013-03-19 at 13:50 +0100, Stephane Eranian wrote:
>> > Should we not replace:
>> >
>> >         regs.ip     = 0;
>> >
>> > with that memset? It avoids the memset work in a few cases and
>> removes
>> > the then superfluous clearing of the IP field.
>> >
>> We could drop it because it's covered by the memset().
>
> Yeah, but also place the memset a little lower than you did, avoids the
> stack writes when not needed.
>
Ok, I get it now. Yes, we can move it after the test and drop reg.val = 0.

>> The issue here was that you eventually end up in code_segment_base()
>> which
>> looks at other uninitialized fields in pt_regs and may cause breakage.
>
> Right, your changelog said so ;-)
>
--
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