Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp909140ybh; Wed, 22 Jul 2020 16:58:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRRooJR1JEbVlqalnNwUWVpLHRjTxruSXGKUTX0kpCcSTnz5X0zug53M9nINq4V5L5J8X8 X-Received: by 2002:a17:906:a24a:: with SMTP id bi10mr1831393ejb.227.1595462337254; Wed, 22 Jul 2020 16:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595462337; cv=none; d=google.com; s=arc-20160816; b=a3vivmsTAKxNhFrmdl03va6FLXbbd3AsygpLf/WTZ8BNZwMTr7EPsft1io/GCHXGiT WZE2T3yOtWKSlytAFTpMV0cZ06Tv2xP1dp4IxLk8bGflQK0xNSHrekS7nFKmL2TK6CUX 7aT1r097zFbTCw1bTr7KWJsjQy+IkBpNqeqoX3bqKcmsYbSv10CTYMwtfwcfv0FR2+kI RGNgQlRSR4qrSFby8q4HGNN9JTSDqbBenP7T6a/+w7Gzj0C+BtQ5PydkYAtatj+CW+Af dsFfCbMpT0oU1LTDgQJaxjLspKWQmRNGRYKB/1TI5tFTa75TZhDBg2vdo1Vh2HRJ9g27 kgEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+o+RK6ajhbuXa8t53WrOJ/qO/QqSI4MSwqISfWHz0Bo=; b=vi2bIAA13vtFREgYj2A2cW3eaiBLfzWmWqupfxxWHTrd82Ew8uRWXZBvyTWAYo+xw8 rby808g9+kbJ+TirWqUnXFt0clYQyGsnVfvDnVUMX4UlLuAyx7Nq18SuawfZM+tUjBut szQya+im7idmycJfNmeVa6LckyedHt4seUNXtw9ytHZbtgBREbDq85lyCyGa/zfblQ87 Pnlzq4pnaYeEb0Ca9WJh/0JEOBcadtlmkjVbwJ8PG2Hes/qoHK0xYPWBKwpYuMwMry5N ERn7QSEiULIlsUp6x8TTWROymAqEpo9w2A8bFXDvyiiMyWEcDXrp2dt9Gp4lZPz+8t+E 8LEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=AOTr95qz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si918968ejy.82.2020.07.22.16.58.34; Wed, 22 Jul 2020 16:58:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=AOTr95qz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733295AbgGVX4v (ORCPT + 99 others); Wed, 22 Jul 2020 19:56:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729198AbgGVX4u (ORCPT ); Wed, 22 Jul 2020 19:56:50 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1319CC0619E1; Wed, 22 Jul 2020 16:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+o+RK6ajhbuXa8t53WrOJ/qO/QqSI4MSwqISfWHz0Bo=; b=AOTr95qzy3NNS7ydya0oEhrj0x IXsE0BLHInLxK7LMENdQilIfh2cpaGkvHT95pCgdQwNllmzwOLo3+ojeCbEeS4ONogdi/FdZvcsKA vAAlb2nO3vfaHmXrCG9JS/bvR5nFxAh//2dmSV204vs1qw1GWAabgr/uWXOtCYgSy/mF0P8ZAPH1a 0M834X7yscfS6C56SWvXovBm3e9oXECz2XoS4GyQhiQw3PA9SiSIXRP8eb+3AJdmfYbzvrwZxEpS7 UoeZWuAa/x/uCWzeKIKFz1PRB4jr7Bgi4tjCA67T2axhMjY8cp+HgOR0/H1DXp/uKqGGDB/OHYF0s 5GlHzNUw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyOb0-0007ot-PD; Wed, 22 Jul 2020 23:56:23 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A4C193060EF; Thu, 23 Jul 2020 01:56:20 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8E31729BEC9E1; Thu, 23 Jul 2020 01:56:20 +0200 (CEST) Date: Thu, 23 Jul 2020 01:56:20 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: Sami Tolvanen , Masahiro Yamada , Will Deacon , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, Josh Poimboeuf Subject: Re: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool Message-ID: <20200722235620.GR10769@hirez.programming.kicks-ass.net> References: <20200624212737.GV4817@hirez.programming.kicks-ass.net> <20200624214530.GA120457@google.com> <20200625074530.GW4817@hirez.programming.kicks-ass.net> <20200625161503.GB173089@google.com> <20200625200235.GQ4781@hirez.programming.kicks-ass.net> <20200625224042.GA169781@google.com> <20200626112931.GF4817@hirez.programming.kicks-ass.net> <20200722135542.41127cc4@oasis.local.home> <20200722184137.GP10769@hirez.programming.kicks-ass.net> <20200722150943.53046592@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200722150943.53046592@oasis.local.home> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 03:09:43PM -0400, Steven Rostedt wrote: > On Wed, 22 Jul 2020 20:41:37 +0200 > Peter Zijlstra wrote: > > > > That said, Andi Kleen added an option to gcc called -mnop-mcount which > > > will have gcc do both create the mcount section and convert the calls > > > into nops. When doing so, it defines CC_USING_NOP_MCOUNT which will > > > tell ftrace to expect the calls to already be converted. > > > > That seems like the much easier solution, then we can forget about > > recordmcount / objtool entirely for this. > > Of course that was only for some gcc compilers, and I'm not sure if > clang can do this. > > Or do you just see all compilers doing this in the future, and not > worrying about record-mcount at all, and bothering with objtool? I got the GCC version wrong :/ Both -mnop-mcount and -mrecord-mcount landed in GCC-5, where our minimum GCC is now at 4.9. Anyway, what do you prefer, I suppose I can make objtool whatever we need, that patch is trivial. Simply recording the sites and not rewriting them should be simple enough.