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: <20181025003130.GU3109@worktop.c.hoisthospitality.com>
Date:   Thu, 25 Oct 2018 02:31:30 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Andi Kleen <ak@...ux.intel.com>
Cc:     "Liang, Kan" <kan.liang@...ux.intel.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
        bp@...en8.de, Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 1/2] perf: Add munmap callback

On Wed, Oct 24, 2018 at 11:28:54AM -0700, Andi Kleen wrote:
> > > void perf_event_mmap(struct vm_area_struct *vma)
> > > {
> > >          struct perf_mmap_event mmap_event;
> > > 
> > >          if (!atomic_read(&nr_mmap_events))
> > >                  return;
> > > <SNIP>
> > > }
> > > 
> > 
> > Thanks. I'll add the nr_mmap_events check in V2.
> 
> No, that's the wrong check here. The PEBS flush is independent of mmap
> events being requested.
> 
> If anything would need to check for any PEBS events active, which
> would need a new counter.  I think the easiest is to just check if 
> this_cpu_ptr(&sched_cb_list)
> is empty, which should be good enough.

It is just the CLI+STI, not PUSHF;CLI+POPF that are required and that is
a lot cheaper already. Also, you need to have preemption disabled in
order to check the per-cpu cb list.

So I don't think it really makes much sense to try and frob a fast path
in there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ