Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp844547pxb; Fri, 22 Apr 2022 12:24:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLw0Ifyk980AO3sDZkgww0rS6vywtAg7MjewjrfGtaQFcocYRFkJZGl1QmoqrTYrPS6XOP X-Received: by 2002:a63:5f93:0:b0:3aa:624b:8225 with SMTP id t141-20020a635f93000000b003aa624b8225mr5234910pgb.544.1650655493398; Fri, 22 Apr 2022 12:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650655493; cv=none; d=google.com; s=arc-20160816; b=Jl7OTINcmYR3BmKkEFVZIJ+QmRYWc/H97Dhu6ZA9tQbxte5NZFNO9LPBpiMgKBWnN8 ui02gDiCJQNamWgu5nhosefQA874mpJeaijaqNEpowbURCY92q1XCWu9JRPEky9HGi3Q xkzLXgr/K4mwbAjYgY5lTYxrkktdqyFsTVZ9SsmT0TTG0PBIYrzIBtp2IvospIoCb27E yK+5JY+mCCrauvTLrDfjb3XF33ZSFHl11YpF16va7Vn08SekRE8fulQSAQjceT/t1i5z boHZ2uVgNTbVSrB/+VRgi1qas6QBGCRM2h3nJ34ba9AruTq/ezg+QYorYheALgfC+34a BOAQ== 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:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=oUsQRUynxwE6aIVskGFZYHhGJAmT1WprsF9+cnYba2M=; b=etV2fSZiOsMLXzdo9ds+Bbgl2i1UI75NFBOaYBSVwLvJtRjMohkI+y2f8/ZYoe8tPc eeL1saFlKpF9xUST5PK3bXcntIO7KiJtoGfc6ekPMobs7zcP2BZGYVlb7MnzfYzVstrV H2Kw/KerPFJ4BTDXaL45uXnN1bRH2uyI8x+2pDbwsyPXkMVraz3MNogLx0gZMVJG9n9V bBO6eY3TksOuGKnWZJTgWGzL7a9nDqtOkGShYwBknQFDyIG1zo0gzpS/YcA4iOQBTnd6 zFpUcUbK0Qdfr9si6lbC9SLPnCNl4So9pvhms1HBIIgy+b6YG0NmNBb1GcONY/4icJK8 nNOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Aa4IOSb5; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l62-20020a638841000000b003aa7028bc8dsi7388823pgd.78.2022.04.22.12.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:24:53 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Aa4IOSb5; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 265B8157828; Fri, 22 Apr 2022 11:36:58 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356895AbiDSULp (ORCPT + 99 others); Tue, 19 Apr 2022 16:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356897AbiDSULV (ORCPT ); Tue, 19 Apr 2022 16:11:21 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6020539172; Tue, 19 Apr 2022 13:08:38 -0700 (PDT) Date: Tue, 19 Apr 2022 20:08:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1650398917; 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: in-reply-to:in-reply-to:references:references; bh=oUsQRUynxwE6aIVskGFZYHhGJAmT1WprsF9+cnYba2M=; b=Aa4IOSb5QUUOiJm63N8W7YUdwcsDbVp9IFpXVT9QWP9B4GXR5BOKs1ubfBQgIisMwcJuVz cWWfIz+yw7GSpaMq2eAnxF+i9e4C6wQiOPYTIpbckiiJJ1JYNXsUYyHbQJeR/NLBkxSCFL e3cP13xBghv5JpvyH/aeDSRSfRP6eH2veykrjxZgrUkJoNTYrsZTLZs4edleVop9rHRpK2 IKwd1SBvRvNeuGLUS3TBvIYlchb/kzYUg6jJzyoahANg4GFiaZkXAnAAKc/8oLab/9Yprn XwRyxwx+NVLhzFOO6IjmO6Z35gWNwNQXc43UTVOgLAOfSDvQtm2y8z8ftC2mXQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1650398917; 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: in-reply-to:in-reply-to:references:references; bh=oUsQRUynxwE6aIVskGFZYHhGJAmT1WprsF9+cnYba2M=; b=RP65PgRA4EMKNNsEtl01Z1ClvBbFGpbMM60mt8l8zl04YhsZFfvZOzQsizJPfP/j5t36oM xhA9RMoNn8MZMPDw== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] objtool: Print data address for "!ENDBR" data warnings Cc: Josh Poimboeuf , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <762e88d51300e8eaf0f933a5b0feae20ac033bea.1650300597.git.jpoimboe@redhat.com> References: <762e88d51300e8eaf0f933a5b0feae20ac033bea.1650300597.git.jpoimboe@redhat.com> MIME-Version: 1.0 Message-ID: <165039891592.4207.1506577697956201551.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 4baae989e638e9bf4b7d29bc5e36b581fddcca52 Gitweb: https://git.kernel.org/tip/4baae989e638e9bf4b7d29bc5e36b581fddcca52 Author: Josh Poimboeuf AuthorDate: Mon, 18 Apr 2022 09:50:29 -07:00 Committer: Peter Zijlstra CommitterDate: Tue, 19 Apr 2022 21:58:50 +02:00 objtool: Print data address for "!ENDBR" data warnings When a "!ENDBR" warning is reported for a data section, objtool just prints the text address of the relocation target twice, without giving any clues about the location of the original data reference: vmlinux.o: warning: objtool: dcbnl_netdevice_event()+0x0: .text+0xb64680: data relocation to !ENDBR: dcbnl_netdevice_event+0x0 Instead, print the address of the data reference, in addition to the address of the relocation target. vmlinux.o: warning: objtool: dcbnl_nb+0x0: .data..read_mostly+0xe260: data relocation to !ENDBR: dcbnl_netdevice_event+0x0 Fixes: 89bc853eae4a ("objtool: Find unused ENDBR instructions") Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/762e88d51300e8eaf0f933a5b0feae20ac033bea.1650300597.git.jpoimboe@redhat.com --- tools/objtool/check.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index e3a675d..b822a6d 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3817,11 +3817,8 @@ static int validate_ibt(struct objtool_file *file) struct instruction *dest; dest = validate_ibt_reloc(file, reloc); - if (is_data && dest && !dest->noendbr) { - warn_noendbr("data ", reloc->sym->sec, - reloc->sym->offset + reloc->addend, - dest); - } + if (is_data && dest && !dest->noendbr) + warn_noendbr("data ", sec, reloc->offset, dest); } }