Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4937264yba; Tue, 30 Apr 2019 06:47:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVsr2jiCBmU10cI0XkkuycU62u3TDWA+ogxFb910ue7oWS3+vDQO0Pp0Anzfwr1pjF6PQV X-Received: by 2002:a17:902:5910:: with SMTP id o16mr15022072pli.289.1556632057177; Tue, 30 Apr 2019 06:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556632057; cv=none; d=google.com; s=arc-20160816; b=hhPS1VE0TN9aROH7Rgb7AmswXVBmVt1LGgooLZVFYrejnn3tqVHbWhCay7pbqH1+5E oWMsnEtJcQIip9h6tJ2ogORP+B+gJh9scMyhnzppTw5saG3AZ/asz4D14i2EQcuvxITD E3NtsO7bbaQWu8N2ic8VuY7iwo26c2kuzF0EDPv6u1Rfkz88bFRxClk7RXFlnPuHukgF Hxh+O4XvKgaPFu1pZ+YhcBIL37qUG4OKgChPj/KIUkJxKBIBeOK1UlueUgwHCervETyl +3GY3qefFtsOqVm129nbiqnozbk0LBizxN8cw/yISaGeEk2B3y4Bb5Zi8OVb0Ksg8hOm Elaw== 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=Fzn0LHRoh+n4fp5/qmNSNGZ90rS1EMYr623FCWFJ6bQ=; b=gsqyX7whPpZrlPt9JkHqQVFO762Jm9CUARuIsKqs1UZx2lyq9RX509gSVcg0fgeKIW jFoWtJ6T8Mx4w5hOHEltOr9Wy1D2zkdY7/f4EcgW6m809eaTL3+7yNxv5v6GWqCVjv+S uXvJ6RAxGOSPcun8bAq+aE+gQ/y952Asw3bimFE9amsT1xvoyvHKGW/q2ILBhBUT9idw CI4DlfM0Hs8Npa5NcaQXDX7anWjVPNdH1H8npChqQxNS53Qu4WJ85tNvGkJv8Zkwk/Nj cvIKb3aBCcuDPNG9I+tS0vSbSJJdiyvVKXoA+84XLu/88OUIDxrQpbwpDLyZBbKPsRNF 5CLw== 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 s24si8042019plp.363.2019.04.30.06.47.20; Tue, 30 Apr 2019 06:47:37 -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 S1726687AbfD3Nov (ORCPT + 99 others); Tue, 30 Apr 2019 09:44:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:51764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbfD3Nou (ORCPT ); Tue, 30 Apr 2019 09:44:50 -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 A8DAC21670; Tue, 30 Apr 2019 13:44:47 +0000 (UTC) Date: Tue, 30 Apr 2019 09:44:45 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Linus Torvalds , 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: <20190430094445.13e61f41@gandalf.local.home> In-Reply-To: <20190430104648.GR2623@hirez.programming.kicks-ass.net> 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> <20190430104648.GR2623@hirez.programming.kicks-ass.net> 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 Tue, 30 Apr 2019 12:46:48 +0200 Peter Zijlstra wrote: > On Mon, Apr 29, 2019 at 02:52:50PM -0400, Steven Rostedt wrote: > > On Mon, 29 Apr 2019 11:06:58 -0700 > > Linus Torvalds wrote: > > > > > +void replace_call(void *addr, const void *opcode, size_t len, void *target) > > > +{ > > > + bp_int3_call_target = target; > > > + bp_int3_call_return = addr + len; > > > + bp_int3_handler_irqoff = emulate_call_irqoff; > > > + text_poke_bp(addr, opcode, len, emulate_call_irqon); > > > +} > > > > Note, the function tracer does not use text poke. It does it in batch > > mode. It can update over 40,000 calls in one go: > > Note that Daniel is adding batch stuff to text_poke(), because > jump_label/static_key stuffs also end up wanting to change more than one > site at a time and IPI spraying the machine for every single instance is > hurting. > > So ideally ftrace would start to use the 'normal' code when that > happens. Sure, but that's a completely different issue. We would need to solve the 'emulate' call for batch mode first. -- Steve