um: Avoid marking pages with "changed protection"
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>
Wed, 5 Dec 2018 12:37:41 +0000 (12:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:47:17 +0000 (19:47 +0100)
commit1e480ee6c0eba3e69d099b6284bcf5b78bae26d9
tree316b3eed9d516ed734864af7a8526093534dc75c
parent69e7f87745e70ca8d9b8a72e045738236d367670
um: Avoid marking pages with "changed protection"

[ Upstream commit 8892d8545f2d0342b9c550defbfb165db237044b ]

Changing protection is a very high cost operation in UML
because in addition to an extra syscall it also interrupts
mmap merge sequences generated by the tlb.

While the condition is not particularly common it is worth
avoiding.

Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/um/include/asm/pgtable.h