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: <20130530114544.GB1099@krava.brq.redhat.com>
Date:	Thu, 30 May 2013 13:45:44 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 1/2] perf: Enable wakeup_events logic for all events

On Thu, May 30, 2013 at 01:02:39PM +0200, Peter Zijlstra wrote:
> On Thu, May 30, 2013 at 11:53:06AM +0200, Jiri Olsa wrote:
> > Currently the perf_events_attr::wakeup_events logic is
> > checked only for regular samples.
> > 
> > If we have an event that produce only auxiliary events
> > (MMAP|COMM|EXIT|FORK), the poll call does not follow
> > the perf_events_attr wakeup_events setup and reports
> > no data.
> > 
> > Fixing this by moving the perf_events_attr::wakeup_events
> > checking logic into the function and calling it from
> > perf_output_end. This way any output event is checked
> > properly.
> > 
> 
> So something like this came up before and ISTR doing a patch similar to
> what you propose but ended up not going with it because... uhm...
> 
> I have vague memories about people (possibly me) wanting wake_events to
> mean samples. Like get me a wakeup every 20 samples. With your patch the
> side-band events now also count towards 'events'.
> 
> I think the most common use of wake_events is people setting it to 1 and
> have perf generate a SIGfoo for every sample so they can do magic in
> their userspace signal handler. This is popular for interpreters.
> 
> It would be unfortunate to get SIGfoos for side-band chatter.
> 
> 
> Makes sense?

hum, well the whole story is that for the ifunc user space tracer
(profwiz) I'd need the auxiliary stuff for the tracee (MMAP, COMM...)
so I could end up with 'reportable' perf.data file and use
just VMA addresses for functions.

So, the only way now is to create an event which is never hit
and set it up for this. At that point I noticed the poll would
never return.. hence the patch ;-)

(I was also thinking of a new special SW event doing nothing,
just be there to get aux stuff..)

Anyway, I could always check the map manually.. but I'd sort of
expect poll to work the same for anything you write/read via RB.

how about having something like:

 wakeup_events - setup for samples (stays)
 wakeup_any    - new flag saying to use wakeup_events for
                 anything going through the RB

thanks,
jirka
--
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