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: <20190701142803.GA3402@hirez.programming.kicks-ass.net>
Date:   Mon, 1 Jul 2019 16:28:03 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:     Arnaldo Carvalho de Melo <acme@...hat.com>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        mathieu.poirier@...aro.org, will.deacon@....com
Subject: Re: [PATCH v2] perf: Fix exclusive events' grouping

On Mon, Jul 01, 2019 at 02:07:55PM +0300, Alexander Shishkin wrote:
> So far, we tried to disallow grouping exclusive events for the fear of
> complications they would cause with moving between contexts. Specifically,
> moving a software group to a hardware context would violate the exclusivity
> rules if both groups contain matching exclusive events.
> 
> This attempt was, however, unsuccessful: the check that we have in the
> perf_event_open() syscall is both wrong (looks at wrong PMU) and
> insufficient (group leader may still be exclusive), as can be illustrated
> by running
> 
> $ perf record -e '{intel_pt//,cycles}' uname
> $ perf record -e '{cycles,intel_pt//}' uname
> 
> ultimately successfully.
> 
> Furthermore, we are completely free to trigger the exclusivity violation
> by -e '{cycles,intel_pt//}' -e '{intel_pt//,instructions}', even though
> the helpful perf record will not allow that, the ABI will. The warning
> later in the perf_event_open() path will also not trigger, because it's
> also wrong.
> 
> Fix all this by validating the original group before moving, getting rid
> of broken safeguards and placing a useful one to perf_install_in_context().
> 
> Signed-off-by: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Fixes: bed5b25ad9c8a ("perf: Add a pmu capability for "exclusive" events")

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ