From nobody Sat Feb 7 16:24:02 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0355DC00140 for ; Mon, 15 Aug 2022 23:05:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243855AbiHOXFM (ORCPT ); Mon, 15 Aug 2022 19:05:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352469AbiHOXDE (ORCPT ); Mon, 15 Aug 2022 19:03:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC99D8606F; Mon, 15 Aug 2022 12:58:21 -0700 (PDT) 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 70EFCB81154; Mon, 15 Aug 2022 19:58:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6369C433C1; Mon, 15 Aug 2022 19:58:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593499; bh=geNftA5eZVmPTFeqJgby+ENz25ytyj+I5h5a3CstBus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZdljFoIs9xWYWbzr5kHCOFuYZv0Zb+RNI7eAbdEiUK00zHw7yFnzdatItRoJMu590 4n5lkSBWEeB3AH3rQlG9+BeMap85QhroYy0oh4mWyvEE5lz76An9vXrPHqKldcMSK4 4YgVovDMKGteL8qNtUXD1E4O3XkQldmy/0E1iI1M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Xiu Jianfeng , "GONG, Ruiqi" , Kees Cook , Sasha Levin , GONG@vger.kernel.org Subject: [PATCH 5.19 0248/1157] stack: Declare {randomize_,}kstack_offset to fix Sparse warnings Date: Mon, 15 Aug 2022 19:53:24 +0200 Message-Id: <20220815180449.510854671@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: GONG, Ruiqi [ Upstream commit 375561bd6195a31bf4c109732bd538cb97a941f4 ] Fix the following Sparse warnings that got noticed when the PPC-dev patchwork was checking another patch (see the link below): init/main.c:862:1: warning: symbol 'randomize_kstack_offset' was not declar= ed. Should it be static? init/main.c:864:1: warning: symbol 'kstack_offset' was not declared. Should= it be static? Which in fact are triggered on all architectures that have HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET support (for instances x86, arm64 etc). Link: https://lore.kernel.org/lkml/e7b0d68b-914d-7283-827c-101988923929@hua= wei.com/T/#m49b2d4490121445ce4bf7653500aba59eefcb67f Cc: Christophe Leroy Cc: Xiu Jianfeng Signed-off-by: GONG, Ruiqi Reviewed-by: Christophe Leroy Fixes: 39218ff4c625 ("stack: Optionally randomize kernel stack offset each = syscall") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220629060423.2515693-1-gongruiqi1@huawei.= com Signed-off-by: Sasha Levin --- init/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/init/main.c b/init/main.c index 0ee39cdcfcac..91642a4e69be 100644 --- a/init/main.c +++ b/init/main.c @@ -99,6 +99,7 @@ #include #include #include +#include #include =20 #include --=20 2.35.1