From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79FA6BA45 for ; Tue, 7 Mar 2023 17:56:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E62D8C4339C; Tue, 7 Mar 2023 17:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678211763; bh=f8D20QC3CJzX/ndMRx1yYHKDtzyAqslqUxzqFV+byVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WZ2ga/11E+bYHWk20zYhG/c3ZTFYbCM7r3nqu82qk8d4ulSB6OE0OVU51VnCBAb95 HMeC8TSgL+PT71tnnzOFxPaLI+SyDBljGnhhwXBxW9DVBC4KgHGpkXlheS6Erwl0DA CWpNP2g9CY8Ls4Rv5LXHX7GWIn5mtOMvy3qiliN8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Conor Dooley , Guo Ren , Palmer Dabbelt Subject: [PATCH 6.2 0969/1001] RISC-V: add a spin_shadow_stack declaration Date: Tue, 7 Mar 2023 18:02:21 +0100 Message-Id: <20230307170104.265482008@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170022.094103862@linuxfoundation.org> References: <20230307170022.094103862@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Conor Dooley commit eb9be8310c58c166f9fae3b71c0ad9d6741b4897 upstream. The patchwork automation reported a sparse complaint that spin_shadow_stack was not declared and should be static: ../arch/riscv/kernel/traps.c:335:15: warning: symbol 'spin_shadow_stack' was not declared. Should it be static? However, this is used in entry.S and therefore shouldn't be static. The same applies to the shadow_stack that this pseudo spinlock is trying to protect, so do like its charge and add a declaration to thread_info.h Signed-off-by: Conor Dooley Fixes: 7e1864332fbc ("riscv: fix race when vmap stack overflow") Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20230210185945.915806-1-conor@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/include/asm/thread_info.h | 1 + 1 file changed, 1 insertion(+) --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -43,6 +43,7 @@ #ifndef __ASSEMBLY__ extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)]; +extern unsigned long spin_shadow_stack; #include #include