]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: add exec protection on powerpc 603
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 28 Nov 2018 17:21:10 +0000 (17:21 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Dec 2018 07:56:32 +0000 (18:56 +1100)
commit18f18a49802a65dd7d5e5b6a752c4fae1f686b5f
tree6bca1bde5792cd345deca9a6dea1f0b929f42e31
parent00851a92402c96467200a2b296f3d30c511ec659
powerpc/mm: add exec protection on powerpc 603

The 603 doesn't have a HASH table, TLB misses are handled by
software. It is then possible to generate page fault when
_PAGE_EXEC is not set like in nohash/32.

There is one "reserved" PTE bit available, this patch uses
it for _PAGE_EXEC.

In order to support it, set_pte_filter() and
set_access_flags_filter() are made common, and the handling
is made dependent on MMU_FTR_HPTE_TABLE

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/32/hash.h
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/include/asm/cputable.h
arch/powerpc/kernel/head_32.S
arch/powerpc/mm/dump_linuxpagetables-generic.c
arch/powerpc/mm/pgtable.c