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: <20151021152608.GG15102@tassilo.jf.intel.com>
Date:	Wed, 21 Oct 2015 08:26:08 -0700
From:	Andi Kleen <ak@...ux.intel.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86, perf: Use INST_RETIRED.PREC_DIST for cycles:pp on
 Skylake

> Right, but suppose one user (root) would be sampling machine wide with
> PEBS whilst another user is using it just on his one task.

The root case is likely perf top which does not use PEBS.

> > > And you having killed the flag bits for PEBS events precludes people
> > > from using this manually, right?  I think we want to exempt .inv=1
> > > .cmask=16 from that general rule on general utility value.
> > 
> > I don't want to do this for every event. It has caused problems
> > in the past. There's also no reason to use the other events.
> 
> But it does allow users to play around with alternative encodings for
> cycles etc.. We've made use of this in the past when SNB turned out to
> have broken the event.

If they want to violate the SDM they can hack the kernel.
It's risky to do as you well know.

> > > We could maybe abuse .precise_ip = 3 for this?
> > 
> > I implemented this now, even though it's ugly.
> 
> Agreed, its not ideal.

So it turns out that UOPS_RETIRED.ALL+pebs only works by accident
on Skylake. It's not in the specification.

So on Skylake it has to be unconditional for any cycles:p
On earlier parts it can be only for three p to handle your 
unlikely scenario.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
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