From patchwork Fri Jun 9 09:18:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 105477 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp820606vqr; Fri, 9 Jun 2023 02:33:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wIY1fzRfcpflC8Bo+MAHYrnCCLiegTwzJHHXqGBxi6cVtnqzU/K1+NWuq6WcLUAERRsWF X-Received: by 2002:a17:902:ce8a:b0:1ae:305f:e949 with SMTP id f10-20020a170902ce8a00b001ae305fe949mr522337plg.6.1686303189218; Fri, 09 Jun 2023 02:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686303189; cv=none; d=google.com; s=arc-20160816; b=p9zut/ebO2Kk6Cv81XDei7JdJCFF5mDxnH6D45coDqApZmhPlf1CKE1Sq0nciXIMWS 7IzC7uS2rhYhTXqbDIY4rzAt9FyaZ29FslfCuRsI2UI8Q+tz8ArocEFd/sTfAo5dmoKr FzH/RpD6e16vwk5mwWFEKrDS2cZOvusT1IOdSADZ4IYoRNY26EhwwXGqHD9Aa1bRs+ol ZM3yh0k15lc0MSVmov15p3CdknjtBvwV7EodvgrmZZ4Y2gpo5Pfcj3dm8s5u6v1HvWeZ kRZwWg7RgxsD7mNogQ0ZpapZrZ+9Ex/1W8nPWcRu1Jf9C1rr9eJpJXy7sQlmtmXhRWud GQUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=xZRhkDtTSeZgnqu7N8XwI7ct33rW0W+QqL6s4Ga2BxU=; b=e8Rpy5nuQRbxJpymcJ1PcpZW90OkJcK86U4sC9nBPbfbodVijpgNbojBwu2421sFup p3NIABQaIK+5Ccib+EQyORDj1fJH9vmz57SVEGVG5tigWe491zVKVBVIir0gVnrZLFyS u+l8MCBNZa96in8MinjPC8wqAX/kK8VS0LHDy4AwgD1HBeO/820z2DLLcVA6Ev7LcY2d EtBfej0ytDl8TkVySCpUpBLixTaz909y2z0z4Kpaya8QOcNpf3goj5lISScVYa0VzLXg kMAvb49p+th8swJDGeJlSu5fepX30QmY2cJRDqLc2yb79KhShRc1VMu4We0t1Lm1Gr8l IN7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d53OvKO4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=WSnfe8lI; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a170902c79400b001b23b699747si2417279pla.10.2023.06.09.02.32.56; Fri, 09 Jun 2023 02:33:09 -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=@linutronix.de header.s=2020 header.b=d53OvKO4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=WSnfe8lI; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240015AbjFIJZm (ORCPT + 99 others); Fri, 9 Jun 2023 05:25:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241555AbjFIJYq (ORCPT ); Fri, 9 Jun 2023 05:24:46 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 906DA7287; Fri, 9 Jun 2023 02:18:53 -0700 (PDT) Date: Fri, 09 Jun 2023 09:18:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686302294; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xZRhkDtTSeZgnqu7N8XwI7ct33rW0W+QqL6s4Ga2BxU=; b=d53OvKO4aVNs1Bv7j7EpoJmcL1pqH5I3Y8S+hc9ma/xNXtUskgj88c2txhxkJXQ6YMppXv UnUjVscJ8M/KOPkCjnXkg60XWrY+Vi1qDZzG6LekBTeY7VtLNFx3ZyFeq31c7t9zgo+cce Z7YS3RjMHcaHtJeIsFOn0HvlBgHNXFOR6/o8DDQbRN+hPhUYb75iGP4tqRXKZ6UFoIdoUJ QQBg6UFKloTImGWC/GXepogCoCN9NCQDApp+ueSeGjO2NiC9GkoxXTXLAdklzE4Leo6dKU g/2q5V00y6Y2r1X19fdc4c1CwVozNWxvhIKRvEA9mOTSEyoyFeo4QKmjfHsYmg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686302294; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xZRhkDtTSeZgnqu7N8XwI7ct33rW0W+QqL6s4Ga2BxU=; b=WSnfe8lI18zPdZWsVuC24ZigkrV4oE2SgHYb0pf2q44d567uGc+e1lofwhPCneBlngV323 +Zjnm+V4Kzaq/2Dw== From: "tip-bot2 for Ingo Molnar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y Cc: Ingo Molnar , Josh Poimboeuf , linux-kernel@vger.kernel.org, Peter Zijlstra , x86@kernel.org MIME-Version: 1.0 Message-ID: <168630229338.404.8674192988459787200.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768216916065161994?= X-GMAIL-MSGID: =?utf-8?q?1768217052996892957?= The following commit has been merged into the objtool/core branch of tip: Commit-ID: 301cf77e21317b3465c5e2bb0188df24bbf1c2e2 Gitweb: https://git.kernel.org/tip/301cf77e21317b3465c5e2bb0188df24bbf1c2e2 Author: Ingo Molnar AuthorDate: Fri, 09 Jun 2023 11:04:53 +02:00 Committer: Ingo Molnar CommitterDate: Fri, 09 Jun 2023 11:09:04 +02:00 x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y Recent commit: 020126239b8f Revert "x86/orc: Make it callthunk aware" Made the only user of is_callthunk() depend on CONFIG_BPF_JIT=y, while the definition of the helper function is unconditional. Move is_callthunk() inside the #ifdef block. Addresses this build failure: arch/x86/kernel/callthunks.c:296:13: error: ‘is_callthunk’ defined but not used [-Werror=unused-function] Signed-off-by: Ingo Molnar Cc: Josh Poimboeuf Cc: linux-kernel@vger.kernel.org Cc: Peter Zijlstra --- arch/x86/kernel/callthunks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/callthunks.c b/arch/x86/kernel/callthunks.c index 8e0a9b6..fcb8eea 100644 --- a/arch/x86/kernel/callthunks.c +++ b/arch/x86/kernel/callthunks.c @@ -293,6 +293,7 @@ void *callthunks_translate_call_dest(void *dest) return target ? : dest; } +#ifdef CONFIG_BPF_JIT static bool is_callthunk(void *addr) { unsigned int tmpl_size = SKL_TMPL_SIZE; @@ -306,7 +307,6 @@ static bool is_callthunk(void *addr) return !bcmp((void *)(dest - tmpl_size), tmpl, tmpl_size); } -#ifdef CONFIG_BPF_JIT int x86_call_depth_emit_accounting(u8 **pprog, void *func) { unsigned int tmpl_size = SKL_TMPL_SIZE;