[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <160626692283.3364.16416416609704664088.tip-bot2@tip-bot2>
Date: Wed, 25 Nov 2020 01:15:22 -0000
From: "tip-bot2 for Gabriel Krisman Bertazi" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Naresh Kamboju <naresh.kamboju@...aro.org>,
Jann Horn <jannh@...gle.com>,
Gabriel Krisman Bertazi <krisman@...labora.com>,
Thomas Gleixner <tglx@...utronix.de>,
Kees Cook <keescook@...omium.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: core/entry] entry: Fix boot for !CONFIG_GENERIC_ENTRY
The following commit has been merged into the core/entry branch of tip:
Commit-ID: 0395124a2fbff5132afee5767071ebe7e05885ac
Gitweb: https://git.kernel.org/tip/0395124a2fbff5132afee5767071ebe7e05885ac
Author: Gabriel Krisman Bertazi <krisman@...labora.com>
AuthorDate: Mon, 23 Nov 2020 10:54:58 -05:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 24 Nov 2020 23:44:28 +01:00
entry: Fix boot for !CONFIG_GENERIC_ENTRY
A copy-pasta mistake tries to set SYSCALL_WORK flags instead of TIF
flags for !CONFIG_GENERIC_ENTRY. Also, add safeguards to catch this at
compilation time.
Fixes: 3136b93c3fb2 ("entry: Expose helpers to migrate TIF to SYSCALL_WORK flags")
Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
Suggested-by: Jann Horn <jannh@...gle.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Kees Cook <keescook@...omium.org>
Link: https://lore.kernel.org/r/87a6v8qd9p.fsf_-_@collabora.com
---
include/linux/thread_info.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 3173632..5515ab3 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -35,6 +35,7 @@ enum {
GOOD_STACK,
};
+#ifdef CONFIG_GENERIC_ENTRY
enum syscall_work_bit {
SYSCALL_WORK_BIT_SECCOMP,
SYSCALL_WORK_BIT_SYSCALL_TRACEPOINT,
@@ -48,6 +49,7 @@ enum syscall_work_bit {
#define SYSCALL_WORK_SYSCALL_TRACE BIT(SYSCALL_WORK_BIT_SYSCALL_TRACE)
#define SYSCALL_WORK_SYSCALL_EMU BIT(SYSCALL_WORK_BIT_SYSCALL_EMU)
#define SYSCALL_WORK_SYSCALL_AUDIT BIT(SYSCALL_WORK_BIT_SYSCALL_AUDIT)
+#endif
#include <asm/thread_info.h>
@@ -129,11 +131,11 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
#else /* CONFIG_GENERIC_ENTRY */
#define set_syscall_work(fl) \
- set_ti_thread_flag(current_thread_info(), SYSCALL_WORK_##fl)
+ set_ti_thread_flag(current_thread_info(), TIF_WORK_##fl)
#define test_syscall_work(fl) \
- test_ti_thread_flag(current_thread_info(), SYSCALL_WORK_##fl)
+ test_ti_thread_flag(current_thread_info(), TIF_WORK_##fl)
#define clear_syscall_work(fl) \
- clear_ti_thread_flag(current_thread_info(), SYSCALL_WORK_##fl)
+ clear_ti_thread_flag(current_thread_info(), TIF_WORK_##fl)
#define set_task_syscall_work(t, fl) \
set_ti_thread_flag(task_thread_info(t), TIF_##fl)
Powered by blists - more mailing lists