Re: [PATCH] riscv: Allow PROT_WRITE-only mmap()

From: Andrew Bresticker
Date: Thu Sep 08 2022 - 14:14:43 EST

On Thu, Sep 8, 2022 at 1:28 PM SS JieJi <c141028@xxxxxxxxx> wrote:
> >, showing *inconsistent* read results on -r- pages
> > before/after a write attempt performed by the kernel.
> That said, maybe prohibit mmap-ing -w- pages is not the best fix for
> this issue. If -w- pages are irreplaceable for some use cases (and
> hence need to be allowed), I'd suggest at least we need to re-fix the
> read result inconsistency issue somewhere else despite simply
> reverting the patch.

Ah, this is because do_page_fault() also needs to be made aware of
write-implying-read. Will send a v2 shortly.


> Yours, Pan Ruizhe