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: <4DEB3952.2070605@redhat.com>
Date:	Sun, 05 Jun 2011 11:07:46 +0300
From:	Avi Kivity <avi@...hat.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH v1 1/5] perf: add context parameter to perf_event overflow
 handler

On 06/03/2011 05:41 PM, Peter Zijlstra wrote:
> On Wed, 2011-05-11 at 11:55 -0400, Avi Kivity wrote:
> >  +++ b/include/linux/perf_event.h
> >  @@ -709,7 +709,9 @@ struct perf_buffer {
> >
> >   struct perf_sample_data;
> >
> >  -typedef void (*perf_overflow_handler_t)(struct perf_event *, int,
> >  +typedef void (*perf_overflow_handler_t)(void *context,
> >  +                                       struct perf_event *event,
> >  +                                       int,
> >                                          struct perf_sample_data *,
> >                                          struct pt_regs *regs);
> >
> >  @@ -855,6 +857,7 @@ struct perf_event {
> >          u64                             id;
> >
> >          perf_overflow_handler_t         overflow_handler;
> >  +       void                            *overflow_handler_context;
> >
> >   #ifdef CONFIG_EVENT_TRACING
> >          struct ftrace_event_call        *tp_event;
>
> If you're adding a pointer here, then why pass it along in the callback
> thing if it already has the perf_event *?
>
> It seems to me the callback can easily do
> event->overflow_handler_context if it needs the thing.

Makes sense.  Will update.

(I would have preferred a caller-allocated perf_event with 
container_of(), but that's a huge change).

-- 
error compiling committee.c: too many arguments to function

--
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