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]
Date:   Mon, 21 Aug 2017 17:01:38 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Zhou Chengming <zhouchengming1@...wei.com>
Subject: Re: [PATCH] perf/core: fix group {cpu,task} validation

On Mon, Aug 21, 2017 at 05:53:26PM +0200, Peter Zijlstra wrote:
> On Thu, Jun 22, 2017 at 03:41:38PM +0100, Mark Rutland wrote:
> > Regardless of which events form a group, it does not make sense for the
> > events to target different tasks and/or CPUs, as this leaves the group
> > inconsistent and impossible to schedule. The core perf code assumes that
> > these are consistent across (successfully intialised) groups.
> > 
> > Core perf code only verifies this when moving SW events into a HW
> > context. Thus, we can violate this requirement for pure SW groups and
> > pure HW groups, unless the relevant PMU driver happens to perform this
> > verification itself. These mismatched groups subsequently wreak havoc
> > elsewhere.
> > 
> > For example, we handle watchpoints as SW events, and reserve watchpoint
> > HW on a per-cpu basis at pmu::event_init() time to ensure that any event
> > that is initialised is guaranteed to have a slot at pmu::add() time.
> > However, the core code only checks the group leader's cpu filter (via
> > event_filter_match()), and can thus install follower events onto CPUs
> > violating thier (mismatched) CPU filters, potentially installing them
> > into a CPU without sufficient reserved slots.
> 
> > Fix this by validating this requirement regardless of whether we're
> > moving events.
> 
> Yes, and this also appears to cure your other problem:
> 
>   https://lkml.kernel.org/r/20170810173551.GD12812@leverpostej

Ah; sorry for the duplicate report! I should have realised.

I guess this will get queued soon?

Thanks,
Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ