mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 07:04:00 +08:00
arm64: mm: purge lazily unmapped vm regions before changing permissions
Call vm_unmap_aliases() every time we apply any changes to permission attributes of mappings in the vmalloc region. This avoids any potential issues resulting from lingering writable or executable aliases of mappings that should be read-only or non-executable, respectively. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
9ff01193a2
commit
b34d2ef0c6
@ -93,6 +93,12 @@ static int change_memory_common(unsigned long addr, int numpages,
|
||||
if (!numpages)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Get rid of potentially aliasing lazily unmapped vm areas that may
|
||||
* have permissions set that deviate from the ones we are setting here.
|
||||
*/
|
||||
vm_unmap_aliases();
|
||||
|
||||
return __change_memory_common(start, size, set_mask, clear_mask);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user