[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1515427939-10999-2-git-send-email-w@1wt.eu>
Date: Mon, 8 Jan 2018 17:12:16 +0100
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, x86@...nel.org
Cc: tglx@...utronix.de, gnomes@...rguk.ukuu.org.uk,
torvalds@...ux-foundation.org, Willy Tarreau <w@....eu>
Subject: [PATCH RFC 1/4] x86/thread_info: add TIF_NOPTI to disable PTI per task
This flag indicates that the task will not use isolated page tables.
Signed-off-by: Willy Tarreau <w@....eu>
---
arch/x86/include/asm/thread_info.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index 0022333..2f92cf1 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -126,6 +126,14 @@ struct thread_info {
#define _TIF_X32 (1 << TIF_X32)
#define _TIF_FSCHECK (1 << TIF_FSCHECK)
+/* The following flags only exist on x86-64. We can't use the shift anymore
+ * due to C using signed ints by default and asm using unsigned longs.
+ */
+#ifdef CONFIG_X86_64
+# define TIF_NOPTI 32 /* disable PTI for this task */
+# define _TIF_NOPTI 0x0000000100000000
+#endif
+
/*
* work to do in syscall_trace_enter(). Also includes TIF_NOHZ for
* enter_from_user_mode()
--
1.7.12.1
Powered by blists - more mailing lists