Skip to content
Unverified Commit 7ab72c59 authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Palmer Dabbelt
Browse files

riscv: Make VM_WRITE imply VM_READ

RISC-V does not presently have write-only mappings as that PTE bit pattern
is considered reserved in the privileged spec, so allow handling of read
faults in VMAs that have VM_WRITE without VM_READ in order to be consistent
with other architectures that have similar limitations.

Fixes: 2139619b

 ("riscv: mmap with PROT_WRITE but no PROT_READ is invalid")
Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
Signed-off-by: default avatarAndrew Bresticker <abrestic@rivosinc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220915193702.2201018-2-abrestic@rivosinc.com/
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 568035b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment