mm: Clear arch specific VM flags on protection change
authorKhalid Aziz <khalid.aziz@oracle.com>
Wed, 21 Feb 2018 17:15:50 +0000 (10:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Mar 2018 14:38:47 +0000 (07:38 -0700)
commit2c2d57b5e769956fb36581e0d3cccdb5ea68038f
tree339cc77f5489da03b12eb478315429f2c60bcf9d
parent9035cf9a97e429e6b5291841da81c433879f5658
mm: Clear arch specific VM flags on protection change

When protection bits are changed on a VMA, some of the architecture
specific flags should be cleared as well. An examples of this are the
PKEY flags on x86. This patch expands the current code that clears
PKEY flags for x86, to support similar functionality for other
architectures as well.

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Khalid Aziz <khalid@gonehiking.org>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mm.h
mm/mprotect.c