From patchwork Fri Jun 9 09:10:24 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: 105471 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp819660vqr; Fri, 9 Jun 2023 02:30:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67xVuJg6DtPvtBWh/cUZjElb83KSQXxM/ywoRHu7dIHuyxodCoUh/ZKKIO2lU2evFEBNUD X-Received: by 2002:a17:902:f542:b0:1b2:4844:e556 with SMTP id h2-20020a170902f54200b001b24844e556mr538000plf.31.1686303058515; Fri, 09 Jun 2023 02:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686303058; cv=none; d=google.com; s=arc-20160816; b=zb/wv6ZmHD88SQ5fWMfutv+GnIpUlwTq68BmD/fdmGoVv9spkrO7Xxl08hM5q5yYAM KW9t83QS+738K6CAIoX767EE0AbNFbF7sR/Nq/owhwrtxAimbdRvRpsYcOVUF5am5sd6 hi7dvWycFT4H10/CMWWK63k9BF2bGvIdjBTsFJdJH24l9h6X+gl3ILjHSo4/vDeN4Fwk O2zGSd58+hlrqbshDBgaRJVfboDWF5dXZrly5pYy/j9W1T+CTV/M/YJU6i+AcQXIOGda 7CabGyaiYCxGXM3CT245/QK9Zz52m0RUaY7V+8+d1pAIwlNoIT7fZZBQayl3KmJAu8pj v9sQ== 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=h4GO9ye3jFV7uDmDscZs0Go8LN5BRnU6BdMpCcsv9+M=; b=YYRadmQyIi7ZoQ32exfIfH6FfoLmbsWOY1s8zTqx7Uzor/HtwT4UJP6C1quU3b7pQ9 /Gp9fzLEwKOAfLYhqR7y3TgzJL/1q3ktBfezNZeYuxoQyC+UtnuLEx47d9vSDOEfU0N/ enJl1tuwVn55UhyEWd72xKGp3uMJOFKDT77LwZUZGqA5A2cwBv9J5iD6M2dD+Pw0f63y wHB5k/NRreda4UXnJj42oU317R+3zK/AYzYYsh3COlwrQ+IsCUlFknrLRHAILAlCCF/b 08kQlKCvj4kAr+1Q0c7bhVHYGknwuoQARFknwlDTBkXYU6rShb5PtU23Kd5TWwTgQRet VM8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="Mq/HyQcM"; dkim=neutral (no key) header.i=@linutronix.de header.b=nxJOAGxK; 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 l12-20020a170903120c00b001ae4a01a7e0si2516826plh.236.2023.06.09.02.30.45; Fri, 09 Jun 2023 02:30:58 -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="Mq/HyQcM"; dkim=neutral (no key) header.i=@linutronix.de header.b=nxJOAGxK; 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 S241345AbjFIJQq (ORCPT + 99 others); Fri, 9 Jun 2023 05:16:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239338AbjFIJP6 (ORCPT ); Fri, 9 Jun 2023 05:15:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3169421A; Fri, 9 Jun 2023 02:11:54 -0700 (PDT) Date: Fri, 09 Jun 2023 09:10:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686301826; 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=h4GO9ye3jFV7uDmDscZs0Go8LN5BRnU6BdMpCcsv9+M=; b=Mq/HyQcMH2TcUX3C63uYul9aoarM8b1s/sbImeHGjeFetDtvcxcbv/OaYRFZI8Q/TAeLr4 g+TX4gDsKYcQJl5bzydVkCNyGdK0cVlDy/KcA6klH1iBXZy5+6kB1Nu58ZJUmpYRXvUqws y9EiJf5cFTa5beW76K1t8epNAMdHHIk7E2xecz9nA/xvMks7Yenb/UHDn11QjsLv5vUQmO 7SJ0nBVMH/I150v+usDpT+A93p/X+16myq+qAe2DhL6zdXt7gGsZ43AJ0Z3eXI0/GGEfCJ 0kOWEoGLZMNhHg2rcuJOamZHYTafpbbVDoq/MTRplYvQ9zhIvvkOoyFvpEUkVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686301826; 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=h4GO9ye3jFV7uDmDscZs0Go8LN5BRnU6BdMpCcsv9+M=; b=nxJOAGxKznuQKAH4xHsTM6ZbfXHxzR4zDbwaDKs4tTm2F6tT5qIU/UopTYiUHshlJAdGcs r4ldWGluTCmvqwBQ== 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: <168630182497.404.6489095228075454990.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?1768216916065161994?= The following commit has been merged into the objtool/core branch of tip: Commit-ID: f2d89c50301987db9e9252919fb6ce2ecdb667c7 Gitweb: https://git.kernel.org/tip/f2d89c50301987db9e9252919fb6ce2ecdb667c7 Author: Ingo Molnar AuthorDate: Fri, 09 Jun 2023 11:04:53 +02:00 Committer: Ingo Molnar CommitterDate: Fri, 09 Jun 2023 11:04:53 +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. Addresses this build failure: arch/x86/kernel/callthunks.c:296:13: error: ‘is_callthunk’ defined but not used [-Werror=unused-function] Move is_callthunk() inside the #ifdef block. 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;