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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150506130116.GM2366@two.firstfloor.org>
Date:	Wed, 6 May 2015 15:01:16 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	"Liang, Kan" <kan.liang@...el.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"acme@...radead.org" <acme@...radead.org>,
	"eranian@...gle.com" <eranian@...gle.com>,
	"andi@...stfloor.org" <andi@...stfloor.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V7 3/6] perf, x86: handle multiple records in PEBS buffer

> > > +		if (p->status != (1 << bit)) {
> > > +			u64 pebs_status;
> > > +
> > > +			/* slow path */
> > > +			pebs_status = p->status & cpuc->pebs_enabled;
> > > +			pebs_status &= (1ULL << MAX_PEBS_EVENTS) - 1;
> > > +			if (pebs_status != (1 << bit)) {
> > > +				perf_log_lost(event);
> > 
> > Does it make sense to keep an error[bit] count and only log once with the
> > actual number in? -- when !0 obviously.
> 
> Yes, will do it.

If you use anything but u8 for the array member it would be too large
for the NMI stack, and u8 is lilkely overflow prone. Would not do it.

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