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:   Fri, 14 Jul 2017 09:56:12 +0300
From:   Felipe Balbi <felipe.balbi@...ux.intel.com>
To:     Pratyush Anand <panand@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>
Cc:     Linux USB <linux-usb@...r.kernel.org>,
        linux-kernel@...r.kernel.org,
        Chunyan Zhang <zhang.chunyan@...aro.org>
Subject: Re: [PATCH] usb: gadget: functions: add ftrace export over USB


Hi,

Pratyush Anand <panand@...hat.com> writes:
> Hi Felipe,
>
> On Friday 09 June 2017 11:43 AM, Felipe Balbi wrote:
>> +static void notrace ftrace_write(struct trace_export *ftrace, const void *buf,
>> +				 unsigned int len)
>> +{
>> +	struct usb_ftrace		*trace = ftrace_to_trace(ftrace);
>> +	struct usb_request		*req = next_request(&trace->list);
>> +
>> +	if (!req)
>> +		return;
>> +
>> +	if (!trace->in->enabled)
>> +		return;
>> +
>> +	req->buf = kmemdup(buf, len, GFP_ATOMIC);
>
> Probably we can avoid the copy of trace data.

not with current setup. I have no control over data's lifetime. If I
did, then this would be zero-copy.

> We can make write() call of "struct trace_export" as posted. Can have a 

that would require further patching in trace core which is not part of
$subject. Also, if we turn this into asynchronous calls, we could run
out of trace buffer before the first chunk of data is transferred over
to the other side.

> write_complete() callback function implemented in  struct trace_export,which 
> can be called from your ftrace_complete().

well, you're welcome to propose a patch :-)

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ