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

2019-01-08 Thread Kees Cook
On Tue, Jan 8, 2019 at 1:11 PM Christophe Leroy wrote: > > > > Le 08/01/2019 à 20:48, Andrew Morton a écrit : > > On Tue, 8 Jan 2019 07:37:44 + (UTC) Christophe Leroy > > wrote: > > > >> In powerpc code, there are several places implementing safe > >> access to user data. This is sometimes

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

2019-01-08 Thread Christophe Leroy
Le 08/01/2019 à 20:48, Andrew Morton a écrit : On Tue, 8 Jan 2019 07:37:44 + (UTC) 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() verificati

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

2019-01-08 Thread Andrew Morton
On Tue, 8 Jan 2019 07:37:44 + (UTC) 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 p

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

2019-01-07 Thread Mike Rapoport
On Tue, Jan 08, 2019 at 07:37:44AM +, 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 pag

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

2019-01-07 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() ba