From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v2 0/5] [RFC] copy_strtok_from_user
Date: Thu, 26 Feb 2009 13:30:17 +0100 [thread overview]
Message-ID: <20090226123017.GA2041@elte.hu> (raw)
In-Reply-To: <20090226122859.GD23099@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
>
> * Peter Zijlstra <peterz@infradead.org> wrote:
>
> > On Thu, 2009-02-26 at 00:32 -0500, Steven Rostedt wrote:
> > > This is the second series of the uaccess code.
> > >
> > > Changes in v2:
> > >
> > > - moved probe_kernel_* functions to lib/uaccess.c
> > >
> > > - renamed copy_word_from_user to copy_strtok_from_user.
> > >
> > > - changed copy_strtok_from_user to pass in a delimiter string.
> > > ftrace defines SPACE to be ' \t\r\n'.
> > >
> > > Ingo,
> > > I added your copy right to lib/uaccess.c since git blame shows you
> > > as the author of the probe_kernel_* code. Also, is it OK that I
> > > added the "GPL v2" line in that file as well?
> > >
> > > Andrew,
> > > Since you are, in essence, the memory maintainer, could you give
> > > your Acked-by: to the copy_strtok_from_user code.
> > >
> > > The probe_kernel code is still EXPORT_SYMBOL_GPL, and I added
> > > that too to copy_strtok_from_user. Are there any objections to that?
> >
> > I have to ask,..
> >
> > cant this be done with a regular copy_from_user() followed
> > by a regular strtok()? Do we really have to combine all
> > that?
>
> yes. Note that strsep() is the preferred API. (in fact it's
> the only such string API that is in the kernel)
btw., for larger strings we cannot really copy into the kernel i
suspect. We'd have to kmalloc() and that adds overhead, etc.
Nevertheless, copy_strsep_from_user() would be the symmetric API
here.
Ingo
next prev parent reply other threads:[~2009-02-26 12:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-26 5:32 [PATCH v2 0/5] [RFC] copy_strtok_from_user Steven Rostedt
2009-02-26 5:32 ` [PATCH v2 1/5] uaccess: move probe_kernel_* functions to lib/uaccess.c Steven Rostedt
2009-02-26 5:32 ` [PATCH v2 2/5] uaccess: add copy_strtok_from_user Steven Rostedt
2009-02-26 5:32 ` [PATCH v2 3/5] tracing: convert event_trace to use copy_strtok_from_user Steven Rostedt
2009-02-26 5:32 ` [PATCH v2 4/5] tracing: convert ftrace_regex_write " Steven Rostedt
2009-02-26 5:32 ` [PATCH v2 5/5] tracing: convert ftrace_graph_write " Steven Rostedt
2009-02-26 10:03 ` [PATCH v2 0/5] [RFC] copy_strtok_from_user Peter Zijlstra
2009-02-26 12:28 ` Ingo Molnar
2009-02-26 12:30 ` Ingo Molnar [this message]
2009-02-26 12:46 ` Steven Rostedt
2009-02-26 12:48 ` Steven Rostedt
2009-02-26 12:51 ` Steven Rostedt
2009-02-26 14:04 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090226123017.GA2041@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox