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

2018-12-04 Thread Michael Ellerman
Christophe Leroy writes: > In the powerpc, there are several places implementing safe ^ code ? > access to user data. This is sometimes implemented using > probe_kernel_address() with additional access_ok() verification, > sometimes with get_user() enclosed in a p

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

2018-12-03 Thread Mike Rapoport
On Mon, Dec 03, 2018 at 05:06:42PM +, Christophe Leroy wrote: > In the powerpc, 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 page

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

2018-12-03 Thread Christophe Leroy
In the powerpc, 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() b