Re: [PATCH 1/4] x86/mm: Add a few comments

From: Linus Torvalds
Date: Thu Nov 10 2022 - 11:23:17 EST


On Thu, Nov 10, 2022 at 4:58 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> It's a shame to hide useful comments in Changelogs, add some to the
> code.
>
> Shamelessly stolen from commit:

When the comment says how the image is mapped into two places,
wouldn't it be good to also have the reason *why* rather than just
what..

That said, my real commentary for this patch set is not that
particular instance, but the bigger picture - that this code is still
a bit opaque as to why these things are done.

Do we need any of those alias passes at all for pure protection bit
changes? I thought we only did these because things like cacheability
bits have to be in sync due to machine checks etc?

Or am I missing some case where writability matters too?

Linus