Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1185178rwl; Thu, 10 Aug 2023 07:38:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHocxiWGzSFXqrAu1BfWb2wMt9GBb/sUIopApW903L/neAjGVNcssih3RFcdCArsR7bk7rs X-Received: by 2002:a05:6808:2813:b0:3a7:48eb:2de2 with SMTP id et19-20020a056808281300b003a748eb2de2mr2904895oib.26.1691678294264; Thu, 10 Aug 2023 07:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691678294; cv=none; d=google.com; s=arc-20160816; b=GAD/p6GuEenkoyr2uWHb7Gew2h8PufFQJ1fS3iMeIV8NvgMeAC+AaftMfojyA2V4MW EFgivvJkemSec1SrPbQ6PCKAwq8hTmkDtfdx7YvFrmg/k0OktdVgpPVwl8Pc2OWZTrvb snWlNQyWDaezW+cruZKZ84fpujZ5IQCOB8sk7viOVYKBWzChGwuY6i219DUq+TivSToH b7FNcHOVuPAUDrNz1/KsCMKip/UO2rvfkr+m+7Z9oGkRgaQfXQEo1yrtNUwWuhkwC8Ca BNOI98xATa4sZu3jQJemCQ5K0vfvMSLN9XpzNjdfZ/vgePOVrOlkZYsrD28wyDpmY7OM TWVg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KxdHOTdT1/eljJNHW9vo6qtH4/zu13XdyU6zNAXOQcw=; fh=+3VTWFv8pSUWuD9YAk5Mst/ry1irmxxF+euHNfYDYzQ=; b=lYmHwJCcWE82ylDnEeJtSBFrVU37f26t8CijUh6yS8hxDWahGxykoWEqueiQAVXrwM x1vm4XJCZsGot5I7aeW+4J8R0sM9tRkoJfJZIxLRB0UR/O1M8VQX1ndRWTQjIGgRt4Pa iGqzehLZj7MBdcMLttNf3GCgb7B9OjRFRkDvgOV81rWKSS7SF+jj4wSVggWrO/E/CJXX fdM1jmNCFjKzx6hKn1Pa+dWbdY9u7Rpc9/LtQ9B5M5uyRA5OUJ7q6MiVslO9ys6KEH4c biS/a2jhcGgW6RkL+7Qzc+sCIeffTO5PE1amWFMI74zKvLILyDi5NJqahkiLpgHNGZaA 9GwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lpwr67WU; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x185-20020a6363c2000000b0055baeced15esi1693627pgb.549.2023.08.10.07.38.00; Thu, 10 Aug 2023 07:38:14 -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=pass header.i=@kernel.org header.s=k20201202 header.b=lpwr67WU; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234806AbjHJOXR (ORCPT + 99 others); Thu, 10 Aug 2023 10:23:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235688AbjHJOXD (ORCPT ); Thu, 10 Aug 2023 10:23:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 870FA2D53 for ; Thu, 10 Aug 2023 07:22:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 193FD65D97 for ; Thu, 10 Aug 2023 14:22:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BDD1C433C7; Thu, 10 Aug 2023 14:22:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691677367; bh=zm5Sn5aoo9lAExPG70q1GTsvtFdGFc5JFFuqji9a/WA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lpwr67WUt7XboGgjE35Yb5FuHHFbF8xfLwLRJScg6qXS5JQ1q+sp/Qdg735a63N9J hxm+hKPwITcQNHf2MfB12vwl7iWjn4aZgEZNbdHiV3GdADE4WOnRt7wbMSmB64hUWN YzVh7ZKXwjSnRD7KvnBPrzZWR7X3cl8eR32J5s0xZHGgqKzrWlL8Krg7jkbH8TVNR3 /Lc5uZS4BYzT9k8ZXtWqEWgAY+nZnJw8pyEr81X+tWJPPz8wQ2Sg5XADc4q+FKq1s4 4C7tpCe8q0aepKRZcNRkGm4dSodtw0kIhoSLE6ogUAqtganVElKZMjblH2vKC8m6va cCuCOK777NwCg== From: Arnd Bergmann To: Andrew Morton , linux-kernel@vger.kernel.org Cc: Arnd Bergmann Subject: [PATCH 13/17] stackleak: add declarations for global functions Date: Thu, 10 Aug 2023 16:19:31 +0200 Message-Id: <20230810141947.1236730-14-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810141947.1236730-1-arnd@kernel.org> References: <20230810141947.1236730-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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: Arnd Bergmann With -Wmissing-prototypes enabled, the stackleak code produces a couple of warnings that have no declarations because they are only called from assembler: stackleak.c:127:25: error: no previous prototype for 'stackleak_erase' [-Werror=missing-prototypes] stackleak.c:139:25: error: no previous prototype for 'stackleak_erase_on_task_stack' [-Werror=missing-prototypes] stackleak.c:151:25: error: no previous prototype for 'stackleak_erase_off_task_stack' [-Werror=missing-prototypes] stackleak.c:159:49: error: no previous prototype for 'stackleak_track_stack' [-Werror=missing-prototypes] Add declarations to the stackleak header to shut up the warnings. Signed-off-by: Arnd Bergmann --- include/linux/stackleak.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/stackleak.h b/include/linux/stackleak.h index c36e7a3b45e7e..3be2cb564710b 100644 --- a/include/linux/stackleak.h +++ b/include/linux/stackleak.h @@ -14,6 +14,7 @@ #ifdef CONFIG_GCC_PLUGIN_STACKLEAK #include +#include /* * The lowest address on tsk's stack which we can plausibly erase. @@ -76,6 +77,11 @@ static inline void stackleak_task_init(struct task_struct *t) # endif } +asmlinkage void noinstr stackleak_erase(void); +asmlinkage void noinstr stackleak_erase_on_task_stack(void); +asmlinkage void noinstr stackleak_erase_off_task_stack(void); +void __no_caller_saved_registers noinstr stackleak_track_stack(void); + #else /* !CONFIG_GCC_PLUGIN_STACKLEAK */ static inline void stackleak_task_init(struct task_struct *t) { } #endif -- 2.39.2