Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2807504imu; Mon, 17 Dec 2018 08:08:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/VJRtRUQiXc/r/P+0aoK+GRCmwLzvmQHRWJxzOc/FNH4lT/hprPXBbRaKPJGxCX87Dh6o+5 X-Received: by 2002:a62:75d1:: with SMTP id q200mr13334451pfc.254.1545062937876; Mon, 17 Dec 2018 08:08:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545062937; cv=none; d=google.com; s=arc-20160816; b=LdyfMYjXwYO8QVObN4BSKX6gKfa1BfofGMscQTmlYE7y6gGz4NDZwnUCgcT/yxhGjL WhOqKS33xU54jglx6x++AKA2Ly0AQuK+/JuW8KP+rRgi6oacK/CpHeTSOqHejYRP+L0U K8YS3ZN+j6p12M8bc6Uq+98CkNxwrZ4vNdJfhwG1BvxJDnRqwN9RQX352/rO/qfRHF3+ 8zTzxXaf8qD0xMYW33o3XQtlnmeNHfDGFL3OIConAxdHoyt0x9IoZajC3DfD9H6qZztn HnfqiXZMQ0RCb3DqyPP3vyt2VMUMeHMSYH7UutU3C6Ip1oQo6HVumcBtAyfybdhXw185 kBjQ== 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=Jsst0egwXnfaJ9PqbkpNbCVLuoGDLR3IXJ5YTUi0gKw=; b=qgv5VYqCR3JGKhjP0oMgGs5JsfhVYQGQY4qQHKXawXaALzrGETcuDD78XZG3u8BWRJ 9hkgP2TLzxX108JQgNAZL8BuleJNKrYjFKFGBcIivbqbwWfJlBcXNKb3DJJ1+O4yMLtP +ey1S7nsvD/VrxpbtVXRkDglNKPLpR20TpPrm11PuWqsaNp8659z/b5e4Ehm4KdRSjLW 5xszS1HnjQY5WHB2E7nt3Yx9SvzG9l2WqWbq9ohanWzOh71twTouah+77V1BAIfPT93d MTw3V8GaQoL/OkT2YUMwTq6IfZ1aucMovw7+4txQIcbzYtatb/Yn+QQRun747hf3GowM ZOPw== 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 l30si11143087plg.113.2018.12.17.08.08.42; Mon, 17 Dec 2018 08:08:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726667AbeLQQHM (ORCPT + 99 others); Mon, 17 Dec 2018 11:07:12 -0500 Received: from mx2.suse.de ([195.135.220.15]:39542 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727788AbeLQQHL (ORCPT ); Mon, 17 Dec 2018 11:07:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AF43BAF8E; Mon, 17 Dec 2018 16:07:09 +0000 (UTC) Date: Mon, 17 Dec 2018 17:07:09 +0100 From: Petr Mladek To: Josh Poimboeuf Cc: Jiri Kosina , Miroslav Benes , Jason Baron , Joe Lawrence , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 10/11] livepatch: Remove ordering and refuse loading conflicting patches Message-ID: <20181217160709.vnbxjo4mimy3dmm7@pathway.suse.cz> References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-11-pmladek@suse.com> <20181213230652.e2vn27qvqhumtaog@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181213230652.e2vn27qvqhumtaog@treble> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2018-12-13 17:06:52, Josh Poimboeuf wrote: > On Thu, Nov 29, 2018 at 10:44:30AM +0100, Petr Mladek wrote: > > The atomic replace and cumulative patches were introduced as a more secure > > way to handle dependent patches. They simplify the logic: > > > > + Any new cumulative patch is supposed to take over shadow variables > > and changes made by callbacks from previous livepatches. > > > > + All replaced patches are discarded and the modules can be unloaded. > > As a result, there is only one scenario when a cumulative livepatch > > gets disabled. > > > > The different handling of "normal" and cumulative patches might cause > > confusion. It would make sense to keep only one mode. On the other hand, > > it would be rude to enforce using the cumulative livepatches even for > > trivial and independent (hot) fixes. > > > > This patch removes the stack of patches. The list of enabled patches > > is still needed but the ordering is not longer enforced. > > > > Note that it is not possible to catch all possible dependencies. It is > > the responsibility of the livepatch authors to decide. > > > > Nevertheless this patch prevents having two patches for the same function > > enabled at the same time after the transition finishes. It might help > > to catch obvious mistakes. But more importantly, we do not need to > > handle situation when a patch in the middle of the function stack > > (ops->func_stack) is being removed. > > I'm not sure about this patch. I like the removal of the stacking. But > do we really want to enforce no dependencies between non-cumulative > patches? It can be done correctly if the user is careful. > > Maybe we should just let users do it if they want to. And then that > also would mean less code for us to maintain. > > And as usual, I apologize if I'm either contradicting or repeating past > versions of myself. :-) This patch was actually motivated by you. On some conference, we discussed how to automatize the creation of livepatches. You wanted to make livepatching more safe in general (by tools, by checks, ...). Also you always wanted to make things easier and reduce possible scenarios. I thought that this might be in line with your wishes. The problem with this patch is that it forces people to use cumulative patches. I am not sure if everyone is ready for it. I do not resist on it. But I still think that it makes sense. Best Regards, Petr