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=unavailable 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 DDC48C5517A for ; Tue, 10 Nov 2020 04:48:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7AB01206C0 for ; Tue, 10 Nov 2020 04:48:23 +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 S1731423AbgKJEsV (ORCPT ); Mon, 9 Nov 2020 23:48:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729454AbgKJEsQ (ORCPT ); Mon, 9 Nov 2020 23:48:16 -0500 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A204C0613D3 for ; Mon, 9 Nov 2020 20:48:14 -0800 (PST) Received: by mail-ua1-x944.google.com with SMTP id t15so3558392ual.6 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=mnVMmlpAvB92Tvr8F6vZzRETFJiGlHuiIY74lF04c0D/j4+7jgvc3rgkKpjhJgxjhR KtL9Gm3Z/JRsAgRtkGgQXybdOuFKbz3ChB13ArKR4Wgm0URdJVbCfJyS1MilLVQ889gk AwgKA5VTrN3KSJbi14Dk2RAL4jVXgN7SQ7r1nNGhBe/+KTVQpf2Sk4jZviLF3oR2oKta DM94amLQEdQGQlw1c13eMuDZXVJ9x68gDtuVDRCcpTUUgppXXt8NzBcb9WEpLyGIFFhn NEYMs4DOl/XaNfXoEpiS6UpL8zpFjaS9NePkSW7vpeRGTJOt+JgUSZf02lz3SmayZnHK HqMg== X-Gm-Message-State: AOAM531DCnKUQOoE5nB3bQHtppiV4PGCuxK871UAn1WWJrANcjeEuhIs YyHkVN6nfwHJ8iQSDfiK1zOqHPwOHZaU6KjO5/2J/Q== 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-kernel@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 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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 5DCE1C388F7 for ; Tue, 10 Nov 2020 04:49:06 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0F3D206B6 for ; Tue, 10 Nov 2020 04:49:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="b3xA2T0X"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="efHLQUtV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0F3D206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TNdBup2N63ChE3pdUSa5Hr+X4KTnQ6dHE38CfROEvpk=; b=b3xA2T0Xk8h80X4f9im8I9w3u HsN32IHsxGfSCJTugEiEIXrPS8eVnD+vAoi21IpNpdqsdBTjlMLw8Z2/OpboSDW8FqjpOyr9cdr66 yUK7rCdAFYh8bCaqXhaOByLCRQcBRGudFLvRmwdqkmvfv2JzYlXIy//Vx4I8Ig6N2xOdF6dL/svPh vdfapMjo7mK04tDqVftqZRf3ynHrT9kHWEkiMJKDP64xe+M2EczJqmdDfGCHNX1b1qRzq8Nh8tuxq +wjcyCnYzze4c1oVaFP/XxHSe3UND4GSuqq1WyxWqDU2Y4M7fuUFIh2b3Am7h4/kwv4O2AsCp85p4 u1z3lwIcQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcLZs-0001NC-Mg; Tue, 10 Nov 2020 04:48:20 +0000 Received: from mail-ua1-x944.google.com ([2607:f8b0:4864:20::944]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcLZo-0001MG-B0 for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 04:48:17 +0000 Received: by mail-ua1-x944.google.com with SMTP id a10so3544384uan.12 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=EKbvK0WHL5xtNcZxt9PObe16aN9fueP0BLhknhfUsSAGK8b+49JnVDhkgKX8LdwwBX l8zs2fSI+z/rV2aDdkJGSK5FAoqGj3QZFLwIpnu4yOfLfPOybkhwfLEITL6kMaXXAnlb 6W1Zc/qVfBisUhH8KA9pHd60o7R0oQnt/xp0DuzcZkpy1sswabjAcLCtZ7KgX//6C1Zn YMR5ElqqumkAmFJfF0Vg+2kwHqV061T6AVCWFWTcCCkZUK7xsjBufjeET1C8g5SgS6Us pmOZVTOq2+ek/MOlHiiEm1SBF0NVxY3JsXgW1ujONKjkmzyZhIwrJbRTDBPuGD+18q0q jq2Q== X-Gm-Message-State: AOAM532w2V/WVQTuheFCLC2JnQy9tkommB15uPOQpwJeUNpORsRBArJq u5Uf+iINM44z4edgLcNwPwgYfzHb4otO+2OteYv/ow== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201109_234816_476732_3467EB40 X-CRM114-Status: GOOD ( 12.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , Kees Cook , "Paul E. McKenney" , Jann Horn , Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , the arch/x86 maintainers , Nick Desaulniers , kernel list , Steven Rostedt , linux-kbuild , clang-built-linux , linux-pci@vger.kernel.org, Kernel Hardening , Will Deacon , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=unavailable 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 0CF10C388F7 for ; Tue, 10 Nov 2020 04:48:35 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id ED9B4206D8 for ; Tue, 10 Nov 2020 04:48:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="efHLQUtV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED9B4206D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-20374-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 11944 invoked by uid 550); 10 Nov 2020 04:48:25 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 11924 invoked from network); 10 Nov 2020 04:48:25 -0000 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=linHyvuBxrrJCpY1eAfD7xofLOtg8tsIAv5c6WT34ZL1ayaShQ8trCNPzoC651yVA9 KQH7SQ2DFDhtYvd/IHGTclqZtp6ZHmryU1+LX+pgclCgGj7O9kTDA/e6LhkaZXINVtKb JpnugIFRxEFPyyOtRxHpzMNPSCCptsN+8YcK3jEBOw/vw4i6r7hHFucPiT/NE7wlHFOo R0Ydn54gRG1cOn+G0AVliTSp7LnFWq76U7jnZvYE1853m29p5GRd7WzXWrPI/9mjDHDG z22keIUNEpKSoku0KM9rH5ZQ2Ljcon7tUicYICaVHAZXvQ1ZWvIRZY0rViBkshMvY2A/ qKwg== X-Gm-Message-State: AOAM532JXH6wP2VbjMGya+ur3Sg7YyrBJHDN5FMRnl//jF3VVlaHbNWu VxKpU21WWfi3/GgXyXZQMDAhy3pFIosUUBdHqKzJlw== 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" 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