[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201008272126.56786.arnd@arndb.de>
Date: Fri, 27 Aug 2010 21:26:56 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Namhyung Kim <namhyung@...il.com>
Cc: Roland McGrath <roland@...hat.com>,
Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 02/43] ptrace: cleanup ptrace_request()
On Friday 27 August 2010 18:13:35 Namhyung Kim wrote:
> Arnd Bergmann <arnd@...db.de> writes:
> > If you introduce two pointers, 'siginfo_t __user *usiginfo' and
> > 'unsigned long __user *datap' instead of just 'datap', you can use
> > get_user/put_user everywhere, which would make the code better readable
> > and faster.
> >
> > Otherwise this change looks good.
> >
>
> Despite I don't know how much it can run faster, I just want to keep it as is
> unless it would be a serious mistake. :-)
No, not a mistake, your code is fine as it is and not performance
critical at all.
However, in general using get_user/put_user is preferred over
copy_from_user/copy_to_user for scalar values.
Arnd
--
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