[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALE4mHpO5eFk9-G=RCk97JiwnBMMFLiB4qvV-XXO+N8oxz0QTA@mail.gmail.com>
Date: Thu, 8 Sep 2022 15:18:02 -0400
From: Andrew Bresticker <abrestic@...osinc.com>
To: SS JieJi <c141028@...il.com>
Cc: Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Atish Patra <atishp@...shpatra.org>,
Celeste Liu <coelacanthus@...look.com>,
dram <dramforever@...e.com>, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] riscv: Make mmap() with PROT_WRITE imply PROT_READ
On Thu, Sep 8, 2022 at 2:57 PM SS JieJi <c141028@...il.com> wrote:
>
> The v2 patch looks great,
> > - if (unlikely((prot & PROT_WRITE) && !(prot & PROT_READ)))
> > - return -EINVAL;
> > -
> This also removes the check for --x pages, which used to be present in
> previous versions (before the submission of the to-be-reverted patch).
> Is this intended? Thanks!
There's no change in behavior for --X mappings; those have always been
allowed as it's a valid set of PTE permissions.
This patch does allow -WX mappings, which were originally disallowed
in commit e0d17c842c0f ("RISC-V: Don't allow write+exec only page
mapping request in mmap"), by implying read permissions for such
mappings as well. I have a note in the commit message about this.
-Andrew
Powered by blists - more mailing lists