Received: by 10.223.176.5 with SMTP id f5csp1935184wra; Wed, 31 Jan 2018 13:57:42 -0800 (PST) X-Google-Smtp-Source: AH8x227kLDtYywTHywEQlD0i6Oqs86GCVE/Aem655MG7vaAxyV/7mlYC4fTIGmLyViHEuFWq8MPh X-Received: by 10.99.108.8 with SMTP id h8mr28155187pgc.46.1517435862069; Wed, 31 Jan 2018 13:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517435862; cv=none; d=google.com; s=arc-20160816; b=EpnGnRZ1DxpKP05b1AYPRM9gBhJeUVxbkwFdiZwHgMLYQfNwFjT9t/nlXbh50E4XHF ldRlBJuPnQxuDTOSBAARn+0DKXQVs17S11iTjNCddoNj3sk7eO/8kYGgpZemsLAOHmLT agNfgvYXy+MImLlFs/Cmfla8xvOEfa2IUefDE1NgJ8ViOwkpz4536Y2BwJMBwDk7obXp +RkFyAfeTa91tR7A781lDNVJHEZfrYoqB0e+jtGOhpILaxRL9AP4lvMAFXqORDLUmUQO rIhT8JqNtw4n1vrs1aZVIsJw4vjFXjVaeH0ZsxwU4sZT1Zw0J9G9RayIS0JJUyxLeFd6 Tcsw== 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=kOeLL7krIOCdTzDgciAwkm8lUbaVofe5TU37cbvmouU=; b=VBebBVr/h1dvwdBrIhkzHvHRRInV9bW7HC/9nslHitgtePf0GMTGUHD1XFNk7YKaya eMCf+JQZ+GjqFTNtJtHq/BTX5NggzkAH27u8BnRiDlM7AgdydVyqH8nF3gNmPhivESjA wEQSHJ9oWPmiEEQ5t5myCjYFd0ZszZ/tOB8z0N62PvJljNRtAjUQpnpDWa7DQ72zbrah U0JxjRWNLJnf00cgkXNLCtI5SoeiqOMnL04NsyLoUtHj53FZzEoVQ2ePI+v7lf3CwSm4 Jyz+aF/EwLPMxkkSUikXGNOG9MmZPR5/N64d/21A2k2kd1C4CS7cH9ZnZiAoqcWu0RJX EF+A== 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 k1si2386205pgs.339.2018.01.31.13.57.27; Wed, 31 Jan 2018 13:57:42 -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 S1753370AbeAaVzV (ORCPT + 99 others); Wed, 31 Jan 2018 16:55:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753240AbeAaVzU (ORCPT ); Wed, 31 Jan 2018 16:55:20 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B10B68699; Wed, 31 Jan 2018 21:55:20 +0000 (UTC) Received: from treble (ovpn-123-186.rdu2.redhat.com [10.10.123.186]) by smtp.corp.redhat.com (Postfix) with SMTP id 1982860467; Wed, 31 Jan 2018 21:55:18 +0000 (UTC) Date: Wed, 31 Jan 2018 15:55:18 -0600 From: Josh Poimboeuf To: Evgenii Shatokhin Cc: Petr Mladek , jikos@kernel.org, mbenes@suse.cz, Jason Baron , jeyu@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: PATCH v6 6/6] livepatch: Add atomic replace Message-ID: <20180131215518.cwcxs2atfuzimyxt@treble> References: <20180125160203.28959-1-pmladek@suse.com> <20180125160203.28959-7-pmladek@suse.com> <3e93e7b5-3077-9f03-ae89-55394e70da39@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3e93e7b5-3077-9f03-ae89-55394e70da39@virtuozzo.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 31 Jan 2018 21:55:20 +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 01:33:04PM +0300, Evgenii Shatokhin wrote: > > + The callbacks from the replaced patches are not called. It would be > > pretty hard to define a reasonable semantic and implement it. > > At least, it surely simplifies error handling, if these callbacks are not > called. > > Anyway, I guess, this restriction should be mentioned explicitly in the > docs. I think this is not obvious for the patch developers (esp. those > familiar with RPM spec files and such ;-) ). > > What concerns me is that downgrading of the cumulative patches with > callbacks becomes much more difficult this way. > > I mean, suppose a user has v1 of a cumulative patch installed. Then a newer > version, v2, is released. They install it and find that it is buggy (very > unfortunate but might still happen). Now they cannot atomically replace v2 > back with v1, because the callbacks from v1 cannot clean up after v2. > > It will be needed to unload v2 explicitly and then load v1 back, which is > more fragile. The loading failures are much more unlikely with livepatch > than with the old kpatch, but they are still possible. > > I have no good solution to this though. I think the solution is to build a v3, which is basically identical to v1, except it also has callbacks for cleaning up after v2, if necessary. It should also be smart enough to deal with the case that v2 was not installed beforehand. -- Josh