Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2815651rwb; Mon, 15 Aug 2022 11:55:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR4avq5Cs8tFd/pSC/zhbCE4ce6X2mwoUCy3Hx/jT9fmg4prPenVAT05PRM6zyZhxcyA/8ZJ X-Received: by 2002:aa7:d653:0:b0:43d:151b:5939 with SMTP id v19-20020aa7d653000000b0043d151b5939mr15561030edr.278.1660589735670; Mon, 15 Aug 2022 11:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589735; cv=none; d=google.com; s=arc-20160816; b=Fu9hhIerxOoYfhR2JNYYmIZ5AKTxuX9WYbc/yI/qgnVJbCio34rp82L/fmV1MSG7jZ VLtk/FgABgw8uWNOW9b4oIV/hqvih+k2YuU/q1kRWjbslytR83L2Z0sih9pEthtq8wwH 5Za4b1dlF3vvURFW3eJ+PFVxzDZY+GhNb89J5tQrwfv13rLm7bRAURN7MV4rhnQ1gma2 tOgAGkOQpObwkoo1ECMBczD5tT4A5O4KSmDpjNRj+YTpp3DJM61419JooHZvuzZjRkM2 gRpqotG5srGVuGQfKDj4KOIgOE8wfgzjAnbY7XtvXGsYTBcfZBCqrHjgPTYIpEzFjOkK RR9w== 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=Qh4ivi3k6pgdOXxANX2q6slySLuGfVPbl/h1hlU0uzw=; b=OdvMA1QMUm5hmQgGEuZByzLyu3pSy6usvmBfNNj9538vUe6C3foZqKpPdK8nrVLcH9 FRfRTZTvRZLIbBgTX0ueUn/9/gHGqDWkzrImPbxbCdeEwDR0UKhUCsCJ64z9JeUC6jzS 7R7Tgd5ClwTCwx9AwxDZeqshisfvKtwgX8iLPGkvZFMvgrV5c0zC5kRM/RJbsA/ElSvZ 5aBNvp9V5UscYqGDIMijqgOy7/XvSXUPygIfvlyj885sKfhEaUL80aIHUP2vlprQr+u5 2+KSWMzTQc2jlw52R3+Jsgr7958wPM7qh3crp1PYgtDIPf7HD7SM6nZ4/NGYNop6LN73 RQHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b=d6p55P+y; 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 s26-20020a056402037a00b0043de10b9d72si7867361edw.315.2022.08.15.11.55.06; Mon, 15 Aug 2022 11:55:35 -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=d6p55P+y; 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 S243336AbiHOSnq (ORCPT + 99 others); Mon, 15 Aug 2022 14:43:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243548AbiHOSlP (ORCPT ); Mon, 15 Aug 2022 14:41:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD54B20F; Mon, 15 Aug 2022 11:24:46 -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 9542FB81082; Mon, 15 Aug 2022 18:24:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6209C433D6; Mon, 15 Aug 2022 18:24:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587884; bh=8e8cLGBEfOgW7SXzthoRIC0+pNV2OH/E5k8Ju7+lsF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d6p55P+yZKrFjxjb2YmLEUgzIBuHqYqwy0oVSw3Rr502bCfl4SJy4hh6l1A5DlBHR reo38AOTE/vVVBLyQfByrdMrT83Noj1WAdIfDQQP3QWD0bCwljvG1nynHCqFsRWBvN ShQIQmNZlxmoKSrAwk0X7c+j1qb+oYKmwHybNfe8= 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.15 194/779] stack: Declare {randomize_,}kstack_offset to fix Sparse warnings Date: Mon, 15 Aug 2022 19:57:18 +0200 Message-Id: <20220815180345.564511077@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 cf79b5a766cb..649d9e4201a8 100644 --- a/init/main.c +++ b/init/main.c @@ -100,6 +100,7 @@ #include #include #include +#include #include #include -- 2.35.1