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: <20140212195827.GA6835@laptop.programming.kicks-ass.net>
Date:	Wed, 12 Feb 2014 20:58:27 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Oleg Nesterov <oleg@...hat.com>, Li Zefan <lizefan@...wei.com>
Subject: Re: [RFC][PATCH 4/4] perf/events: Use helper functions in event
 assignment to shrink macro size

> +void *perf_trace_event_setup(struct ftrace_event_call *event_call, 
> +			     struct perf_trace_event *pe)
> +{
> +	pe->head = this_cpu_ptr(event_call->perf_events);
> +	if (pe->constant && hlist_empty(pe->head))
> +		return NULL;
> +
> +	pe->entry_size = ALIGN(pe->entry_size + sizeof(u32), sizeof(u64));
> +	pe->entry_size -= sizeof(u32);
> +	pe->event_call = event_call;
> +
> +	perf_fetch_caller_regs(&pe->regs);

I think this one is wrong, we're getting the wrong caller now.

> +	pe->entry = perf_trace_buf_prepare(pe->entry_size,
> +			event_call->event.type, &pe->regs, &pe->rctx);
> +	return pe->entry;
> +}
> +EXPORT_SYMBOL_GPL(perf_trace_event_setup);


> +void perf_trace_event_submit(struct perf_trace_event *pe)
> +{
> +	perf_trace_buf_submit(pe->entry, pe->entry_size, pe->rctx, pe->addr,
> +			      pe->count, &pe->regs, pe->head, pe->task);
> +}
> +EXPORT_SYMBOL_GPL(perf_trace_event_submit);

This is ridiculous, perf_trace_buf_submit() is already a pointless
wrapper, which you now wrap moar...

It would be nice if we could reduce the api clutter a little and keep
this and the [ku]probe/syscall sites similar.
--
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