Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4082950yba; Mon, 29 Apr 2019 13:27:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQ3Ga+4qQOm466Jt2NTssCRzJre8cgk2sMVbSTg9+B+/pyrMFs+vvyVhpXDb5B5rrc/kbW X-Received: by 2002:a63:fd06:: with SMTP id d6mr61865777pgh.183.1556569624563; Mon, 29 Apr 2019 13:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556569624; cv=none; d=google.com; s=arc-20160816; b=RbJX1SBe1vl9pTpMx14q1x0pSE9LVtIxgCXy5uMzIiaYF5nTV9dvL9tJkrYmQyxKgu vOgeMk2HzR1p3y5Z7SDmSbXugFj74MVmwVKKvjQTYljrmdxgbUtdU+OWhd/ncrO0ljfI skQzAbNScceR0wmHGwuCymoIYMBtkt2IIuPJKF9ZHMk5Lo0CGaY+DUoFDrUKNo6tB+IM ygO7y7VPw8XMAKpOvJXDzKLtQEGNfcYzYDE5GkHjFbewnvsC0Ve4q+P2N2LpykNYq3Ve L2PSxzQ6+3sk+ODsyVP9pIV42cIe3L/Bz4O+6tdSuKHbCh806o5BLAdWw/NI6AS9hLb9 J8Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=w50mZSoHkn4YcdVSRzxMDCW63EO0vPkQ2Zrko7ZDpHk=; b=U3nFKj4UKGhG1I6cLzMogtu9kVyIcIfRDTo74KFN8jzCoN4j8vGK3KirfZx2NshjWk 5KWPTSKoB/k2szkRsPnUQ/sw5MAWZ3sXPRZUq4NWvbO0rrOv4l4FmrUWrjQMcYMuCRIo D+4Wj/vwKZcghawPAeFUsM/IEimQE4LTXoZu7+lQCzfgh4/MoXt3NCmOHF2NlIV/wdHQ bV6qoZoG1yiF2joitAnrI9tX5fiw1uWLPHFISzRJ13GMehUaliu7FUdGZleT5EsWUayY bsRQ36r64pVycd5jYbiEyYUWeHjoJ6W59lDj4dancfR/xgXZZpE1a7LLPOuwfV0Q5a1Y i1GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=AoO6Qi9m; 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 s7si21906361pgr.287.2019.04.29.13.26.49; Mon, 29 Apr 2019 13:27:04 -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=pass header.i=@linux-foundation.org header.s=google header.b=AoO6Qi9m; 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 S1729383AbfD2UZs (ORCPT + 99 others); Mon, 29 Apr 2019 16:25:48 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37203 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729252AbfD2UZs (ORCPT ); Mon, 29 Apr 2019 16:25:48 -0400 Received: by mail-lj1-f194.google.com with SMTP id b12so9449320lji.4 for ; Mon, 29 Apr 2019 13:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w50mZSoHkn4YcdVSRzxMDCW63EO0vPkQ2Zrko7ZDpHk=; b=AoO6Qi9m5Ef2LQWrXsqnatYGBHOrBL3A+gnuAsmezQFUMAvvmPyPcegTT9th39HlUb s0behpUfbgVFRk/qomTxJbvucaUEQ+T1StzlVKWLMf0QmKqLJwshHyUYFwvc5w4cct+e ULknvqmm/IVR0Nk7kkerKDJNE3EHy3hhGQff4= 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=w50mZSoHkn4YcdVSRzxMDCW63EO0vPkQ2Zrko7ZDpHk=; b=ZxQnChEi7PfwMupSmUBqlIK+j7k3D384mTZNqtfLTtke0TFExDJzA24TLv8aV4eVo5 YBXPK291tZGq7VcDW1VyR7rktx2j10xS+TnFQKXuuxKgcFk1AhMSFgph2TuW0M/dsJEU rdDpLyN9XX5u4/AUBbWafSLgW3mILZp+XlsCCbuLQMAwdF77RkSJoJI4rxWJqX7yVP9S 7j5LPd8ICtIF2VVQoD/+pGHKN/w3Vs1ZTSXgqa7hgBfNORSnOr9UMfqxxvYFlsUAz03L dIVM38NImKoC+zI0GUtHbCASIdUvn8XS1cGZ37l4nUWlvRD/1xmIDGPrclDl1esn9Vew ou5Q== X-Gm-Message-State: APjAAAUwzrElqptzghlAkf2ESxKHka6k1K5zGPkxKNcCWBhs5RTwJevg m+v/85Auo+/K+4Zq0kHK/g3hUwWQvc8= X-Received: by 2002:a2e:3815:: with SMTP id f21mr10741307lja.25.1556569545816; Mon, 29 Apr 2019 13:25:45 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id q15sm2201559lfh.59.2019.04.29.13.25.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 13:25:45 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id f23so10675723ljc.0 for ; Mon, 29 Apr 2019 13:25:45 -0700 (PDT) X-Received: by 2002:a2e:8090:: with SMTP id i16mr8383998ljg.135.1556569221934; Mon, 29 Apr 2019 13:20:21 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Linus Torvalds Date: Mon, 29 Apr 2019 13:20:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/4] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation To: Steven Rostedt 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 29, 2019 at 1:06 PM Linus Torvalds wrote: > > Only do the 'call' instructions one at a time. Why would you change > _existing_ code? Side note: if you want to, you can easily batch up rewriting 'call' instructions to the same target using the exact same code. You just need to change the int3 handler case to calculate the bp_int3_call_return from the fixed one-time address to use sopmething like this_cpu_write(bp_call_return, int3_address-1+bp_int3_call_size); instead (and you'd need to also teach the function that there's not just a single int3 live at a time) Linus