Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 06 Aug 2018 23:35:41 -0000 Received: from mga07.intel.com ([134.134.136.100]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fmp11-0000US-2A for speck@linutronix.de; Tue, 07 Aug 2018 01:34:19 +0200 From: Andi Kleen Subject: [MODERATED] [PATCH 0/4] INVERTv1 2 Date: Mon, 6 Aug 2018 16:29:12 -0700 Message-Id: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: speck@linutronix.de Cc: Andi Kleen List-ID: Dave Hansen pointed out that set_memory_np didn't invert its non present PTEs. During another audit we found also a case in THP that didn't invert. This patch kit fixes inversion for those kernel mappings. Mostly it's interesting for guest kernels when it would allow bypassing EPT inside the same guest. For production binary kernels without debug options only the first two patches are needed. Andi Kleen (4): x86/speculation/l1tf: Enable invertion for non PROTNONE !P maps x86/speculation/l1tf: Make pmd/pud_mknotpresent invert x86/speculation/l1tf: Make the mmio tracer invert x86/speculation/l1tf: Make set_memory_np invert arch/x86/include/asm/pgtable-invert.h | 2 +- arch/x86/include/asm/pgtable.h | 22 ++++++++++++---------- arch/x86/mm/kmmio.c | 23 +++++++++++++---------- arch/x86/mm/pageattr.c | 8 ++++---- 4 files changed, 30 insertions(+), 25 deletions(-) -- 2.17.1