From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH AUTOSEL 6.3 2/7] sched: Fix KCSAN noinstr violation
Date: Mon, 8 May 2023 23:54:25 -0400 [thread overview]
Message-ID: <20230509035455.59524-2-sashal@kernel.org> (raw)
In-Reply-To: <20230509035455.59524-1-sashal@kernel.org>
From: Josh Poimboeuf <jpoimboe@kernel.org>
[ Upstream commit e0b081d17a9f4e5c0cbb0e5fbeb1abe3de0f7e4e ]
With KCSAN enabled, end_of_stack() can get out-of-lined. Force it
inline.
Fixes the following warnings:
vmlinux.o: warning: objtool: check_stackleak_irqoff+0x2b: call to end_of_stack() leaves .noinstr.text section
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/cc1b4d73d3a428a00d206242a68fdf99a934ca7b.1681320026.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/sched/task_stack.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h
index 5e799a47431e8..f158b025c1750 100644
--- a/include/linux/sched/task_stack.h
+++ b/include/linux/sched/task_stack.h
@@ -23,7 +23,7 @@ static __always_inline void *task_stack_page(const struct task_struct *task)
#define setup_thread_stack(new,old) do { } while(0)
-static inline unsigned long *end_of_stack(const struct task_struct *task)
+static __always_inline unsigned long *end_of_stack(const struct task_struct *task)
{
#ifdef CONFIG_STACK_GROWSUP
return (unsigned long *)((unsigned long)task->stack + THREAD_SIZE) - 1;
--
2.39.2
next prev parent reply other threads:[~2023-05-09 3:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 3:54 [PATCH AUTOSEL 6.3 1/7] powerpc: Use of_property_present() for testing DT property presence Sasha Levin
2023-05-09 3:54 ` Sasha Levin [this message]
2023-05-09 3:54 ` [PATCH AUTOSEL 6.3 3/7] lkdtm/stackleak: Fix noinstr violation Sasha Levin
2023-05-09 3:54 ` [PATCH AUTOSEL 6.3 4/7] riscv: Fix EFI stub usage of KASAN instrumented strcmp function Sasha Levin
2023-05-09 3:54 ` [PATCH AUTOSEL 6.3 5/7] riscv: Unconditionnally select KASAN_VMALLOC if KASAN Sasha Levin
2023-05-12 9:51 ` Alexandre Ghiti
2023-05-18 17:45 ` Sasha Levin
2023-05-09 3:54 ` [PATCH AUTOSEL 6.3 6/7] powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support Sasha Levin
2023-05-09 4:18 ` Randy Dunlap
2023-05-09 7:14 ` Michael Ellerman
2023-05-09 7:18 ` Pali Rohár
2023-05-18 17:47 ` Sasha Levin
2023-05-09 3:54 ` [PATCH AUTOSEL 6.3 7/7] recordmcount: Fix memory leaks in the uwrite function Sasha Levin
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=20230509035455.59524-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.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