[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220106230545.GA2447@kbox>
Date: Thu, 6 Jan 2022 15:05:45 -0800
From: Beau Belgrave <beaub@...ux.microsoft.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: mhiramat@...nel.org, linux-trace-devel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [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@...ux.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
Powered by blists - more mailing lists