[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFx5GCahkr_-Y0qF5S=USCXhNcvWZ6gr_TxpvUVAh46STA@mail.gmail.com>
Date: Mon, 2 Apr 2018 10:56:26 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Dave Hansen <dave.hansen@...ux.intel.com>
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 09/11] x86/pti: enable global pages for shared areas
On Mon, Apr 2, 2018 at 10:27 AM, Dave Hansen
<dave.hansen@...ux.intel.com> wrote:
>
> + /*
> + * The cpu_entry_area is shared between the user and kernel
> + * page tables. All of its ptes can safely be global.
> + */
> + if (boot_cpu_has(X86_FEATURE_PGE))
> + pte = pte_set_flags(pte, _PAGE_GLOBAL);
So this is where the quesion of "why is this conditional" is valid.
We could set _PAGE_GLOBAL unconditionally, not bothering with testing
X86_FEATURE_PGE.
Linus
Powered by blists - more mailing lists