linux/arch/riscv
Celeste Liu 2139619bca
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: xctan <xc-tan@outlook.com>
Co-developed-by: dram <dramforever@live.com>
Signed-off-by: dram <dramforever@live.com>
Co-developed-by: Ruizhe Pan <c141028@gmail.com>
Signed-off-by: Ruizhe Pan <c141028@gmail.com>
Signed-off-by: Celeste Liu <coelacanthus@outlook.com>
Link: https://lore.kernel.org/r/PH7PR14MB559464DBDD310E755F5B21E8CEDC9@PH7PR14MB5594.namprd14.prod.outlook.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-07-21 15:53:46 -07:00
..
boot riscv: dts: sifive: "fix" pmic watchdog node name 2022-07-14 14:46:22 -07:00
configs RISC-V: Add CONFIG_{NON,}PORTABLE 2022-07-14 11:19:49 -07:00
errata riscv: remove usage of function-pointers from cpufeatures and t-head errata 2022-06-16 15:47:41 -07:00
include RISC-V: Support for 64bit hartid on RV64 platforms 2022-07-19 21:15:36 -07:00
kernel riscv: mmap with PROT_WRITE but no PROT_READ is invalid 2022-07-21 15:53:46 -07:00
kvm RISC-V: KVM: Introduce ISA extension register 2022-05-20 09:09:20 +05:30
lib riscv: Fixed misaligned memory access. Fixed pointer comparison. 2022-03-10 10:24:04 -08:00
mm riscv: mm: init: make pt_ops_set_[early|late|fixmap] static 2022-06-02 14:50:41 -07:00
net riscv, bpf: Implement more atomic operations for RV64 2022-04-11 16:54:54 +02:00
purgatory RISC-V: Add purgatory 2022-05-19 12:18:59 -07:00
Kbuild riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild 2022-06-01 22:26:32 -07:00
Kconfig RISC-V: Add CONFIG_{NON,}PORTABLE 2022-07-14 11:19:49 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.erratas riscv: Kconfig: Style cleanups 2022-06-30 19:26:16 -07:00
Kconfig.socs riscv: Kconfig: Style cleanups 2022-06-30 19:26:16 -07:00
Makefile riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild 2022-06-01 22:26:32 -07:00