Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp882808ybp; Fri, 11 Oct 2019 06:00:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyc142ufIiZesGYPKtg+zFRhnYqekQyyoR06fkakUXya6pmBc9vh5IBxaFFHo8zxwfRINil X-Received: by 2002:a17:906:a88e:: with SMTP id ha14mr13297156ejb.92.1570798803728; Fri, 11 Oct 2019 06:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570798803; cv=none; d=google.com; s=arc-20160816; b=PCjLKuZ3dRDH8TsyX+MAV92TV1Q+jrTXR1Cmgw3jFAcsKFXoYt2QwGMuw4EIClidZ3 gtZ5EoS0LazRQdsomoGIZdSHlOzoE1sG7N8nCHof+lpUd7joWUTgAAcY7O/8jiYcOrQC 8FvIxGLeMmJAg68gcsO3Hxbkk46g4ydlO6qo3hdVFc3z7/jPGDN9JkqjsoYvOi3bsrbt T9XVt73igQ6NuVVjUCsZjEoU1Otzi1LjsnZfJD2ajBOL962D7qHxgttNjyg39bPwF7jp 5qQIHAZCfWpadBfIn18JMTvs36Rn8RMIj0hzfHA+/5Q0CzV/RL9P0/QhR2JpEA32UHxg FnYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0oxLsQ5iH+e+05LkxnBni+6OFSMtRO8vSqonY1UcZaI=; b=vj5ETiNVYIWSJS0YTd3h0iA1OEKZGEaE2F+fxA+qgKc/rUnEp9Kf+1aClc9AIhIKTF OCVP7Nw4ceMmExVLXA8JUHWN/8cqcKS4KWFpRb8XTIgOW1FJ1gN8FmaqQAUiXy9pAn+Y xCsRdIbESE1LLESrXdIhgV2TvfGXqAySl3NzFQBhoOmaadkLh3TR4gTmcaZuhVxNnSxE aibFI+JVJBT3UuU8bfoSl5Zl/G5O8kH/r/DKh3pm5UOmotJN/RsTDNxAibu9draBKJbw 3egFdmrdwxqdlfiXQmNEXfz+Q2hmCEj6l4tjZkOp04UGZm9CqW1zt1kBcCcdPp7FTF2E 9IqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HqMH+WY7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20si5295811ejv.342.2019.10.11.05.59.39; Fri, 11 Oct 2019 06:00:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HqMH+WY7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728184AbfJKM7N (ORCPT + 99 others); Fri, 11 Oct 2019 08:59:13 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42268 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727589AbfJKM7N (ORCPT ); Fri, 11 Oct 2019 08:59:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0oxLsQ5iH+e+05LkxnBni+6OFSMtRO8vSqonY1UcZaI=; b=HqMH+WY7Iy18jtrsWKkOPYCSd 65W03V98M/943JgI/YKYX3vUHuwYXbof8bh2FOypQ7sOZVdeQLWJfQumslfLV4hIJedD9BbLXgYd+ HCypAokA0CO7X0OPNsn4jj4sT8dXJxxURA2JmUpRqUfc1lqDCXiLiXnRaKv5fmaLN8KD1H8x6+XT+ MdieLei4sB7J/gK47jo0jydI6AIGHcA0cuSNwfUKvuO/zEYfWiAJYGLq86y0eoCheWuLLRFa5QA0n Ws18zVMvyjIVugH8hJ2sHrhEPTr8s1+tWsGkXcuZsw0FejYccRhGMk7gTS892ftnyuKPQIK++Hd/T A7OtLEBng==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iIuVe-0002OW-6Q; Fri, 11 Oct 2019 12:59:06 +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 7582A3013A4; Fri, 11 Oct 2019 14:58:10 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 16F592023D649; Fri, 11 Oct 2019 14:59:03 +0200 (CEST) Date: Fri, 11 Oct 2019 14:59:03 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: x86@kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, bristot@redhat.com, jbaron@akamai.com, torvalds@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, namit@vmware.com, hpa@zytor.com, luto@kernel.org, ard.biesheuvel@linaro.org, jpoimboe@redhat.com, jeyu@kernel.org Subject: Re: [PATCH v3 5/6] x86/ftrace: Use text_poke() Message-ID: <20191011125903.GN2359@hirez.programming.kicks-ass.net> References: <20191007081716.07616230.8@infradead.org> <20191007081945.10951536.8@infradead.org> <20191008104335.6fcd78c9@gandalf.local.home> <20191009224135.2dcf7767@oasis.local.home> <20191010092054.GR2311@hirez.programming.kicks-ass.net> <20191010091956.48fbcf42@gandalf.local.home> <20191010140513.GT2311@hirez.programming.kicks-ass.net> <20191010115449.22044b53@gandalf.local.home> <20191010172819.GS2328@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191010172819.GS2328@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 10, 2019 at 07:28:19PM +0200, Peter Zijlstra wrote: > Really the best solution is to move all the poking into > ftrace_module_init(), before we mark it RO+X. That's what I'm going to > do for jump_label and static_call as well, I just need to add that extra > notifier callback. OK, so I started writing that patch... or rather, I wrote the patch and started on the Changelog when I ran into trouble describing why we need it. That is, I'm struggling to explain why we cannot flip prepare_coming_module() and complete_formation(). Yes, it breaks ftrace, but I'm thinking that is all it breaks. So let me see if we can cure that.