lkml.org 
[lkml]   [2012]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] asm-generic: uaccess: allow arch to over-ride __get_user_fn()
Date
On Tuesday 20 November 2012, Vineet.Gupta1@synopsys.com wrote:
> +#ifndef __get_user_fn
> static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
> {
> size = __copy_from_user(x, ptr, size);
> return size ? -EFAULT : size;
> }
>
> +#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
> +
> +#endif

This is ok as well. The idea with the asm-generic __copy_from_user()
implementation is to separate out the cases where you have just
a few bytes and handle them efficiently inline. If you don't want
to do that for some reason, overriding __get_user_fn works
as well. The resulting object code should be the same.

Arnd


\
 
 \ /
  Last update: 2012-11-20 17:41    [W:0.037 / U:2.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site