Re: [PATCH v15 08/26] x86/mm: Introduce _PAGE_COW

From: Borislav Petkov
Date: Tue Dec 08 2020 - 15:24:05 EST


On Tue, Dec 08, 2020 at 10:25:15AM -0800, Yu, Yu-cheng wrote:
> > Both are "R/O + _PAGE_COW". Where's the difference? The dirty bit?
>
> The PTEs are the same for both (a) and (b), but come from different routes.

Do not be afraid to go into detail and explain to me what those routes
are please.

> > > (e) A page where the processor observed a Write=1 PTE, started a write, set
> > > Dirty=1, but then observed a Write=0 PTE.
> >
> > How does that happen? Something changed the PTE's W bit to 0 in-between?
>
> Yes.

Also do not scare from going into detail and explaining what you mean
here. Example?

> > Does _PAGE_COW mean dirty too?
>
> Yes. Basically [read-only & dirty] is created by software. Now the
> software uses a different bit.

That convention:

"[read-only & dirty] is created by software."

needs some prominent writeup somewhere explaining what it is.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette