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: <1323119457.32012.36.camel@twins>
Date:	Mon, 05 Dec 2011 22:10:57 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, acme@...hat.com,
	ming.m.lin@...el.com, andi@...stfloor.org, robert.richter@....com,
	ravitillo@....gov, will.deacon@....com, paulus@...ba.org,
	benh@...nel.crashing.org, rth@...ddle.net, ralf@...ux-mips.org,
	davem@...emloft.net, lethal@...ux-sh.org
Subject: Re: [PATCH 09/12] perf_events: add hook to flush branch_stack on
 context switch (v2)

On Fri, 2011-10-14 at 14:37 +0200, Stephane Eranian wrote:
> + * When sampling the branck stack in system-wide, it may be necessary
> + * to flush the stack on context switch. This happens when the branch
> + * stack does not tag its entries with the pid of the current task.
> + * Otherwise it becomes impossible to associate a branch entry with a
> + * task. This ambiguity is more likely to appear when the branch stack
> + * supports priv level filtering and the user sets it to monitor only
> + * at the user level (which could be a useful measurement in system-wide
> + * mode). In that case, the risk is high of having a branch stack with
> + * branch from multiple tasks. Flushing may mean dropping the existing
> + * entries or stashing them somewhere in the PMU specific code layer. 

It doesn't need to tag stuff with PID to solve that problem, making the
TOS a full 64bit wide counter will work equally well, we'd simply record
the TOS value at context switch time and discard everything prior to the
last switch-in.

But yeah, we need to flush this stuff under the current scheme.
--
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