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,URIBL_BLOCKED, 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 6C3BCC433DF for ; Sat, 10 Oct 2020 00:13:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 372EB22248 for ; Sat, 10 Oct 2020 00:13:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mijmHtCM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728784AbgJJAM0 (ORCPT ); Fri, 9 Oct 2020 20:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728630AbgJJABG (ORCPT ); Fri, 9 Oct 2020 20:01:06 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05486C0613D7 for ; Fri, 9 Oct 2020 17:01:03 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id p13so11162990edi.7 for ; Fri, 09 Oct 2020 17:01:03 -0700 (PDT) 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=NyEG6unrPY9TR7tF+FNQAaLApT1kctBGIfqP3l5IFb4=; b=mijmHtCMvGsgDu4uYd7w3AkGuavHKsRtISq1sPYHXYFaJw1WU+TYM2fX64XYscUKFv oU1cjxRYTJM1zp/QWqADJjTuB9hPhK+ZKhKINQnaiff6eqCzhX5w5wrxbRlGrJ0vyWiv ro3O+Z6DBIysL9dvjFawfl9YpJ7VnqXVeFq0auogXHWgzG/yIY2Ex8Vg0F1RLU4QxqSG bPLvghG+BsOIiRJ7zUxm1IgTps9IY/HH1VRZFA09lds3Gl17NZfWxvoZiUPcmFwlV7So V3Y3SV5Dt+Y35HFON8xSJwLyPjVkAmtWcAvVa4XffcGawnjsCdKwV9RsaQRB1eOPndHI e4Ew== 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=NyEG6unrPY9TR7tF+FNQAaLApT1kctBGIfqP3l5IFb4=; b=Fb+xiqe+xiRiCgj5tCUV+H54pGd+lEtdYRZreDnUBSqHQvnDRSDxeycP1VVEiFMBdO l+gtKUgwpZ9Q/H7z44g6upi+yNlWaf8q3boQ1/6Pngbm+NYho89SiGERkFiZyIX6qTvC hO90dQohToOyiDdxHg69Z6O1e1ioOQ6cHgPh5Ta0oMfqK2Pd5adYLdoiF+HT1TNsgm3W CD3cva6mrePwLhRblvLog1PIzwTA6pqif8c2VWafPuqgV5eRfc2SAeCjEWFcTABZLUh7 /sid0fj0L3GEOUZlAiNf7vi4eCxo4fN8nczdsH0WqqqQ7+RxOYk4OAmon538/2E13ZSy G1eg== X-Gm-Message-State: AOAM530gDIZFFhrXB4GYokW2OAxJEKe3oY287FEZVkz/cby3l9cyVyOm cR2Ab9QzmOU7ScgPlvgMOF90RcllKdKasjQjx2VQAA== X-Google-Smtp-Source: ABdhPJygCrm7pkL/BYEq335cylOsmwx8yyljt1uWu6UwT8l62xqSHabdTtXkuhnBI7dZHTHKXqo8112Hls6msX6/ovk= X-Received: by 2002:a50:dec9:: with SMTP id d9mr1852468edl.145.1602288062227; Fri, 09 Oct 2020 17:01:02 -0700 (PDT) MIME-Version: 1.0 References: <20201009161338.657380-1-samitolvanen@google.com> <20201009153512.1546446a@gandalf.local.home> <20201009210548.GB1448445@google.com> <20201009193759.13043836@oasis.local.home> In-Reply-To: <20201009193759.13043836@oasis.local.home> From: Sami Tolvanen Date: Fri, 9 Oct 2020 17:00:51 -0700 Message-ID: Subject: Re: [PATCH v5 00/29] Add support for Clang LTO To: Steven Rostedt Cc: Masahiro Yamada , Will Deacon , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , linux-pci@vger.kernel.org, X86 ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 9, 2020 at 4:38 PM Steven Rostedt wrote: > > On Fri, 9 Oct 2020 14:05:48 -0700 > Sami Tolvanen wrote: > > > Ah yes, X86_DECODER_SELFTEST seems to be broken in tip/master. If you > > prefer, I have these patches on top of mainline here: > > > > https://github.com/samitolvanen/linux/tree/clang-lto > > > > Testing your config with LTO on this tree, it does build and boot for > > me, although I saw a couple of new objtool warnings, and with LLVM=1, > > one warning from llvm-objdump. > > Thanks, I disabled X86_DECODER_SELFTEST and it now builds. > > I forced the objdump mcount logic with the below patch, which produces: > > CONFIG_FTRACE_MCOUNT_RECORD=y > CONFIG_FTRACE_MCOUNT_USE_OBJTOOL=y > > But I don't see the __mcount_loc sections being created. > > I applied patches 1 - 6. Patch 6 is missing the part where we actually pass --mcount to objtool, it's in patch 11 ("kbuild: lto: postpone objtool"). I'll fix this in v6. In the meanwhile, please apply patches 1-11 to test the objtool change. Do you have any thoughts about the approach otherwise? 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.7 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 2E442C433E7 for ; Sat, 10 Oct 2020 00:02:32 +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 C9BC720709 for ; Sat, 10 Oct 2020 00:02:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vIfb96n9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="mijmHtCM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9BC720709 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=h865uhmdGzpb5NBWwracEh9BNi/g7r6gJ7JCTcvl9do=; b=vIfb96n9OZaX6AJTa/wiPqHLa XH7p82hHny0lm0gg2VtV1C+wnxxihPx4iCBCvAaEWvB8UfejcRwrdNecYWo/+AdfpB4IlYD3Jr3+C zUTxxMHXckVw8raXcjx5JKAvkQ9IYIIem8R3NUFbKc++3/yE/rkjCRnVJipFqxVzDRAQM9ZWhn74j ogUfh1B4pW+fBgBqgzXu5xm1sDSsCSv6ntuOAFLn0XtR+9OOzKdWZfVmobC1YrPUAlArzApKlV1vq 9DSiCIkC6V54bAvUYh+hHRVxUrL+fAnuPS1r0zrThv+0RzQdEkI218O6RXhkcCAVXUC1RdL9lKYSw 8t5dGKflQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kR2Jy-0006kx-AN; Sat, 10 Oct 2020 00:01:10 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kR2Jr-0006jf-PJ for linux-arm-kernel@lists.infradead.org; Sat, 10 Oct 2020 00:01:08 +0000 Received: by mail-ed1-x541.google.com with SMTP id dg9so8793898edb.12 for ; Fri, 09 Oct 2020 17:01:03 -0700 (PDT) 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=NyEG6unrPY9TR7tF+FNQAaLApT1kctBGIfqP3l5IFb4=; b=mijmHtCMvGsgDu4uYd7w3AkGuavHKsRtISq1sPYHXYFaJw1WU+TYM2fX64XYscUKFv oU1cjxRYTJM1zp/QWqADJjTuB9hPhK+ZKhKINQnaiff6eqCzhX5w5wrxbRlGrJ0vyWiv ro3O+Z6DBIysL9dvjFawfl9YpJ7VnqXVeFq0auogXHWgzG/yIY2Ex8Vg0F1RLU4QxqSG bPLvghG+BsOIiRJ7zUxm1IgTps9IY/HH1VRZFA09lds3Gl17NZfWxvoZiUPcmFwlV7So V3Y3SV5Dt+Y35HFON8xSJwLyPjVkAmtWcAvVa4XffcGawnjsCdKwV9RsaQRB1eOPndHI e4Ew== 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=NyEG6unrPY9TR7tF+FNQAaLApT1kctBGIfqP3l5IFb4=; b=dpOgXdNPG566FoVpFZqLEeQFJGyjmLFYLj2wIgOst4o3iJ4xxNAj9UzT1nBWJQYle3 yEKnpB74diWHX+GK3fedZioFJxapFjT/swydFILyKnPkfHjax9t7pn5CoO4kchSXrOVY lSruaqtfWzFB0QSgGbWtYgNzWaeXaC6oyOVXAIl082d8RTJxT8OIm6obJroaJJZSL5I4 J/TqOqq1KWKn/IZbuo7lF0af+Jw6rnn3p5iN+mJ7eArME1T7nipIV0a123msbi9yVuoj e85JmSXEuVHCCBw7FuTlEFHL5EpJ6MCg7sW3yBX9Dn3Gw6pBM3uTMqy+7zHDK23PXYR0 KsoA== X-Gm-Message-State: AOAM531pmv+/vwOrBLTvm9WiEnlY4sY36jFGkxwltKHAJyPJJXAFp3vD 5nN4ZytW0IqsIEq6iY+fKSs8djGGEmahKST3WA551w== X-Google-Smtp-Source: ABdhPJygCrm7pkL/BYEq335cylOsmwx8yyljt1uWu6UwT8l62xqSHabdTtXkuhnBI7dZHTHKXqo8112Hls6msX6/ovk= X-Received: by 2002:a50:dec9:: with SMTP id d9mr1852468edl.145.1602288062227; Fri, 09 Oct 2020 17:01:02 -0700 (PDT) MIME-Version: 1.0 References: <20201009161338.657380-1-samitolvanen@google.com> <20201009153512.1546446a@gandalf.local.home> <20201009210548.GB1448445@google.com> <20201009193759.13043836@oasis.local.home> In-Reply-To: <20201009193759.13043836@oasis.local.home> From: Sami Tolvanen Date: Fri, 9 Oct 2020 17:00:51 -0700 Message-ID: Subject: Re: [PATCH v5 00/29] Add support for Clang LTO To: Steven Rostedt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201009_200103_851686_E698D4A9 X-CRM114-Status: GOOD ( 18.51 ) 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 , X86 ML , Kees Cook , "Paul E. McKenney" , Kernel Hardening , Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild , Nick Desaulniers , LKML , clang-built-linux , linux-pci@vger.kernel.org, Will Deacon , linux-arm-kernel 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 Fri, Oct 9, 2020 at 4:38 PM Steven Rostedt wrote: > > On Fri, 9 Oct 2020 14:05:48 -0700 > Sami Tolvanen wrote: > > > Ah yes, X86_DECODER_SELFTEST seems to be broken in tip/master. If you > > prefer, I have these patches on top of mainline here: > > > > https://github.com/samitolvanen/linux/tree/clang-lto > > > > Testing your config with LTO on this tree, it does build and boot for > > me, although I saw a couple of new objtool warnings, and with LLVM=1, > > one warning from llvm-objdump. > > Thanks, I disabled X86_DECODER_SELFTEST and it now builds. > > I forced the objdump mcount logic with the below patch, which produces: > > CONFIG_FTRACE_MCOUNT_RECORD=y > CONFIG_FTRACE_MCOUNT_USE_OBJTOOL=y > > But I don't see the __mcount_loc sections being created. > > I applied patches 1 - 6. Patch 6 is missing the part where we actually pass --mcount to objtool, it's in patch 11 ("kbuild: lto: postpone objtool"). I'll fix this in v6. In the meanwhile, please apply patches 1-11 to test the objtool change. Do you have any thoughts about the approach otherwise? 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=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 2CE42C433E7 for ; Sat, 10 Oct 2020 00:01:22 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 2C69F221FD for ; Sat, 10 Oct 2020 00:01:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mijmHtCM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C69F221FD 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-20166-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 12250 invoked by uid 550); 10 Oct 2020 00:01:14 -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 12217 invoked from network); 10 Oct 2020 00:01:14 -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=NyEG6unrPY9TR7tF+FNQAaLApT1kctBGIfqP3l5IFb4=; b=mijmHtCMvGsgDu4uYd7w3AkGuavHKsRtISq1sPYHXYFaJw1WU+TYM2fX64XYscUKFv oU1cjxRYTJM1zp/QWqADJjTuB9hPhK+ZKhKINQnaiff6eqCzhX5w5wrxbRlGrJ0vyWiv ro3O+Z6DBIysL9dvjFawfl9YpJ7VnqXVeFq0auogXHWgzG/yIY2Ex8Vg0F1RLU4QxqSG bPLvghG+BsOIiRJ7zUxm1IgTps9IY/HH1VRZFA09lds3Gl17NZfWxvoZiUPcmFwlV7So V3Y3SV5Dt+Y35HFON8xSJwLyPjVkAmtWcAvVa4XffcGawnjsCdKwV9RsaQRB1eOPndHI e4Ew== 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=NyEG6unrPY9TR7tF+FNQAaLApT1kctBGIfqP3l5IFb4=; b=JsjsNwaeqYi4bgudxaAqszU8krB65UmcbriKC6cOhKMuzMGGiwwzdAGj2rphuOplfc mMQU3Sb04ldGe9hQAKF8z7FYhO2xX9OTLOLWaQ5X4YDznXa8Xod626ImrEYVsVS2Pk7K dR9OcWJ8+X7B3uXykdsHfp7Cjgw1ro5uwaUusfmk5zKrMrVJ9OKw1WZx5F6/CHSVKeHn vKQD+xlz31GEvjoP8TZrqdolUtkAcHnbwW37/UBOsTC2erZxpmxg3FX17vszIcnHe9AK ZDcxJGIfn0RNrNzcGirgABTqB6JK6WXgGyQRhi8ZTJ3EZgXmQIdLDKbSH2OpjRikvfFq YFLA== X-Gm-Message-State: AOAM5308CLdNWH9sm2fnyCpT3sMWd7JkwKzIntXtTj/Bgl8ez6+sHR/A N0E/tKfwa84X3xIVa97tZ3MHgKl+bwwqk1p65yk7CQ== X-Google-Smtp-Source: ABdhPJygCrm7pkL/BYEq335cylOsmwx8yyljt1uWu6UwT8l62xqSHabdTtXkuhnBI7dZHTHKXqo8112Hls6msX6/ovk= X-Received: by 2002:a50:dec9:: with SMTP id d9mr1852468edl.145.1602288062227; Fri, 09 Oct 2020 17:01:02 -0700 (PDT) MIME-Version: 1.0 References: <20201009161338.657380-1-samitolvanen@google.com> <20201009153512.1546446a@gandalf.local.home> <20201009210548.GB1448445@google.com> <20201009193759.13043836@oasis.local.home> In-Reply-To: <20201009193759.13043836@oasis.local.home> From: Sami Tolvanen Date: Fri, 9 Oct 2020 17:00:51 -0700 Message-ID: Subject: Re: [PATCH v5 00/29] Add support for Clang LTO To: Steven Rostedt Cc: Masahiro Yamada , Will Deacon , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , linux-pci@vger.kernel.org, X86 ML Content-Type: text/plain; charset="UTF-8" On Fri, Oct 9, 2020 at 4:38 PM Steven Rostedt wrote: > > On Fri, 9 Oct 2020 14:05:48 -0700 > Sami Tolvanen wrote: > > > Ah yes, X86_DECODER_SELFTEST seems to be broken in tip/master. If you > > prefer, I have these patches on top of mainline here: > > > > https://github.com/samitolvanen/linux/tree/clang-lto > > > > Testing your config with LTO on this tree, it does build and boot for > > me, although I saw a couple of new objtool warnings, and with LLVM=1, > > one warning from llvm-objdump. > > Thanks, I disabled X86_DECODER_SELFTEST and it now builds. > > I forced the objdump mcount logic with the below patch, which produces: > > CONFIG_FTRACE_MCOUNT_RECORD=y > CONFIG_FTRACE_MCOUNT_USE_OBJTOOL=y > > But I don't see the __mcount_loc sections being created. > > I applied patches 1 - 6. Patch 6 is missing the part where we actually pass --mcount to objtool, it's in patch 11 ("kbuild: lto: postpone objtool"). I'll fix this in v6. In the meanwhile, please apply patches 1-11 to test the objtool change. Do you have any thoughts about the approach otherwise? Sami