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:	Wed, 11 Jul 2012 17:09:36 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Andrew Vagin <avagin@...nvz.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Arun Sharma <asharma@...com>
Subject: Re: [PATCH] trace: add ability to set a target task for events (v2)

On Wed, 2012-07-11 at 18:14 +0400, Andrew Vagin wrote:
> @@ -5226,6 +5227,29 @@ void perf_tp_event(u64 addr, u64 count, void *record, int entry_size,
>                         perf_swevent_event(event, count, &data, regs);
>         }
>  
> +       /*
> +        * If we got specified a target task, also iterate its context and
> +        * deliver this event there too.
> +        */
> +       if (task && task != current) {
> +               struct perf_event_context *ctx;
> +               struct trace_entry *entry = record;
> +
> +               rcu_read_lock();
> +               ctx = rcu_dereference(task->perf_event_ctxp[perf_sw_context]);
> +               if (!ctx)
> +                       goto unlock;
> +
> +               list_for_each_entry_rcu(event, &ctx->event_list, event_entry) {

I added:
			if (event->attr.type != PERF_TYPE_TRACEPOINT)
				continue;

> +                       if (entry->type != event->attr.config)
> +                               continue;
> +                       if (perf_tp_event_match(event, &data, regs))
> +                               perf_swevent_event(event, count, &data, regs);
> +               }
> +unlock:
> +               rcu_read_unlock();
> +       }
> +
>         perf_swevent_put_recursion_context(rctx);
>  } 

Otherwise I've applied the patch.. Thanks!
--
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