linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-mm 0/3] Trivial fixes for build failures
@ 2022-03-31  8:49 SeongJae Park
  2022-03-31  8:49 ` [PATCH for-mm 1/3] arch/arm64/Kconfig: Fix a typo SeongJae Park
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: SeongJae Park @ 2022-03-31  8:49 UTC (permalink / raw)
  To: akpm; +Cc: andreyknvl, linux-mm, linux-kernel, SeongJae Park

This commit fixes trivial build failures of -mm queue, which is also
available at
https://github.com/hnaz/linux-mm/tree/v5.17-mmots-2022-03-30-13-04.

SeongJae Park (3):
  arch/arm64/Kconfig: Fix a typo
  arch/arm64/kernel/irq: Include missed header file
  arch/arm64: Set HAVE_SHADOW_STACKTRACE depends on SHADOW_CALL_STACK

 arch/arm64/Kconfig             | 4 ++--
 arch/arm64/kernel/irq.c        | 1 +
 arch/arm64/kernel/stacktrace.c | 4 ++++
 3 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH for-mm 1/3] arch/arm64/Kconfig: Fix a typo
  2022-03-31  8:49 [PATCH for-mm 0/3] Trivial fixes for build failures SeongJae Park
@ 2022-03-31  8:49 ` SeongJae Park
  2022-03-31  8:49 ` [PATCH for-mm 2/3] arch/arm64/kernel/irq: Include missed header file SeongJae Park
  2022-03-31  8:49 ` [PATCH for-mm 3/3] arch/arm64: Set HAVE_SHADOW_STACKTRACE depends on SHADOW_CALL_STACK SeongJae Park
  2 siblings, 0 replies; 4+ messages in thread
From: SeongJae Park @ 2022-03-31  8:49 UTC (permalink / raw)
  To: akpm; +Cc: andreyknvl, linux-mm, linux-kernel, SeongJae Park

There is a typo in 'linux-next-rejects.patch' of linux-mm patches, which
causes build warning below:

    arch/arm64/Kconfig:199:warning: ignoring unsupported character '+'

This commit fixes it.

Fixes: d93aa6fbfc68 ("linux-next-rejects") of -mm
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b53bb0bfbde8..d9325dd95eba 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -196,7 +196,7 @@ config ARM64
 	select HAVE_PERF_USER_STACK_DUMP
 	select HAVE_PREEMPT_DYNAMIC_KEY
 	select HAVE_REGS_AND_STACK_ACCESS_API
-+	select HAVE_RUST
+	select HAVE_RUST
 	select HAVE_POSIX_CPU_TIMERS_TASK_WORK
 	select HAVE_FUNCTION_ARG_ACCESS_API
 	select MMU_GATHER_RCU_TABLE_FREE
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH for-mm 2/3] arch/arm64/kernel/irq: Include missed header file
  2022-03-31  8:49 [PATCH for-mm 0/3] Trivial fixes for build failures SeongJae Park
  2022-03-31  8:49 ` [PATCH for-mm 1/3] arch/arm64/Kconfig: Fix a typo SeongJae Park
@ 2022-03-31  8:49 ` SeongJae Park
  2022-03-31  8:49 ` [PATCH for-mm 3/3] arch/arm64: Set HAVE_SHADOW_STACKTRACE depends on SHADOW_CALL_STACK SeongJae Park
  2 siblings, 0 replies; 4+ messages in thread
From: SeongJae Park @ 2022-03-31  8:49 UTC (permalink / raw)
  To: akpm; +Cc: andreyknvl, linux-mm, linux-kernel, SeongJae Park

Commit da4561bd9c6b ("arm64, scs: save scs_sp values per-cpu when
switching stacks") of -mm is moving declaration of
irq_shadow_call_stack_ptr to scs.h of arm64 for !SHADOW_CALL_STACK, but
didn't include it in irq.c of arm64.  As a result, we show below build
error when SHADOW_CALL_STACK is unset.

    linux/arch/arm64/kernel/irq.c: In function 'init_irq_scs':
    linux/arch/arm64/kernel/irq.c:44:11: error: 'irq_shadow_call_stack_ptr' undeclared (first use in this function)
       44 |   per_cpu(irq_shadow_call_stack_ptr, cpu) =
          |           ^~~~~~~~~~~~~~~~~~~~~~~~~

This commit fixes the build error by including the header file.

[1] https://lore.kernel.org/all/f75c58b17bfaa419f84286cd174e3a08f971b779.1648049113.git.andreyknvl@google.com/

Fixes: da4561bd9c6b ("arm64, scs: save scs_sp values per-cpu when switching stacks") of -mm
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 arch/arm64/kernel/irq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c
index 4199f900714a..9f7de9d5ee9b 100644
--- a/arch/arm64/kernel/irq.c
+++ b/arch/arm64/kernel/irq.c
@@ -20,6 +20,7 @@
 #include <linux/scs.h>
 #include <linux/seq_file.h>
 #include <linux/vmalloc.h>
+#include <asm/scs.h>
 #include <asm/daifflags.h>
 #include <asm/vmap_stack.h>
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH for-mm 3/3] arch/arm64: Set HAVE_SHADOW_STACKTRACE depends on SHADOW_CALL_STACK
  2022-03-31  8:49 [PATCH for-mm 0/3] Trivial fixes for build failures SeongJae Park
  2022-03-31  8:49 ` [PATCH for-mm 1/3] arch/arm64/Kconfig: Fix a typo SeongJae Park
  2022-03-31  8:49 ` [PATCH for-mm 2/3] arch/arm64/kernel/irq: Include missed header file SeongJae Park
@ 2022-03-31  8:49 ` SeongJae Park
  2 siblings, 0 replies; 4+ messages in thread
From: SeongJae Park @ 2022-03-31  8:49 UTC (permalink / raw)
  To: akpm; +Cc: andreyknvl, linux-mm, linux-kernel, SeongJae Park

The arm64 implementation of arch_stack_walk_shadow(), which is
introduced by commit 8cdc580c5ca2 ("arm64: implement
stack_trace_save_shadow") of -mm, uses task_scs(), which depends on
SHADOW_CALL_STACK, but arm64 Kconfig unconditionally sets
HAVE_SHADOW_STACKTRACE.  As a result, below build error happens when
SHADOW_CALL_STACK is unset.

    /linux/arch/arm64/kernel/stacktrace.c: In function 'arch_stack_walk_shadow':
    /linux/arch/arm64/kernel/stacktrace.c:289:13: error: implicit declaration of function 'task_scs'; did you mean 'task_lock'? [-Werror=implicit-function-declaration]
      289 |  scs_base = task_scs(current);
          |             ^~~~~~~~
          |             task_lock

This commit fixes the error by making HAVE_SHADOW_STACKTRACE depends on
SHADOW_CALL_STACK and impelmentation of arch_stack_walk_shadow() depends
on HAVE_SHADOW_STACKTRACE.

Fixes: 8cdc580c5ca2 ("arm64: implement stack_trace_save_shadow") of -mm
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 arch/arm64/Kconfig             | 2 +-
 arch/arm64/kernel/stacktrace.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index d9325dd95eba..67358860d51e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -201,7 +201,7 @@ config ARM64
 	select HAVE_FUNCTION_ARG_ACCESS_API
 	select MMU_GATHER_RCU_TABLE_FREE
 	select HAVE_RSEQ
-	select HAVE_SHADOW_STACKTRACE
+	select HAVE_SHADOW_STACKTRACE if CONFIG_SHADOW_CALL_STACK
 	select HAVE_STACKPROTECTOR
 	select HAVE_SYSCALL_TRACEPOINTS
 	select HAVE_KPROBES
diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
index 89daa710d91b..7e824aeb06f9 100644
--- a/arch/arm64/kernel/stacktrace.c
+++ b/arch/arm64/kernel/stacktrace.c
@@ -213,6 +213,8 @@ noinline notrace void arch_stack_walk(stack_trace_consume_fn consume_entry,
 	walk_stackframe(task, &frame, consume_entry, cookie);
 }
 
+#ifdef CONFIG_HAVE_SHADOW_STACKTRACE
+
 static const struct {
 	unsigned long ** __percpu saved;
 	unsigned long ** __percpu base;
@@ -293,3 +295,5 @@ noinline notrace int arch_stack_walk_shadow(unsigned long *store,
 	preempt_enable();
 	return len;
 }
+
+#endif /* CONFIG_HAVE_SHADOW_STACKTRACE */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-31  8:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31  8:49 [PATCH for-mm 0/3] Trivial fixes for build failures SeongJae Park
2022-03-31  8:49 ` [PATCH for-mm 1/3] arch/arm64/Kconfig: Fix a typo SeongJae Park
2022-03-31  8:49 ` [PATCH for-mm 2/3] arch/arm64/kernel/irq: Include missed header file SeongJae Park
2022-03-31  8:49 ` [PATCH for-mm 3/3] arch/arm64: Set HAVE_SHADOW_STACKTRACE depends on SHADOW_CALL_STACK SeongJae Park

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).