From: "Tiwei Bie" <tiwei.btw@antgroup.com>
To: Benjamin Berg <benjamin@sipsolutions.net>,
richard@nod.at, anton.ivanov@cambridgegreys.com,
johannes@sipsolutions.net
Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] um: Abandon the _PAGE_NEWPROT bit
Date: Fri, 11 Oct 2024 16:53:38 +0800 [thread overview]
Message-ID: <fcaa6038-33dc-44a9-ab23-ac2309eeef4d@antgroup.com> (raw)
In-Reply-To: <6abc79186ace90cd2abe202a4abe0eaf17eebb5f.camel@sipsolutions.net>
Hi,
On 2024/10/11 15:39, Benjamin Berg wrote:
> Hi,
>
> On Fri, 2024-10-11 at 13:38 +0800, Tiwei Bie wrote:
>> When a PTE is updated in the page table, the _PAGE_NEWPAGE bit will
>> always be set. And the corresponding page will always be mapped or
>> unmapped depending on whether the PTE is present or not. The check
>> on the _PAGE_NEWPROT bit is not really reachable. Abandoning it will
>> allow us to simplify the code and remove the unreachable code.
>
> Oh, nice cleanup!
>
> And I like that mprotect is gone as I don't want it in SECCOMP mode :-)
>
> Maybe we should rename _PAGE_NEWPAGE to something like _PAGE_NEEDSYNC?
> I think that might make it more clear how everything ties together.
Good idea! Will do.
>
> Anyway, the change looks good to me.
>
> Benjamin
>
> Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
Thanks! :)
Regards,
Tiwei
prev parent reply other threads:[~2024-10-11 8:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 5:38 [PATCH] um: Abandon the _PAGE_NEWPROT bit Tiwei Bie
2024-10-11 7:38 ` Johannes Berg
2024-10-11 8:51 ` Tiwei Bie
2024-10-11 7:39 ` Benjamin Berg
2024-10-11 8:53 ` Tiwei Bie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fcaa6038-33dc-44a9-ab23-ac2309eeef4d@antgroup.com \
--to=tiwei.btw@antgroup.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=benjamin@sipsolutions.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox