diff options
author | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2020-11-13 12:09:49 +0100 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2020-11-19 13:26:38 +0100 |
commit | 724d554a117a0552c2c982f0b5cd1d685274d678 (patch) | |
tree | 4228b435ff5b45cb34d3be15bdd325c47e96fb60 /arch/mips/kernel/vdso.c | |
parent | mips: bmips: add BCM6318 reset controller definitions (diff) | |
download | linux-724d554a117a0552c2c982f0b5cd1d685274d678.tar.xz linux-724d554a117a0552c2c982f0b5cd1d685274d678.zip |
MIPS: vdso: Use vma page protection for remapping
MIPS protection bits are setup during runtime so using defines like
PAGE_READONLY ignores these runtime changes. To fix this we simply
use the page protection of the setup vma.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/kernel/vdso.c')
-rw-r--r-- | arch/mips/kernel/vdso.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c index 242dc5e83847..7d0b91ad2581 100644 --- a/arch/mips/kernel/vdso.c +++ b/arch/mips/kernel/vdso.c @@ -161,7 +161,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) gic_pfn = virt_to_phys(mips_gic_base + MIPS_GIC_USER_OFS) >> PAGE_SHIFT; ret = io_remap_pfn_range(vma, base, gic_pfn, gic_size, - pgprot_noncached(PAGE_READONLY)); + pgprot_noncached(vma->vm_page_prot)); if (ret) goto out; } @@ -169,7 +169,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) /* Map data page. */ ret = remap_pfn_range(vma, data_addr, virt_to_phys(vdso_data) >> PAGE_SHIFT, - PAGE_SIZE, PAGE_READONLY); + PAGE_SIZE, vma->vm_page_prot); if (ret) goto out; |