Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp859640ybe; Thu, 5 Sep 2019 07:02:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1R13p2LtM7LLvFaedPkdhWYb7Jh9Q0NK2R9KS/1iIVz50aLcXmJCoH3VaS5wWtNdU1BFj X-Received: by 2002:a63:5807:: with SMTP id m7mr3274757pgb.371.1567692168926; Thu, 05 Sep 2019 07:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567692168; cv=none; d=google.com; s=arc-20160816; b=RKwRq31zhxOC2y6QlzhQI5O6hYfL/XN1zmTlHOwKv2D7NBi8YHosxO+wvCpTlzYhTm Zz5vk/QH3rCe+TcUeo+gxywUHpreYBrJRA4zDi2JJPFZJP/H95litI0Q1Vmyoi06sAmZ 8Ea0CnffUhKknpGUczXz3/LZ+m5Mlho8Rq/yjHRasMAtc79PU4StGs6TwaGWRzEBNByd /IJog4qJ29/3vI+jr0WYDLPgAL9d9aRUQmlETkETvxbXd9OK7Wzu2mngne2uVNPLv74o MQSImeFrNlzGkm517vmLi7lizlL+gQ3BIxt7fwEAuXVXV8yH+SJQmrLaHcmDNMmJM/GA 5LtQ== 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; bh=yayH4SutpEELko6/6SzpQ7xU1cMMo/P5Ar8QxbCbtwQ=; b=m+4ZhHRCHWUreFuNu0BpgscOMqDd4vAQKho/DnhNfm8u223A9fgf3qtm2cFQQuvdTN o5eQnFiR9hZVwZLuQ4uu26iirBzCQbXuFUFeO1aZBRazA1SvbtghQEYeUlzUmhkdhKlW TCD8LX7rh9FFljXtYOxsHy2Jr6q820go9dXbPeHDaynzY+0cxb1LC/qVgZW7LIYod4F+ vobFyGKdgKsWEE7xlnIZCdTfHl/6nxJ1KRJH5W/6HbDaChq4SXOr8KIvpZjraBJU2Ehf 9HJEFqovBiUS0MqOnp2Lz9h11iccdLzpsbqmceaOIjw3nUiSei3/UmNWFRMj5OwL1rEi WVTQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c137si1874306pga.80.2019.09.05.07.02.30; Thu, 05 Sep 2019 07:02:48 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388793AbfIENXv (ORCPT + 99 others); Thu, 5 Sep 2019 09:23:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56044 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731733AbfIENXv (ORCPT ); Thu, 5 Sep 2019 09:23:51 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B66B190C10E; Thu, 5 Sep 2019 13:23:51 +0000 (UTC) Received: from treble (ovpn-120-170.rdu2.redhat.com [10.10.120.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51A725D9E1; Thu, 5 Sep 2019 13:23:47 +0000 (UTC) Date: Thu, 5 Sep 2019 08:23:44 -0500 From: Josh Poimboeuf To: Jiri Kosina Cc: Petr Mladek , Joe Lawrence , Miroslav Benes , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [RFC PATCH 2/2] livepatch: Clear relocation targets on a module removal Message-ID: <20190905132344.byfybt6s42cajtfz@treble> References: <20190822223649.ptg6e7qyvosrljqx@treble> <20190823081306.kbkm7b4deqrare2v@pathway.suse.cz> <20190826145449.wyo7avwpqyriem46@treble> <5c649320-a9bf-ae7f-5102-483bc34d219f@redhat.com> <20190904084932.gndrtewubqiaxmzy@pathway.suse.cz> <20190905025055.36loaatxtkhdo4q5@treble> <20190905110955.wl4lwjbnpqybhkcn@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Thu, 05 Sep 2019 13:23:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 05, 2019 at 01:19:06PM +0200, Jiri Kosina wrote: > On Thu, 5 Sep 2019, Petr Mladek wrote: > > > > I don't have a number, but it's very common to patch a function which > > > uses jump labels or alternatives. > > > > Really? My impression is that both alternatives and jump_labels > > are used in hot paths. I would expect them mostly in core code > > that is always loaded. > > > > Alternatives are often used in assembly that we are not able > > to livepatch anyway. > > > > Or are they spread widely via some macros or inlined functions? > > All the indirect jumps are turned into alternatives when retpolines are in > place. Actually in C code those are done by the compiler as calls/jumps to __x86_indirect_thunk_*. But there are still a bunch of paravirt patched instructions and alternatives used throughout the kernel. -- Josh