Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1333478pxm; Sat, 26 Feb 2022 12:06:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYlrz5LdmfS6GUJnS/irc7sqRxmh1q8jEoVRmUX4QK1yLyAC3W6yh8vNXzQM35ups2WQBo X-Received: by 2002:a17:902:ea81:b0:14f:a4ce:ef79 with SMTP id x1-20020a170902ea8100b0014fa4ceef79mr13224015plb.136.1645905964248; Sat, 26 Feb 2022 12:06:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645905964; cv=none; d=google.com; s=arc-20160816; b=pN0N1wpDJKBZj6PRRkZ+fjBr8U2OX5bLTl5dpjsz0ybczGwouV7x0RTCkaedGQc5YD VYKUKGQoDe7kCPtXKhfLcipKkKZQiHJ6w3zK2AWnjfsbxA9Sezb2jsQqrAQf3KZmTod8 OXeWs3W3SM5fWLB7X6MKEPnuDKlRjDzST5hTNr9dT++AcoFwXNBAmrh65l8D5SYcdFTm Q9J7JkYpxX0e4BEvu/JFkFlIDY4G66TZ0Mzn7x4eAVnQqvR77igyh3F89dIazm15r5cj /qG9pK9TRIiGZQRSCZqTZ4S2+fLFLmCNxQ89p48ATevf43X52Ylq5vLz+V6p7mxQnNBr Tu3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ygE8hYEkePfKnpRd3x5FFTPK9obsB+BoDwK2l1WEiQY=; b=zIEDJS2ENrDTFh7+nFNqveJOrOCXMW/xyfoQb8bjw1orhPS6ZkLsC50/V1kV9IIbKh FyMbxSYGDEKTzpBWzmhsj/ErKCeEr0uO2FGgCSBFpx1MYZqJmzVViCoxGF+xPldOwdqz Zl6q4/TCJAOyZa00hUmxfnsKcOarB1xC+XZSKAdzqPNb8BNVNHC5v59u+KB1vL2wwg3s TDrE4OUVuAjU5Ypq324xmQDDanNctLATGl6bxkgWwuC9+iSEdGMuSn64vpKVp0gJlSxA J4FuYdACtQ2MiMx6rnT8IxWMOv/94okaRLHfJ538qfZMx5uH2LrOpQhFYXrWEKXJ4czH Offg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QI4O5doO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bf5-20020a17090b0b0500b001bc4f98a448si10320392pjb.156.2022.02.26.12.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 12:06:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QI4O5doO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 962D4211EF8; Sat, 26 Feb 2022 12:04:41 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229458AbiBZTmx (ORCPT + 99 others); Sat, 26 Feb 2022 14:42:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiBZTmw (ORCPT ); Sat, 26 Feb 2022 14:42:52 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D27E81CDDE5 for ; Sat, 26 Feb 2022 11:42:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645904535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ygE8hYEkePfKnpRd3x5FFTPK9obsB+BoDwK2l1WEiQY=; b=QI4O5doOCkSa4hLdpS+RubWxeUgFKwFqqlInZwrRBlY7zFOfqkrAwXBbFCllsuUB6wyzbS LKbqFDDvp3XA3RHocyM/GuHZQOpQ3Vy4eQ/p2PxM3bPYfb5r2O9PvK5oKmTePyDZjw22RK asa7e1nb0fTJGetTqtwvoiCPgAU5wRg= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-222-VHEGS6cKMUyBBu0QnAYH_Q-1; Sat, 26 Feb 2022 14:42:14 -0500 X-MC-Unique: VHEGS6cKMUyBBu0QnAYH_Q-1 Received: by mail-qk1-f197.google.com with SMTP id t10-20020a37aa0a000000b00605b9764f71so7789918qke.22 for ; Sat, 26 Feb 2022 11:42:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ygE8hYEkePfKnpRd3x5FFTPK9obsB+BoDwK2l1WEiQY=; b=N7sdRfAHEqT3Yqjv83yZYNo6+Nug9An3Quu0I1QkrHCJoqf+QvQ0vKyJmK3JnO4rJx VZJDVcVmMJXuRNjyRxhBO1wYBlYclQHWJ94+xN1Zc/2r0nm8QRMtoJpKr95QGC1AyBRj fgINi6W/cFsDHFYYYuXYy/3PlHEYQKs65iNVGQjrs5EqmTmbt/JRWEHoiVPrlwcArmtP UJzAqeYTXe8//ZryRJcz/unmP58unDON4RiKXyWd7nW59hMTrozjfsa6T/HF9iay/FWe OH+CoLLDKXuNlqdy9s0DLrCkbVudFUYfJQplwaTugbpeS1Hj/xGYrJruKCKh2obDy6SK Xc5g== X-Gm-Message-State: AOAM533d/V1FN6ONn5S2qSNub5wWH+HB/gatZ0iu2X021kX8a/0Qloqq rPngeAIuYq9cho/EqUMj/iujSrQtf5bQBTfltrqJX1iwKMWM58Q0HuxExc8das1rPXlqjpuosjs /AvtMlTeK5Pgr/i56bs62i2rB X-Received: by 2002:ae9:d842:0:b0:547:b883:932d with SMTP id u63-20020ae9d842000000b00547b883932dmr7706872qkf.646.1645904533887; Sat, 26 Feb 2022 11:42:13 -0800 (PST) X-Received: by 2002:ae9:d842:0:b0:547:b883:932d with SMTP id u63-20020ae9d842000000b00547b883932dmr7706862qkf.646.1645904533616; Sat, 26 Feb 2022 11:42:13 -0800 (PST) Received: from treble ([2600:1700:6e32:6c00::35]) by smtp.gmail.com with ESMTPSA id n8-20020ac85a08000000b002de658d6748sm3934292qta.55.2022.02.26.11.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 11:42:13 -0800 (PST) Date: Sat, 26 Feb 2022 11:42:09 -0800 From: Josh Poimboeuf To: Peter Zijlstra Cc: x86@kernel.org, joao@overdrivepizza.com, hjl.tools@gmail.com, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, ndesaulniers@google.com, keescook@chromium.org, samitolvanen@google.com, mark.rutland@arm.com, alyssa.milburn@intel.com Subject: Re: [PATCH 21/29] objtool: Rename --duplicate to --lto Message-ID: <20220226194209.bvv3t65hhtnwltmk@treble> References: <20220218164902.008644515@infradead.org> <20220218171409.814392411@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220218171409.814392411@infradead.org> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Fri, Feb 18, 2022 at 05:49:23PM +0100, Peter Zijlstra wrote: > In order to prepare for LTO like objtool runs for modules, rename the > duplicate argument to lto. > > Signed-off-by: Peter Zijlstra (Intel) > --- > scripts/link-vmlinux.sh | 2 +- > tools/objtool/builtin-check.c | 4 ++-- > tools/objtool/check.c | 7 ++++++- > tools/objtool/include/objtool/builtin.h | 2 +- > 4 files changed, 10 insertions(+), 5 deletions(-) > > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -115,7 +115,7 @@ objtool_link() > objtoolcmd="orc generate" > fi > > - objtoolopt="${objtoolopt} --duplicate" > + objtoolopt="${objtoolopt} --lto" > > if is_enabled CONFIG_FTRACE_MCOUNT_USE_OBJTOOL; then > objtoolopt="${objtoolopt} --mcount" > --- a/tools/objtool/builtin-check.c > +++ b/tools/objtool/builtin-check.c > @@ -20,7 +20,7 @@ > #include > > bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, > - validate_dup, vmlinux, mcount, noinstr, backup, sls, dryrun; > + lto, vmlinux, mcount, noinstr, backup, sls, dryrun; > > static const char * const check_usage[] = { > "objtool check [] file.o", > @@ -40,7 +40,7 @@ const struct option check_options[] = { > OPT_BOOLEAN('b', "backtrace", &backtrace, "unwind on error"), > OPT_BOOLEAN('a', "uaccess", &uaccess, "enable uaccess checking"), > OPT_BOOLEAN('s', "stats", &stats, "print statistics"), > - OPT_BOOLEAN('d', "duplicate", &validate_dup, "duplicate validation for vmlinux.o"), > + OPT_BOOLEAN(0, "lto", <o, "whole-archive like runs"), "--lto" is a confusing name, since this "feature" isn't specific to LTO. Also, it gives no indication of what it actually does. What it does is, run objtool on vmlinux or module just like it's a normal object, and *don't* do noinstr validation. Right? It's weird for the noinstr-only-mode to be the default. BTW "--duplicate" had similar problems... So how about: - Default to normal mode on vmlinux/module, i.e. validate and/or generate ORC like any other object. This default is more logically consistent and makes sense for the future once we get around to parallelizing objtool. - Have "--noinstr", which does noinstr validation, in addition to all the other objtool validation/generation. So it's additive, like any other cmdline option. (Maybe this option isn't necessarily needed for now.) - Have "--noinstr-only" which only does noinstr validation and nothing else. (Alternatively, "--noinstr --dry-run") ? -- Josh