Re: [PATCH v1 09/10] lkdtm: Fix lkdtm_EXEC_RODATA()

2021-10-13 Thread Christophe Leroy
Le 13/10/2021 à 09:48, Christophe Leroy a écrit : Le 13/10/2021 à 09:39, Christophe Leroy a écrit : Le 13/10/2021 à 09:23, Kees Cook a écrit : On Mon, Oct 11, 2021 at 05:25:36PM +0200, Christophe Leroy wrote: Behind a location, lkdtm_EXEC_RODATA() executes a real function, not a copy

Re: [PATCH v1 09/10] lkdtm: Fix lkdtm_EXEC_RODATA()

2021-10-13 Thread Christophe Leroy
Le 13/10/2021 à 09:39, Christophe Leroy a écrit : Le 13/10/2021 à 09:23, Kees Cook a écrit : On Mon, Oct 11, 2021 at 05:25:36PM +0200, Christophe Leroy wrote: Behind a location, lkdtm_EXEC_RODATA() executes a real function, not a copy of do_nothing(). So do it directly instead of using

Re: [PATCH v1 09/10] lkdtm: Fix lkdtm_EXEC_RODATA()

2021-10-13 Thread Christophe Leroy
Le 13/10/2021 à 09:23, Kees Cook a écrit : On Mon, Oct 11, 2021 at 05:25:36PM +0200, Christophe Leroy wrote: Behind a location, lkdtm_EXEC_RODATA() executes a real function, not a copy of do_nothing(). So do it directly instead of using execute_location(). And fix displayed addresses by

Re: [PATCH v1 09/10] lkdtm: Fix lkdtm_EXEC_RODATA()

2021-10-13 Thread Christophe Leroy
Le 13/10/2021 à 09:09, Kees Cook a écrit : On Mon, Oct 11, 2021 at 05:25:36PM +0200, Christophe Leroy wrote: Behind a location, lkdtm_EXEC_RODATA() executes a real function, not a copy of do_nothing(). So do it directly instead of using execute_location(). I don't understand this. Why

Re: [PATCH v1 09/10] lkdtm: Fix lkdtm_EXEC_RODATA()

2021-10-13 Thread Kees Cook
On Mon, Oct 11, 2021 at 05:25:36PM +0200, Christophe Leroy wrote: > Behind a location, lkdtm_EXEC_RODATA() executes a real function, > not a copy of do_nothing(). > > So do it directly instead of using execute_location(). > > And fix displayed addresses by dereferencing the function descriptors. >

Re: [PATCH v1 09/10] lkdtm: Fix lkdtm_EXEC_RODATA()

2021-10-13 Thread Kees Cook
On Mon, Oct 11, 2021 at 05:25:36PM +0200, Christophe Leroy wrote: > Behind a location, lkdtm_EXEC_RODATA() executes a real function, > not a copy of do_nothing(). > > So do it directly instead of using execute_location(). I don't understand this. Why does the next patch not fix this? -Kees >

[PATCH v1 09/10] lkdtm: Fix lkdtm_EXEC_RODATA()

2021-10-11 Thread Christophe Leroy
Behind a location, lkdtm_EXEC_RODATA() executes a real function, not a copy of do_nothing(). So do it directly instead of using execute_location(). And fix displayed addresses by dereferencing the function descriptors. Signed-off-by: Christophe Leroy --- drivers/misc/lkdtm/perms.c | 9