Received: by 10.223.176.5 with SMTP id f5csp1955352wra; Wed, 31 Jan 2018 14:14:37 -0800 (PST) X-Google-Smtp-Source: AH8x224wJn02iHLZAYq/fo/mxQZE0SvIyTzGlebvzw4rgR100LS6XZnGZgNtnM5n+gc8v/c7TUWe X-Received: by 10.98.202.84 with SMTP id n81mr34635596pfg.226.1517436877778; Wed, 31 Jan 2018 14:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517436877; cv=none; d=google.com; s=arc-20160816; b=kgat7/XZBs+gpZNQiqRJwThAJJPsHJCcybcLNuC9LhCbfwZQlgUxRRXIXFbB5zAwTW SJe3BM060opDx0fRBxBCfkGlm9EOZFWwlYVD4iYFfpfZc2xBuGQa16Sy7785x7ZFwUAx ucueyjN91LNbq65BQ1zXwPAnQDV5kgA46eNQYo3ZjlrSfvrvfDfrpwBUPIvgwpoDJsX4 CO0oubwVyUABjMWmmFQnZRQ0S5Qm0snkgDsJDWO1e1rxw0ycBbcWLFxf6xOJCmVkGGRZ iooO08QxGBlDEiWVvWUKi5YL/BmPYYCIOX23D/IXubHQ1gR0UrIi/3Gu2MoMUhrOp9vP Rl1w== 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:arc-authentication-results; bh=N2mjlfXPFAzHJrUmI4PJfPW5ZHM06RmlHwXhpwR0eBk=; b=hrsbqBNVeZ/Y1TAJCGO8wrpDFm0zJ5gfHxCrfbGWknlwtuCRkJTlqQ1fKjZ6qEIwbm PX45jwT+ayKMpgfuqPMF1iCk+chZRRHmNw2ktd10xM8mv6UyyBiC3kbUo2oJ0DJUOHTO MxuuELEW/kucBPy/CEzez4Nm6vrv6KxXN9Yqs9WzeO9F6oyB0NRu5qNawKuRneye4cIc oBFGWLl0UBa+SStFf2RxP9lzBos/Dw/bXqbfJKagM1AU4kmMXhBbJN7tIW3fBmcMGb+q 0SeyUa2UUfGHu4YZJwv0IWjSni32a5VpmskbwiGrp5croJ1GEUi4eXPAfi/o8QcL1ReE v6YA== 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 j75si11787432pgc.156.2018.01.31.14.14.22; Wed, 31 Jan 2018 14:14:37 -0800 (PST) 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 S1753399AbeAaWIR (ORCPT + 99 others); Wed, 31 Jan 2018 17:08:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51362 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbeAaWIP (ORCPT ); Wed, 31 Jan 2018 17:08:15 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A706E4B708; Wed, 31 Jan 2018 22:08:15 +0000 (UTC) Received: from treble (ovpn-123-186.rdu2.redhat.com [10.10.123.186]) by smtp.corp.redhat.com (Postfix) with SMTP id 8564A60BE3; Wed, 31 Jan 2018 22:08:11 +0000 (UTC) Date: Wed, 31 Jan 2018 16:08:11 -0600 From: Josh Poimboeuf To: Petr Mladek Cc: Jason Baron , Evgenii Shatokhin , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, jeyu@kernel.org, jikos@kernel.org, mbenes@suse.cz, joe.lawrence@redhat.com Subject: Re: [PATCH v5 0/3] livepatch: introduce atomic replace Message-ID: <20180131220811.isgqpf3gwrsnul5k@treble> References: <86cac2eb-0de4-bae7-f633-5ad03297880d@akamai.com> <20180126102326.u5jscbbgburrzatp@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180126102326.u5jscbbgburrzatp@pathway.suse.cz> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 31 Jan 2018 22:08:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 26, 2018 at 11:23:26AM +0100, Petr Mladek wrote: > So, we are talking about a lot of rather non-trivial code. > IMHO, it might be easier to run just the callbacks from > the new patch. In reality, the author should always know > what it might be replacing and what needs to be done. > > By other words, it might be much easier to handle all > situations in a single script in the new patch. Alternative > would be doing crazy hacks to prevent the older scripts from > destroying what we would like to keep. We would need to > keep in mind interactions between the scripts and > the order in which they are called. > > Or do you plan to use cumulative patches to simply > get rid of any other "random" livepatches with something > completely different? In this case, it might be much more > safe to disable the older patches a normal way. > > I would suggest to just document the current behavior. > We should create Documentation/livepatch/cummulative-patches.txt > anyway. +1. Only the new patch (hopefully) knows the details about what is being reverted. So it makes sense to ignore the replaced patch's callbacks, and to only call the new patch's callbacks. -- Josh