mm: don't allow executable ioremap mappings
authorChristoph Hellwig <hch@lst.de>
Wed, 8 Sep 2021 02:56:04 +0000 (19:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Sep 2021 18:50:24 +0000 (11:50 -0700)
commit8491502f787c4a902bd4f223b578ef47d3490264
treefb17f5e99a94cd457c73f7cb7e74c9272c5df8a1
parent82a70ce0426dd7c4099516175019dccbd18cebf9
mm: don't allow executable ioremap mappings

There is no need to execute from iomem (and most platforms it is
impossible anyway), so add the pgprot_nx() call similar to vmap.

Link: https://lkml.kernel.org/r/20210824091259.1324527-3-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmalloc.c