Skip to content
Unverified Commit 2139619b authored by Celeste Liu's avatar Celeste Liu Committed by Palmer Dabbelt
Browse files

riscv: mmap with PROT_WRITE but no PROT_READ is invalid



As mentioned in Table 4.5 in RISC-V spec Volume 2 Section 4.3, write
but not read is "Reserved for future use.". For now, they are not valid.
In the current code, -wx is marked as invalid, but -w- is not marked
as invalid.
This patch refines that judgment.

Reported-by: default avatarxctan <xc-tan@outlook.com>
Co-developed-by: default avatardram <dramforever@live.com>
Signed-off-by: default avatardram <dramforever@live.com>
Co-developed-by: default avatarRuizhe Pan <c141028@gmail.com>
Signed-off-by: default avatarRuizhe Pan <c141028@gmail.com>
Signed-off-by: default avatarCeleste Liu <coelacanthus@outlook.com>
Link: https://lore.kernel.org/r/PH7PR14MB559464DBDD310E755F5B21E8CEDC9@PH7PR14MB5594.namprd14.prod.outlook.com
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 8916c905
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