[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36637d85-d716-a2d4-189c-10ed209f4827@linux.intel.com>
Date: Mon, 2 Apr 2018 13:23:04 -0700
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Andrew Lutomirski <luto@...nel.org>,
Kees Cook <keescook@...gle.com>,
Hugh Dickins <hughd@...gle.com>,
Jürgen Groß <jgross@...e.com>,
the arch/x86 maintainers <x86@...nel.org>, namit@...are.com
Subject: Re: [PATCH 01/11] x86/mm: factor out pageattr _PAGE_GLOBAL setting
On 04/02/2018 10:52 AM, Linus Torvalds wrote:
> On Mon, Apr 2, 2018 at 10:27 AM, Dave Hansen
> <dave.hansen@...ux.intel.com> wrote:
>>
>> Aside: _PAGE_GLOBAL is ignored when CR4.PGE=1, so why do we
>> even go to the trouble of filtering it anywhere?
>
> I'm assuming this is a typo, and you mean "when CR4.PGE=0".
Yes, that is a typo.
> The question you raise may be valid, but within the particular context
> of *this* patch it is not.
I thought it was relevant because I was asking myself: Why is it OK for
the (old) code to be doing this:
> - if (pgprot_val(req_prot) & _PAGE_PRESENT)
> - pgprot_val(req_prot) |= _PAGE_PSE | _PAGE_GLOBAL;
When _PAGE_GLOBAL is not supported. This "Aside" got moved a bit away
from the comment, but I actually mean to refer to the comment that talks
about canon_pgprot():
>> canon_pgprot() will clear it if unsupported,
>> but we *always* set it.
and its use of __supported_pte_mask.
I'll redo the changelog a bit and hopefully capture all this along with
correcting the typo.
Powered by blists - more mailing lists