[PATCH v2] riscv: mm: Ensure prot of VM_WRITE and VM_EXEC must be readable
patchwork-bot+linux-riscv at kernel.org
patchwork-bot+linux-riscv at kernel.org
Thu Jun 8 07:10:21 PDT 2023
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer at rivosinc.com>:
On Tue, 25 Apr 2023 18:28:28 +0800 you wrote:
> From: Hsieh-Tseng Shen <woodrow.shen at sifive.com>
>
> Commit 8aeb7b17f04e ("RISC-V: Make mmap() with PROT_WRITE imply PROT_READ")
> allows riscv to use mmap with PROT_WRITE only, and meanwhile mmap with w+x
> is also permitted. However, when userspace tries to access this page with
> PROT_WRITE|PROT_EXEC, which causes infinite loop at load page fault as
> well as it triggers soft lockup. According to riscv privileged spec,
> "Writable pages must also be marked readable". The fix to drop the
> `PAGE_COPY_READ_EXEC` and then `PAGE_COPY_EXEC` would be just used instead.
> This aligns the other arches (i.e arm64) for protection_map.
>
> [...]
Here is the summary with links:
- [v2] riscv: mm: Ensure prot of VM_WRITE and VM_EXEC must be readable
https://git.kernel.org/riscv/c/6569fc12e442
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the linux-riscv
mailing list