mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
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>
This commit is contained in:
parent
82a70ce042
commit
8491502f78
@ -316,7 +316,7 @@ int ioremap_page_range(unsigned long addr, unsigned long end,
|
||||
{
|
||||
int err;
|
||||
|
||||
err = vmap_range_noflush(addr, end, phys_addr, prot,
|
||||
err = vmap_range_noflush(addr, end, phys_addr, pgprot_nx(prot),
|
||||
ioremap_max_page_shift);
|
||||
flush_cache_vmap(addr, end);
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user