diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2019-05-14 23:13:26 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-05-14 23:13:26 +0100 |
commit | 6a7a7502197288063458796f6a07f3f6e92ff86b (patch) | |
tree | 11ff8008ba9a75e4cef4fcabe9b037c6e5041427 /queue-3.16 | |
parent | 504f9024e7d7a5769408cc3f0cb95109e040201d (diff) | |
download | linux-stable-queue-6a7a7502197288063458796f6a07f3f6e92ff86b.tar.gz |
Fix definitions of _TIF_WORK_MASK, _TIF_ALLWORK_MASK
Diffstat (limited to 'queue-3.16')
3 files changed, 39 insertions, 12 deletions
diff --git a/queue-3.16/x86-speculation-avoid-__switch_to_xtra-calls.patch b/queue-3.16/x86-speculation-avoid-__switch_to_xtra-calls.patch index da719947..3c7b6560 100644 --- a/queue-3.16/x86-speculation-avoid-__switch_to_xtra-calls.patch +++ b/queue-3.16/x86-speculation-avoid-__switch_to_xtra-calls.patch @@ -50,7 +50,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h -@@ -148,9 +148,18 @@ struct thread_info { +@@ -149,9 +149,18 @@ struct thread_info { _TIF_USER_RETURN_NOTIFY | _TIF_UPROBE) /* flags to check in __switch_to() */ diff --git a/queue-3.16/x86-speculation-prepare-for-per-task-indirect-branch-speculation.patch b/queue-3.16/x86-speculation-prepare-for-per-task-indirect-branch-speculation.patch index 2c4810ef..29ecf208 100644 --- a/queue-3.16/x86-speculation-prepare-for-per-task-indirect-branch-speculation.patch +++ b/queue-3.16/x86-speculation-prepare-for-per-task-indirect-branch-speculation.patch @@ -44,16 +44,11 @@ Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Dave Stewart <david.c.stewart@intel.com> Cc: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20181125185005.176917199@linutronix.de -[bwh: Backported to 3.16: adjust filename, context] +[bwh: Backported to 3.16: + - Exclude _TIF_SPEC_IB from _TIF_WORK_MASK and _TIF_ALLWORK_MASK + - Adjust filename, context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- - arch/x86/include/asm/spec-ctrl.h | 12 ++++++++++++ - arch/x86/include/asm/thread_info.h | 5 ++++- - arch/x86/include/uapi/asm/msr-index.h | 5 +++-- - arch/x86/kernel/cpu/bugs.c | 4 ++++ - arch/x86/kernel/process.c | 20 ++++++++++++++++++-- - 5 files changed, 41 insertions(+), 5 deletions(-) - --- a/arch/x86/include/asm/spec-ctrl.h +++ b/arch/x86/include/asm/spec-ctrl.h @@ -53,12 +53,24 @@ static inline u64 ssbd_tif_to_spec_ctrl( @@ -99,7 +94,22 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk> #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) #define _TIF_USER_RETURN_NOTIFY (1 << TIF_USER_RETURN_NOTIFY) #define _TIF_UPROBE (1 << TIF_UPROBE) -@@ -147,7 +149,8 @@ struct thread_info { +@@ -133,11 +135,12 @@ struct thread_info { + #define _TIF_WORK_MASK \ + (0x0000FFFF & \ + ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT| \ +- _TIF_SINGLESTEP|_TIF_SSBD|_TIF_SECCOMP|_TIF_SYSCALL_EMU)) ++ _TIF_SINGLESTEP|_TIF_SSBD|_TIF_SECCOMP|_TIF_SYSCALL_EMU| \ ++ _TIF_SPEC_IB)) + + /* work to do on any return to user space */ + #define _TIF_ALLWORK_MASK \ +- ((0x0000FFFF & ~(_TIF_SSBD | _TIF_SECCOMP)) | \ ++ ((0x0000FFFF & ~(_TIF_SSBD | _TIF_SECCOMP | _TIF_SPEC_IB)) | \ + _TIF_SYSCALL_TRACEPOINT | _TIF_NOHZ) + + /* Only used for 64 bit */ +@@ -147,7 +150,8 @@ struct thread_info { /* flags to check in __switch_to() */ #define _TIF_WORK_CTXSW \ diff --git a/queue-3.16/x86-speculation-prevent-stale-spec_ctrl-msr-content.patch b/queue-3.16/x86-speculation-prevent-stale-spec_ctrl-msr-content.patch index 4d39215b..de3dc7b7 100644 --- a/queue-3.16/x86-speculation-prevent-stale-spec_ctrl-msr-content.patch +++ b/queue-3.16/x86-speculation-prevent-stale-spec_ctrl-msr-content.patch @@ -65,7 +65,9 @@ Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Dave Stewart <david.c.stewart@intel.com> Cc: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811272247140.1875@nanos.tec.linutronix.de -[bwh: Backported to 3.16: assign the first available thread_info flag] +[bwh: Backported to 3.16: + - Assign the first available thread_info flag + - Exclude _TIF_SPEC_FORCE_UPDATE from _TIF_WORK_MASK and _TIF_ALLWORK_MASK] Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- arch/x86/include/asm/spec-ctrl.h | 6 +----- @@ -106,7 +108,22 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk> #define _TIF_NOTSC (1 << TIF_NOTSC) #define _TIF_IA32 (1 << TIF_IA32) #define _TIF_FORK (1 << TIF_FORK) -@@ -150,7 +152,7 @@ struct thread_info { +@@ -136,11 +138,12 @@ struct thread_info { + (0x0000FFFF & \ + ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT| \ + _TIF_SINGLESTEP|_TIF_SSBD|_TIF_SECCOMP|_TIF_SYSCALL_EMU| \ +- _TIF_SPEC_IB)) ++ _TIF_SPEC_IB|_TIF_SPEC_FORCE_UPDATE)) + + /* work to do on any return to user space */ + #define _TIF_ALLWORK_MASK \ +- ((0x0000FFFF & ~(_TIF_SSBD | _TIF_SECCOMP | _TIF_SPEC_IB)) | \ ++ ((0x0000FFFF & ~(_TIF_SSBD | _TIF_SECCOMP | _TIF_SPEC_IB | \ ++ _TIF_SPEC_FORCE_UPDATE)) | \ + _TIF_SYSCALL_TRACEPOINT | _TIF_NOHZ) + + /* Only used for 64 bit */ +@@ -151,7 +154,7 @@ struct thread_info { /* flags to check in __switch_to() */ #define _TIF_WORK_CTXSW_BASE \ (_TIF_IO_BITMAP|_TIF_NOTSC|_TIF_BLOCKSTEP| \ |