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: <20150702093120.GK25159@twins.programming.kicks-ass.net>
Date:	Thu, 2 Jul 2015 11:31:20 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Alexei Starovoitov <ast@...mgrid.com>
Cc:	"Wangnan (F)" <wangnan0@...wei.com>, He Kuang <hekuang@...wei.com>,
	rostedt@...dmis.org, masami.hiramatsu.pt@...achi.com,
	mingo@...hat.com, acme@...hat.com, jolsa@...nel.org,
	namhyung@...nel.org, linux-kernel@...r.kernel.org,
	pi3orama <pi3orama@....com>
Subject: Re: [RFC PATCH 0/5] Make eBPF programs output data to perf event

On Wed, Jul 01, 2015 at 07:48:25PM -0700, Alexei Starovoitov wrote:
> On 7/1/15 4:58 AM, Peter Zijlstra wrote:
> >
> >But why create a separate trace buffer, it should go into the regular
> >perf buffer.
> 
> +1
> 
> I think
> +static char __percpu *perf_extra_trace_buf[PERF_NR_CONTEXTS];
> is redundant.
> It adds quite a bit of unnecessary complexity to the whole patch set.

Ah, that is what he does. I through he was creating a trace buffer, as
in the stuff ftrace uses, to output stuff concurrently to the regular
perf buffer, which would be insane ;-)

So you need these temporary buffers if you cannot tell a-priory how much
data is going to get written. The perf buffer can only deal with fixed
size events, you request a buffer of @size, you write into it, you
commit.

So if there's variable sized data, you first need to generate it in
order to tell how long it is, so that you can reserve your record and
copy it in. Sucks, but that's the way it is.
--
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