From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CD68C55ABD for ; Tue, 10 Nov 2020 04:48:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1685A206D8 for ; Tue, 10 Nov 2020 04:48:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="efHLQUtV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730541AbgKJEsP (ORCPT ); Mon, 9 Nov 2020 23:48:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729454AbgKJEsO (ORCPT ); Mon, 9 Nov 2020 23:48:14 -0500 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E3D7C0613CF for ; Mon, 9 Nov 2020 20:48:14 -0800 (PST) Received: by mail-ua1-x942.google.com with SMTP id v9so150715uar.11 for ; Mon, 09 Nov 2020 20:48:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1LG6AI05ymINBvkr43QJrWhW6+Oh0OuOMO1LRwJumoQ=; b=efHLQUtVvktbFbKV0dRhcMiDZ6CiF/nI8yogKkQkXNzkMFEKE5odhT1f13Q4gPJXAu wN0hB9BkQq58Ja7rNMPt1NZVdynEexfdbYBnP6P1V9zpSI+DJlZlVHIYRtDLOuDybsKK SBxayzR/8WM3Q2prP7nQi2dCRyo/MR20sOg6N/LmD6SDjillgAvfoYjFLd2lgcKBMzWH STTrkAhehecfpfomXSDFfie9rZLcKj9V2nN+Xx5m1srFv2/b/ayMzlhJB+vG6YJrW6md +YUyQc+RbXeRLi4+1JZo48a5U5H0fYHqd3kOi7vj283pPMdGH774liDFv7DcOCzqsBmW a6ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LG6AI05ymINBvkr43QJrWhW6+Oh0OuOMO1LRwJumoQ=; b=uPYzZLitV+bTMFseXw2quxQVTndBfJ1AmFVGmSvdGG6r6gG4lUPOfuM/OtT00EzM2e Nl6NDnthwtWAV9YQDexW46kW6EFQL6YhGLG3iKM576rdKQLbZZe0x7Qx9h5k0UHEa0Yg i0v4W6okStZn6WXlgN4AGHbV6WNWqh+US5tLCTM4t5+yanx9Tg1s6dTQDqz6qVaez+Dk vPt0IDJf4s8I0yxUYngSBZPkOF2dXSHIBIyT3OfA4reSTo26lRSakaFvSfCdI397GZ8e NGh+wUcgusYIIyaOkRMbE05dF4eSnaQ2O06IwAqYAtmGrZ9xmac/u4j3yDiYCSFrAvuv D4Lg== X-Gm-Message-State: AOAM530mZu1gn/6mDBpbi0HcCO8E1xTiaN45fWOC0J5CIplD6THOBdBa 7flkVlW1d6jIlm1lVSZDHTkpOSKrO8XExQB7QmfkEg== X-Google-Smtp-Source: ABdhPJxkDi0IYzwTD9/NuW8drJgZEjV2OxRwIJgfYZxoJw/2It4YGoA7cCSoDZ10V3gQPihhY7p+XtZ3gEYyqR4paw4= X-Received: by 2002:ab0:424:: with SMTP id 33mr8354135uav.33.1604983692991; Mon, 09 Nov 2020 20:48:12 -0800 (PST) MIME-Version: 1.0 References: <20201015102216.GB2611@hirez.programming.kicks-ass.net> <20201015203942.f3kwcohcwwa6lagd@treble> <20201020185217.ilg6w5l7ujau2246@treble> <20201021085606.GZ2628@hirez.programming.kicks-ass.net> <20201023173617.GA3021099@google.com> <20201110022924.tekltjo25wtrao7z@treble> In-Reply-To: <20201110022924.tekltjo25wtrao7z@treble> From: Sami Tolvanen Date: Mon, 9 Nov 2020 20:48:01 -0800 Message-ID: Subject: Re: [PATCH v6 22/25] x86/asm: annotate indirect jumps To: Josh Poimboeuf Cc: Peter Zijlstra , Jann Horn , "the arch/x86 maintainers" , Masahiro Yamada , Steven Rostedt , Will Deacon , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , linux-kbuild , kernel list , linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Mon, Nov 9, 2020 at 6:29 PM Josh Poimboeuf wrote: > How would I recreate all these warnings? You can reproduce all of these using a normal gcc build without any of the LTO patches by running objtool check -arfld vmlinux.o. However, with gcc you'll see even more warnings due to duplicate symbol names, as Peter pointed out elsewhere in the thread, so I looked at only the warnings that objtool also prints with LTO. Note that the LTO series contains a patch to split noinstr validation from --vmlinux, as we need to run objtool here even if CONFIG_VMLINUX_VALIDATION isn't selected, so I have not looked at the noinstr warnings. The latest LTO tree is available here: https://github.com/samitolvanen/linux/commits/clang-lto > Here's the patch for hopefully making the warnings more helpful: Thanks, I'll give it a try. Sami