From patchwork Thu Mar 31 08:49:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12796903 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7972CC433F5 for ; Thu, 31 Mar 2022 08:49:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE5B46B0073; Thu, 31 Mar 2022 04:49:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D94EE8D0001; Thu, 31 Mar 2022 04:49:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C39216B0075; Thu, 31 Mar 2022 04:49:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id AC7566B0073 for ; Thu, 31 Mar 2022 04:49:56 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 73779A324D for ; Thu, 31 Mar 2022 08:49:56 +0000 (UTC) X-FDA: 79304058792.22.F747DD0 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf24.hostedemail.com (Postfix) with ESMTP id 063A5180006 for ; Thu, 31 Mar 2022 08:49:55 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C98F3B82011; Thu, 31 Mar 2022 08:49:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2635BC340EE; Thu, 31 Mar 2022 08:49:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648716593; bh=Go6bo2O/o5mG79CQFHS7po2/ozyrPmkNdOWGq8t4XBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=camqJMKk2RLO8LNiWsFkfH/vm8rVMiFD6jA41IigOQw6kTTMtiiyaOTv9Ho4zkJHM 8dV1xUJTelWjQYzVReVbw7T4LSDCgZOAgtMeR7zDWkTBAmCDkHjflXu0s/quWnA8Hl GUvdxrXwf18OobcetEIX9fTOPcc2vcqfJbOF7PRdFWhwG3xaVB9LTvFtq6iIYcuc5x FyprBE/L3s2A3+O/nsrMqU9iir1f/mndgRSNIBEeL2dyLjmzDf7PSqO7zHJZHpDutY hAWwkFW2bhmh9Tosr2ehXJou+vSxe7yr+obn6qXem2jrDK9yI0TCmUVDqpg6tf6/L1 Gnhb+gJAtk6fw== From: SeongJae Park To: akpm@linux-foundation.org Cc: andreyknvl@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH for-mm 1/3] arch/arm64/Kconfig: Fix a typo Date: Thu, 31 Mar 2022 08:49:37 +0000 Message-Id: <20220331084939.26749-2-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220331084939.26749-1-sj@kernel.org> References: <20220331084939.26749-1-sj@kernel.org> X-Stat-Signature: t7n7stcicg5wmmkf3m4yhg44wbfxmsa4 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=camqJMKk; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 063A5180006 X-HE-Tag: 1648716595-652918 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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 From patchwork Thu Mar 31 08:49:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12796904 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D799C433FE for ; Thu, 31 Mar 2022 08:49:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 61EBE8D0001; Thu, 31 Mar 2022 04:49:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A9256B0075; Thu, 31 Mar 2022 04:49:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AB9E8D0001; Thu, 31 Mar 2022 04:49:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 2D73C6B0074 for ; Thu, 31 Mar 2022 04:49:57 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id DD494182A6241 for ; Thu, 31 Mar 2022 08:49:56 +0000 (UTC) X-FDA: 79304058792.26.9F9C671 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id 6854018000C for ; Thu, 31 Mar 2022 08:49:56 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 82C3561983; Thu, 31 Mar 2022 08:49:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61C72C340F3; Thu, 31 Mar 2022 08:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648716594; bh=mhNQddazJ57El0uDfD+vnjahyTMel63pDkcF/sZlYJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lUKrG6KbH+d6+/fi/GJcPOEQ04Us+14PmaAuJ1LOSr/dR/AX2stY96oA5srZE7fjC M/2JDAssLyDltKcpn+PoFYajJz9u1p6h3ttCjJfTEnkfr6qIojs7SIE0yzY9KVzcB0 s6cGHyKL80oBdtysj05KGEPVUOjOVAWes8uq5W6ldByvKKBFCZgFwzh4ewPp+ztoqu YAfX9on6rUCX1Bmy77iQb1HjToi3XrzCcxQPnyzcxTIJ3dMZSbRRJUnIS83nYcUSd3 U5vSD29IRUPUHDeNC6N/EW4Y9kN6BAtxhsXH+jy6gHaL62RoVqzVERkeH2G993Vrly 8rz5OQePku/nQ== From: SeongJae Park To: akpm@linux-foundation.org Cc: andreyknvl@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH for-mm 2/3] arch/arm64/kernel/irq: Include missed header file Date: Thu, 31 Mar 2022 08:49:38 +0000 Message-Id: <20220331084939.26749-3-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220331084939.26749-1-sj@kernel.org> References: <20220331084939.26749-1-sj@kernel.org> X-Stat-Signature: 84e9eu1dwztpexi8hf14c5177dq9763j Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=lUKrG6Kb; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 6854018000C X-HE-Tag: 1648716596-736035 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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 #include #include +#include #include #include From patchwork Thu Mar 31 08:49:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12796905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0518DC433EF for ; Thu, 31 Mar 2022 08:50:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2EA5D8D0002; Thu, 31 Mar 2022 04:49:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 299C56B0075; Thu, 31 Mar 2022 04:49:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 111D68D0002; Thu, 31 Mar 2022 04:49:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id E5CF46B0074 for ; Thu, 31 Mar 2022 04:49:57 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8A1FA182A6241 for ; Thu, 31 Mar 2022 08:49:57 +0000 (UTC) X-FDA: 79304058834.19.3E559CF Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf31.hostedemail.com (Postfix) with ESMTP id 3D7B020003 for ; Thu, 31 Mar 2022 08:49:57 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9475D61977; Thu, 31 Mar 2022 08:49:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04D44C340EE; Thu, 31 Mar 2022 08:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648716596; bh=6vdyoQjwpV7r2hRyShWcXBmnOHhJS2KSz+S81lCGn9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n5ZEKmp+Kl6F25RLj7q/Qjv0H9abT1GhXMlE3HCH6mF2K1fgavpYhFRaBmeWbtbQT 58s+As1jBgTvUv1F1dIel+wRQiN/cwhNuwIbPzZP/8FV1m6KnCcAuY+zCfrEFZCNIj 8tQGMoO/zICfzRp8/jFblej2GFz1xemAZQfUy774GydEIiWfvIx+2JyJlJTUJk0iCj KiymVkyBbZcb9IkLeKU+ReBCOp1tL9raMJGtOcMQWlJSv/EQZmYBBoDsMNK7XQLfte BgXQwoyhVTiKFPxNGBBVBt69QtVxYy3jMv1sKniOLJ6OzRvUSWUKG1xwe14ClrxTaj pqss+DFFy3IUg== From: SeongJae Park To: akpm@linux-foundation.org Cc: andreyknvl@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH for-mm 3/3] arch/arm64: Set HAVE_SHADOW_STACKTRACE depends on SHADOW_CALL_STACK Date: Thu, 31 Mar 2022 08:49:39 +0000 Message-Id: <20220331084939.26749-4-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220331084939.26749-1-sj@kernel.org> References: <20220331084939.26749-1-sj@kernel.org> X-Stat-Signature: th4319owzyr6b9qx1y4n3n6p1w1rdkyq Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=n5ZEKmp+; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf31.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 3D7B020003 X-HE-Tag: 1648716597-977764 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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 */