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:   Tue, 14 Feb 2017 19:21:34 +0200
From:   Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        vince@...ter.net, eranian@...gle.com,
        Arnaldo Carvalho de Melo <acme@...radead.org>,
        Borislav Petkov <bp@...e.de>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1/2] perf/x86/intel/pt: Fail event scheduling on conflict with VMX

Peter Zijlstra <peterz@...radead.org> writes:

> On Tue, Feb 14, 2017 at 06:17:30PM +0200, Alexander Shishkin wrote:
>> This is called by pmu::add(), which checks hw.state afterwards and if it
>> finds HES_STOPPED, it returns an error, which event_sched_in() captures
>> and keeps the event in INACTIVE state. Should I add a comment about it?
>
> Egads... so what if ->add() succeeds but we then hit this on
> ->stop()/->start() due to throttle or period adjust?

It will hang there with hw.state==PERF_HES_STOPPED till the next
sched_out. But that will be the case anyway if VMXON kicks in while PT
is running.

> Now I suppose PT will never normally hit either of those, but you can do
> IOC_PERIOD on it, just for giggles.

True. Should we worry?

> Yes, this very much needs a comment... Also, should not this then live
> in ->add() in the first place?

The output_stop() stuff in the mmap_close path relies on
perf_aux_output_end() being in ->stop(), let me think if there's more.

Regards,
--
Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ