Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4087836yba; Mon, 29 Apr 2019 13:32:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGlvglWYcvORVq7JX4XK57caj4WtCtJI4ph/NZK+EGpC6Z+oAn0ZTG9b1fDas/rQzgvfyp X-Received: by 2002:a65:4c07:: with SMTP id u7mr8880809pgq.93.1556569923047; Mon, 29 Apr 2019 13:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556569923; cv=none; d=google.com; s=arc-20160816; b=GOz7mR0CX8rP2wIv2iKMtnn08fYNXK8JcZwhE5wx6qbxCL94ar91egnBMtElmeXa70 Q/CjgmP2MgiekTZ4bTXAQewKrK1aHXMzmWTQUzcqLPSsgODSON8Vgr0wdiWgGA65NhM5 rFc9lK1DPL5AFmA58M23f8lwGUxPhMjvTTBo5BJ5cLEEuZ5NekzGIZlIvnKUbsvTbYr5 rYOngcmvXwhL/DWEwWUJEqjMX6XRr402YTQOOdHFNkTMyFeg3+/1SsoTGMIXLAk5fdY5 WdAAzKo15JAr5lUaY8whI9IsvKhfrqgblCimUU0BirOpsmmP/sXbpLfyxIwMJIQc4Uj+ QNIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=rE64zSJw89eqbb/j1UXnl+XxliEwdmj19Cw6wAGBhXQ=; b=h3gQb+rRD2KRw6eo83T8QOg8jgh6+cyWBx626//0tteEtAcGldV9xVobpsQfE2ISz8 QpcccmFXYYRl/EEYX4/SatQm3xsjc1o9EgRvJXtHC9RFYh5HpwFaW6fisFDJKmw41yEC +HYL3ON7YlH1wRvVGxbvRqMQCvy/Om21ox6lcHKpXeMc+8clgB0lEjKymyD1v+l8thx0 PKAS/9dFufxCme15atmgbMGgEN4I4eOn70VFDp1Bvrnf9YgxwqPqGmW3eM1D4truyvLl 9XxiKDfj/B/TLb40c2yxCsjLo5lKXr0cX5EKxH63wqPbVDsw+xzXLvrdJMl81KYvDBJ1 /Vyg== ARC-Authentication-Results: i=1; mx.google.com; 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 t136si33823691pgc.538.2019.04.29.13.31.47; Mon, 29 Apr 2019 13:32: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; 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 S1729397AbfD2Uat (ORCPT + 99 others); Mon, 29 Apr 2019 16:30:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:44326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729252AbfD2Uas (ORCPT ); Mon, 29 Apr 2019 16:30:48 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6EAB1215EA; Mon, 29 Apr 2019 20:30:45 +0000 (UTC) Date: Mon, 29 Apr 2019 16:30:43 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Peter Zijlstra , Nicolai Stange , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Shuah Khan , Konrad Rzeszutek Wilk , Tim Chen , Sebastian Andrzej Siewior , Mimi Zohar , Juergen Gross , Nick Desaulniers , Nayna Jain , Masahiro Yamada , Andy Lutomirski , Joerg Roedel , Linux List Kernel Mailing , live-patching@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [PATCH 3/4] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation Message-ID: <20190429163043.535f4272@gandalf.local.home> In-Reply-To: References: <20190427100639.15074-1-nstange@suse.de> <20190427100639.15074-4-nstange@suse.de> <20190427102657.GF2623@hirez.programming.kicks-ass.net> <20190428133826.3e142cfd@oasis.local.home> <20190429145250.1a5da6ed@gandalf.local.home> <20190429150724.6e501d27@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Apr 2019 13:06:17 -0700 Linus Torvalds wrote: > On Mon, Apr 29, 2019 at 12:07 PM Steven Rostedt wrote: > > > > Are you suggesting that I rewrite the code to do it one function at a > > time? This has always been batch mode. This is not something new. The > > function tracer has been around longer than the text poke code. > > Only do the 'call' instructions one at a time. Why would you change > _existing_ code? The function tracing is a call instruction. On boot: : nop blah blah After a callback to function tracing is called: call custom_trampoline blah blah If we have two functions to that function added: call iterator_trampoline blah blah The update from "call custom_trampoline" to "call iterator_trampoline" is where we have an issue. We could make this a special case where we do this one at a time, but currently the code is all the same looking at tables to determine to what to do. Which is one of three: 1) change nop to call function 2) change call function to nop 3) update call function to another call function #3 is where we have an issue. But if we want this to be different, we would need to change the code significantly, and know that we are only updating calls to calls. Which would take a bit of accounting to see if that's the change that is being made. This thread started about that #3 operation causing a call to be missed because we turn it into a nop while we make the transition, where in reality it needs to be a call to one of the two functions in the transition. -- Steve