Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1731877rwi; Thu, 3 Nov 2022 08:29:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NUorRgTsNCx84UHYxAsS0/9Wc2WuO33s8o6aMqtMnZI7iaXAfJlc3NUFzRk7/zAilL07z X-Received: by 2002:a17:907:97ca:b0:791:644c:491e with SMTP id js10-20020a17090797ca00b00791644c491emr29482215ejc.555.1667489342808; Thu, 03 Nov 2022 08:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667489342; cv=none; d=google.com; s=arc-20160816; b=ikf7duo9arAinYUuM/P/jUf1Q6NTC5JgMpwKFe2DqpME4/Q7NT5YyPlRzc8SKNSbmR Qk3pIdPrroFd1XEk9IDzydtFIY3ybo7hui/EADSE9hWymobCwoxOPsDPaO4mioWsCua+ AEDNK2STWSkRlb9GCGabxLqaEoGsdTf+Rh5dC7ZZy90idk/n/0m32NvlIyeC3SqfZz87 QtZmXRovlOONEv0rZbi3fPcLmc20ume4mVa1UpcouVDM3rS2Y4KP1zRlbeUakEpvgoZt 3tgeI2ktRgTpBc0dU6qbHV0jtu8yfEtUaK6Jr2WHpxMdqkv5bJ5aoS7tdv59YFulqgRh 3ZdQ== 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 :message-id:date:subject:cc:to:from; bh=5OCJ/Vz1ywptO4t5UzbUakHxue5584YJ41H1cxSQ9lY=; b=MsjLsc9A/YKic3JZ56MaeX+wvo6fhfpnvqJcBM8678xNUh+dPc9ZUeW2xjoJnwq2ZC bu681H/JnsD6Xhqqegtoj3i193Kxcdox2pWerPstI2HTrNknN2TGR/LMFzHrZHCgGHWw dxm7hWsHCP1PzNcJaAds/ZhQx67KShueg+JvVxK5mrkmlgYjbiDW3pJ+h4KWolH6h+yO 7CXY1IQYPaoS+hDdhWDQCzptNsgilF1GMOs6yonZ3HXZwdpNFWqTOKsUhtuS/35Gwo4y JGImeI6qdeXpHvMjEq3z21fuR+NGMFPqhM9SpJKkQCUbggiTqnVigcebiY54rj95v5O7 Im/Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq6-20020a056402220600b004573c1ae3fasi1348725edb.285.2022.11.03.08.28.31; Thu, 03 Nov 2022 08:29:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232136AbiKCPLM (ORCPT + 97 others); Thu, 3 Nov 2022 11:11:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231866AbiKCPKk (ORCPT ); Thu, 3 Nov 2022 11:10:40 -0400 X-Greylist: delayed 378 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Nov 2022 08:09:48 PDT Received: from mx-rz-1.rrze.uni-erlangen.de (mx-rz-1.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00E6310FC5; Thu, 3 Nov 2022 08:09:48 -0700 (PDT) Received: from mx-rz-smart.rrze.uni-erlangen.de (mx-rz-smart.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::1e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mx-rz-1.rrze.uni-erlangen.de (Postfix) with ESMTPS id 4N36TC5rTFz8svY; Thu, 3 Nov 2022 16:03:27 +0100 (CET) Authentication-Results: mx-rz-1.rrze.uni-erlangen.de; dkim=none; dkim-atps=neutral X-Virus-Scanned: amavisd-new at boeck5.rrze.uni-erlangen.de (RRZE) X-RRZE-Flag: Not-Spam X-RRZE-Submit-IP: 10.188.34.179 Received: from uni-erlangen.de (i4laptop28.informatik.uni-erlangen.de [10.188.34.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: U2FsdGVkX18CxjfIGbKY7LqpaFakzBHDNDrAmmghoCk=) by smtp-auth.uni-erlangen.de (Postfix) with ESMTPSA id 4N36T92D2Lz8sgp; Thu, 3 Nov 2022 16:03:25 +0100 (CET) From: Jonas Rabenstein To: Jiri Olsa Cc: Jonas Rabenstein , Song Liu , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Steven Rostedt , Masami Hiramatsu , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] bpf: mark get_entry_ip as __maybe_unused Date: Thu, 3 Nov 2022 16:03:03 +0100 Message-Id: <20221103150303.974028-1-rabenstein@cs.fau.de> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_NONE 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 Commit c09eb2e578eb1668bbc ("bpf: Adjust kprobe_multi entry_ip for CONFIG_X86_KERNEL_IBT") introduced the get_entry_ip() function. Depending on CONFIG_X86_KERNEL_IBT it is a static function or only a macro definition. The only user of this symbol so far is in kprobe_multi_link_handler() if CONFIG_FPROBE is enabled. If CONFIG_FROBE is not set, the symbol is not used and - depending on CONFIG_X86_KERNEL_IBT - a warning for get_entry_ip() is emitted. To solve this, the function should be marked as __maybe_unused. Signed-off-by: Jonas Rabenstein --- kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index f2d8d070d024..19131aae0bc3 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -1032,7 +1032,7 @@ static const struct bpf_func_proto bpf_get_func_ip_proto_tracing = { }; #ifdef CONFIG_X86_KERNEL_IBT -static unsigned long get_entry_ip(unsigned long fentry_ip) +static unsigned long __maybe_unused get_entry_ip(unsigned long fentry_ip) { u32 instr; -- 2.37.4