[PATCH v2] riscv: Make mmap() with PROT_WRITE imply PROT_READ
Celeste Liu
coelacanthushex at gmail.com
Fri Sep 9 08:45:34 PDT 2022
On 2022/9/9 23:16, Andrew Bresticker wrote>
> I think leaving the PROT_WRITE-implies-PROT_READ as being specified as
> architecture-dependent is reasonable, but of course portable programs
> shouldn't rely on this behavior. There are CPUs out there that support
> write-only mappings -- MIPS with RI/XI comes to mind and indeed
> mmap(PROT_WRITE) on such CPUs results in write-only mappings.
>
> -Andrew
>
Ok, I have no question now. This patch looks good to me.
This feature shouldn't be relied upon indeed, as it depends on the specific
hardware implementation.
Thanks for your explanation!
Yours,
Celeste Liu
More information about the linux-riscv
mailing list