lkml.org 
[lkml]   [2022]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 08/12] user_events: Optimize writing events by only copying data once
On Thu, Jan 06, 2022 at 05:17:45PM -0500, Steven Rostedt wrote:
> On Thu, 16 Dec 2021 09:35:07 -0800
> Beau Belgrave <beaub@linux.microsoft.com> wrote:
>
> > @@ -1018,16 +1081,11 @@ static ssize_t user_events_write_core(struct file *file, struct iov_iter *i)
> > if (likely(atomic_read(&tp->key.enabled) > 0)) {
> > struct tracepoint_func *probe_func_ptr;
> > user_event_func_t probe_func;
> > + struct iov_iter copy;
> > void *tpdata;
> > - void *kdata;
> > - u32 datalen;
> > -
> > - kdata = kmalloc(i->count, GFP_KERNEL);
> >
> > - if (unlikely(!kdata))
> > - return -ENOMEM;
> > -
> > - datalen = copy_from_iter(kdata, i->count, i);
> > + if (unlikely(iov_iter_fault_in_readable(i, i->count)))
>
> Can you rebase on my tree: ftrace/core ?
>
> That's because upstream now has:
>
> a6294593e8a12 ("iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable")
>
> And it looks like you need to call fault_in_iov_iter_readable().
>
> -- Steve
>

Yep, will do.

Thanks,
-Beau

\
 
 \ /
  Last update: 2022-01-07 00:07    [W:0.097 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site