Re: [PATCH v3 1/2] mm: add probe_user_read()

2019-02-07 Thread Michael Ellerman
Jann Horn writes: > On Thu, Feb 7, 2019 at 10:22 AM Christophe Leroy > wrote: >> In powerpc code, there are several places implementing safe >> access to user data. This is sometimes implemented using >> probe_kernel_address() with additional access_ok() verification, >> sometimes with

Re: [PATCH v3 1/2] mm: add probe_user_read()

2019-02-07 Thread Matthew Wilcox
On Wed, Jan 16, 2019 at 04:59:27PM +, Christophe Leroy wrote: > v3: Moved 'Returns:" comment after description. > Explained in the commit log why the function is defined static inline > > v2: Added "Returns:" comment and removed probe_user_address() The correct spelling is 'Return:',

Re: [PATCH v3 1/2] mm: add probe_user_read()

2019-02-07 Thread Jann Horn
On Thu, Feb 7, 2019 at 10:22 AM Christophe Leroy wrote: > In powerpc code, there are several places implementing safe > access to user data. This is sometimes implemented using > probe_kernel_address() with additional access_ok() verification, > sometimes with get_user() enclosed in a

Re: [PATCH v3 1/2] mm: add probe_user_read()

2019-02-06 Thread Michael Ellerman
Murilo Opsfelder Araujo writes: >> diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h >> index 37b226e8df13..ef99edd63da3 100644 >> --- a/include/linux/uaccess.h >> +++ b/include/linux/uaccess.h >> @@ -263,6 +263,40 @@ extern long strncpy_from_unsafe(char *dst, const void >>

Re: [PATCH v3 1/2] mm: add probe_user_read()

2019-02-05 Thread Murilo Opsfelder Araujo
Hi, Christophe. On Wed, Jan 16, 2019 at 04:59:27PM +, Christophe Leroy wrote: > In powerpc code, there are several places implementing safe > access to user data. This is sometimes implemented using > probe_kernel_address() with additional access_ok() verification, > sometimes with get_user()

Re: [PATCH v3 1/2] mm: add probe_user_read()

2019-01-30 Thread Michael Ellerman
Christophe Leroy writes: > In powerpc code, there are several places implementing safe > access to user data. This is sometimes implemented using > probe_kernel_address() with additional access_ok() verification, > sometimes with get_user() enclosed in a pagefault_disable()/enable() > pair, etc.

[PATCH v3 1/2] mm: add probe_user_read()

2019-01-16 Thread Christophe Leroy
In powerpc code, there are several places implementing safe access to user data. This is sometimes implemented using probe_kernel_address() with additional access_ok() verification, sometimes with get_user() enclosed in a pagefault_disable()/enable() pair, etc. : show_user_instructions()