Re: [RFC PATCH] powerpc/mm: Implement STRICT_MODULE_RWX

2019-05-20 Thread Russell Currey
On Wed, 2019-05-15 at 06:20 +, Christophe Leroy wrote: Confirming this works on hash and radix book3s64. > + > + // only operate on VM areas for now > + area = find_vm_area((void *)addr); > + if (!area || end > (unsigned long)area->addr + area->size || > + !(area->flags &

Re: [RFC PATCH] powerpc/mm: Implement STRICT_MODULE_RWX

2019-05-15 Thread Russell Currey
On Wed, 2019-05-15 at 06:20 +, Christophe Leroy wrote: > Strict module RWX is just like strict kernel RWX, but for modules - > so > loadable modules aren't marked both writable and executable at the > same > time. This is handled by the generic code in kernel/module.c, and > simply requires th

Re: [RFC PATCH] powerpc/mm: Implement STRICT_MODULE_RWX

2019-05-14 Thread Christophe Leroy
Le 15/05/2019 à 08:42, Christoph Hellwig a écrit : +static int change_page_ro(pte_t *ptep, pgtable_t token, unsigned long addr, void *data) There are a couple way too long lines like this in the patch. powerpc arch accepts 90 chars per line, see arch/powerpc/tools/checkpatch.pl Christop

Re: [RFC PATCH] powerpc/mm: Implement STRICT_MODULE_RWX

2019-05-14 Thread Christoph Hellwig
> +static int change_page_ro(pte_t *ptep, pgtable_t token, unsigned long addr, > void *data) There are a couple way too long lines like this in the patch.

[RFC PATCH] powerpc/mm: Implement STRICT_MODULE_RWX

2019-05-14 Thread Christophe Leroy
Strict module RWX is just like strict kernel RWX, but for modules - so loadable modules aren't marked both writable and executable at the same time. This is handled by the generic code in kernel/module.c, and simply requires the architecture to implement the set_memory() set of functions, declared