Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3028925rwb; Mon, 15 Aug 2022 16:27:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR7bsRE8XHAwA/Qdmaay8cqaAmNnkPs0rKzqG9Cv/7ruMA28IiQ4XMdOV0C1NIszkOfIr9BV X-Received: by 2002:a17:907:9726:b0:730:9e04:f738 with SMTP id jg38-20020a170907972600b007309e04f738mr11651648ejc.631.1660605966104; Mon, 15 Aug 2022 16:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605966; cv=none; d=google.com; s=arc-20160816; b=VhS68ZJCmTTT8GYa8MsNQQiM/Vc1F0rznb5EbwpXQGQ5PZLt3DNxLC4Y9cbnkjP07d QasfqLgCLXiIo7wzu+oZwDQAKB8wCE4qwL7pwr4czWhMlvl9A3ZWYN8J5Mc7ixR47q0t 6DWFT45W27A00uOK2K5pgjTWrfGSeTSwGM+POZN1jBD48GAQlIFaNOIHBtaDHPy1iMms 8DUvF/q9/0eW9vSyXIgnurt4VKzcBl6ukjWWdVuVQRMFeZBWfnanPTqEm7Kmu5Ggac77 A1Fus7aKM94y+ZH2ZXoVw4QEyjQN+edJ+7KpqKyaf/GoHxVWV9QmMF7zxX8pwCc7bxiK sE5Q== 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=W7wvieRDczqOhLgi82yboE7ci3W/qd596ntLHB1mPrI=; b=qEY82mu681K+mYL+BrHYR83ZM3FzRojL3PLrnKviEc86CcYQrNmx+KbTqgDQo1UPsV IJAujvIxnqPtnyqHczXg9n/VkPWoBq1siwQ/RHJDqMQiJ/vrigxBe2dVElCPCMrXsoQB JYfEh9ayI2efngkDvB1K1nIBGqMzGjc7tGrgZgYB58yjg+3jSSIzM4GxnKi7kx37JH+n tohIxLzcdLw7DsjcHrMO4SAh9d+qG8zJvDdQGgCmjL30Wkp4RNRcjJXvlpFwzGfP9Wh0 jvCL78aXTitAhBKL5opN4hZ1veYC5oh/OkAa2AJgMFB2qKJYj1Nic16K43SMYcSza2St ry0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b=ZdljFoIs; 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 dr17-20020a170907721100b00731646a574esi8912587ejc.839.2022.08.15.16.25.40; Mon, 15 Aug 2022 16:26:06 -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=ZdljFoIs; 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 S242988AbiHOXFL (ORCPT + 99 others); Mon, 15 Aug 2022 19:05:11 -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-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 0ee39cdcfcac..91642a4e69be 100644 --- a/init/main.c +++ b/init/main.c @@ -99,6 +99,7 @@ #include #include #include +#include #include #include -- 2.35.1