lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <503339cf-7e54-0888-1767-c8ac87ce2130@linux.intel.com> Date: Mon, 2 Apr 2018 13:41:57 -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 09/11] x86/pti: enable global pages for shared areas On 04/02/2018 10:56 AM, Linus Torvalds wrote: > 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. I think we should just keep the check for now. Before this patch set, on !X86_FEATURE_PGE systems, we cleared _PAGE_GLOBAL in virtually all places due to masking via __supported_pte_mask. It is rather harmless either way, but being _consistent_ (by keeping the check) with all of our PTEs is nice.
Powered by blists - more mailing lists