Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3027283rwb; Mon, 15 Aug 2022 16:25:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ObABo4tI7yd1TSlfMO7x8xiVGVkA76Dgph2cZ5WBQJ/iYC8SRSRfKSNSY00SXjptbNPRE X-Received: by 2002:a05:6402:2079:b0:43d:a218:9b8a with SMTP id bd25-20020a056402207900b0043da2189b8amr16138773edb.357.1660605843212; Mon, 15 Aug 2022 16:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605843; cv=none; d=google.com; s=arc-20160816; b=ZtNXCkZp8BC6O6/Y+dpxBGChqgfZz1JelDi42sEkV/IHmM6Ea9pQDQvFAIvft2FWPP Z7IYV0JuUyf9mazhmB053j8mjQaqUJ1CB/MQJbfYUT5QI5rgkmOcqNbF3qTn4bApwPsA ToGkTMCuK2dHOgUx2r2x0ALllAujSunSnuW8Ta1EGefRpPjH5obzu7acI52R7is4Jj+W bmF33qfl+6cKeVffdcTmpdQa+M0lKdHRFUJ2nn5XjSJssqAGCMBO9XDMFuWK0yX5MLD7 LPOxo2vK9rXsSVumQvWUIR54kAXUx36uZ54Xowsp+ZEiflqNW9GwmdtCdq7ScuW7edmM qwTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qQAAIWnv+w7cMX/3/OPw6uDo0Ysq5nWwiHNb0wmpBVY=; b=ha1B4Nr0LhGh1uUNK+nYgtd68D/anK3xZHfX9xiQM6kLA9C0m4kdqg55aqiq9skoby ukPxzTF3SLUWXzQQjLuFfUHK0nr7auzKzcgEI2feLZIO3ECIdwt1FPQb3N2GuYFb6vZu YMhEB1srp+i6pQAvcQzFucNgxih/KdIMMSxFz+tM8Xt2C8FiOl/nLT7l+XXvW0Z1R08F ertMfT+gov5ZA/HnY9nkTUS5pM21PG3w+yOF+kZHfpeNASVw0QgA6JiEP/sYXrMlNqgy JeDgfH7Wf97gBSuAniUAwmbY+7WsTtmcevu6zCTb+O4YedNCXNMfVlF41y87r6Rf8fAw Cu+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b=N7oagBSN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd6-20020a170906ce2600b0072f0356abc7si7003823ejb.109.2022.08.15.16.23.38; Mon, 15 Aug 2022 16:24:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b=N7oagBSN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346568AbiHOUlr (ORCPT + 99 others); Mon, 15 Aug 2022 16:41:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346260AbiHOUf6 (ORCPT ); Mon, 15 Aug 2022 16:35:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C6E92CDFB; Mon, 15 Aug 2022 12:06:51 -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 53279B81062; Mon, 15 Aug 2022 19:06:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAC3AC433C1; Mon, 15 Aug 2022 19:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590409; bh=qvJ6CSHoffT99ctcnfN/FArQviAOFzwCtP0KVNA+j7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N7oagBSN/PpNyd9afCF2YHOJPIL4W7J6AwnOnQ1woFUDeD6E6ginSPHbPN5AlRolU qkOSPER4ElD1EEEXhkUBPTFgZ9tjc2BJNl1/gPJaWjTioK9BdyS7omMrZLm+aCqXiB Q8ohkhH20ea1xKxARmtJ7GwzDbbQ99QS4YcPbO24= 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.18 0250/1095] stack: Declare {randomize_,}kstack_offset to fix Sparse warnings Date: Mon, 15 Aug 2022 19:54:09 +0200 Message-Id: <20220815180440.093887422@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 declared. 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@huawei.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 80bd217dd35e..1e866b31bf19 100644 --- a/init/main.c +++ b/init/main.c @@ -99,6 +99,7 @@ #include #include #include +#include #include #include -- 2.35.1