Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756705AbeAIM5p (ORCPT + 1 other); Tue, 9 Jan 2018 07:57:45 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:39123 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756673AbeAIM5n (ORCPT ); Tue, 9 Jan 2018 07:57:43 -0500 From: Willy Tarreau To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Willy Tarreau , Andy Lutomirski , Borislav Petkov , Brian Gerst , Dave Hansen , Ingo Molnar , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf , "H. Peter Anvin" , Kees Cook Subject: [RFC PATCH v2 1/6] x86/mm: add a pti_disable entry in mm_context_t Date: Tue, 9 Jan 2018 13:56:15 +0100 Message-Id: <1515502580-12261-2-git-send-email-w@1wt.eu> X-Mailer: git-send-email 2.8.0.rc2.1.gbe9624a In-Reply-To: <1515502580-12261-1-git-send-email-w@1wt.eu> References: <1515502580-12261-1-git-send-email-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: This will be set/cleared using arch_prctl() to allow the tasks using this mm to disable the PTI protection. Signed-off-by: Willy Tarreau Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Ingo Molnar Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: "H. Peter Anvin" Cc: Kees Cook --- arch/x86/include/asm/mmu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h index 5ff3e8a..c7c2ca1 100644 --- a/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h @@ -36,6 +36,10 @@ /* True if mm supports a task running in 32 bit compatibility mode. */ unsigned short ia32_compat; #endif +#ifdef CONFIG_PAGE_TABLE_ISOLATION + /* True if mm is forced to run with page table isolation disabled */ + char pti_disable; +#endif struct mutex lock; void __user *vdso; /* vdso base address */ -- 1.7.12.1