From: Matthew Wilcox <willy@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
kernel test robot <oliver.sang@intel.com>,
Ingo Molnar <mingo@kernel.org>,
x86@kernel.org
Subject: Re: [tip: x86/mm] x86/mm: Clear _PAGE_DIRTY when we clear _PAGE_RW
Date: Wed, 26 Feb 2025 04:00:40 +0000 [thread overview]
Message-ID: <Z76R6ESSwiYipQVn@casper.infradead.org> (raw)
In-Reply-To: <CAHk-=wj+VBV5kBMfXYNOb+aLt3WJqMKFT0wU=KaV3R12NvN5TA@mail.gmail.com>
On Tue, Feb 25, 2025 at 07:31:01PM -0800, Linus Torvalds wrote:
> > I don't understand why the dirty bit needs to be saved. At least in
> > the vfree() case, we're freeing the memory so any unflushed writes to
> > it may as well disappear. But I don't know all the circumstances in
> > which these functions are called.
>
> I'm not saying that it needs to be saved.
>
> But I *am* saying that it needs to be explained why dropping it is fine.
>
> And I am also saying that your explanation for why it should be
> cleared makes no sense, since two out of three cases also cleared
> _PAGE_PRESENT, at which point the whole shadow stack issue is
> completely irrelevant.
>
> So please explain *why* clearing PAGE_DIRTY is ok. Don't bring up
> issues like the shadow stack setting that is irrelevant for at least
> two of the cases that you changed.
>
> If all of these are purely used for vmalloc() or direct mappings, then
> *that* is a valid explanation ("we don't care about dirty bits on
> kernel mappings"), for example.
I think the entire point of this file is to manipulate kernel mappings.
next prev parent reply other threads:[~2025-02-26 4:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 20:10 tip-bot2 for Matthew Wilcox (Oracle)
2025-02-25 21:07 ` Linus Torvalds
2025-02-26 2:45 ` Matthew Wilcox
2025-02-26 3:31 ` Linus Torvalds
2025-02-26 4:00 ` Matthew Wilcox [this message]
2025-02-26 4:06 ` Linus Torvalds
2025-02-26 10:55 ` Ingo Molnar
2025-02-26 19:46 ` Linus Torvalds
2025-02-27 9:04 ` [tip: x86/mm] x86/mm: Clear _PAGE_DIRTY for kernel mappings " tip-bot2 for Matthew Wilcox (Oracle)
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=Z76R6ESSwiYipQVn@casper.infradead.org \
--to=willy@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oliver.sang@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®