From: "tip-bot2 for Gabriel Krisman Bertazi" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
Jann Horn <jannh@google.com>,
Gabriel Krisman Bertazi <krisman@collabora.com>,
Thomas Gleixner <tglx@linutronix.de>,
Kees Cook <keescook@chromium.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: core/entry] entry: Fix boot for !CONFIG_GENERIC_ENTRY
Date: Wed, 25 Nov 2020 01:26:30 -0000 [thread overview]
Message-ID: <160626759088.3364.15796596877725637031.tip-bot2@tip-bot2> (raw)
In-Reply-To: <87a6v8qd9p.fsf_-_@collabora.com>
The following commit has been merged into the core/entry branch of tip:
Commit-ID: 5903f61e035320104394f721f74cd22171636f63
Gitweb: https://git.kernel.org/tip/5903f61e035320104394f721f74cd22171636f63
Author: Gabriel Krisman Bertazi <krisman@collabora.com>
AuthorDate: Mon, 23 Nov 2020 10:54:58 -05:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 25 Nov 2020 02:20:09 +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@linaro.org>
Suggested-by: Jann Horn <jannh@google.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kees Cook <keescook@chromium.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..ca80a21 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_##fl)
#define test_syscall_work(fl) \
- test_ti_thread_flag(current_thread_info(), SYSCALL_WORK_##fl)
+ test_ti_thread_flag(current_thread_info(), TIF_##fl)
#define clear_syscall_work(fl) \
- clear_ti_thread_flag(current_thread_info(), SYSCALL_WORK_##fl)
+ clear_ti_thread_flag(current_thread_info(), TIF_##fl)
#define set_task_syscall_work(t, fl) \
set_ti_thread_flag(task_thread_info(t), TIF_##fl)
prev parent reply other threads:[~2020-11-25 1:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 11:15 [arm64] kernel BUG at kernel/seccomp.c:1309! Naresh Kamboju
2020-11-23 13:45 ` Arnd Bergmann
2020-11-23 14:02 ` Jann Horn
2020-11-23 14:26 ` Gabriel Krisman Bertazi
2020-11-23 15:54 ` [PATCH] entry: Fix boot for !CONFIG_GENERIC_ENTRY Gabriel Krisman Bertazi
2020-11-24 21:45 ` Kees Cook
2020-11-25 3:36 ` Naresh Kamboju
2020-11-25 1:15 ` [tip: core/entry] " tip-bot2 for Gabriel Krisman Bertazi
2020-11-25 1:26 ` tip-bot2 for Gabriel Krisman Bertazi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160626759088.3364.15796596877725637031.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=jannh@google.com \
--cc=keescook@chromium.org \
--cc=krisman@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=naresh.kamboju@linaro.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).