Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8333718imu; Tue, 4 Dec 2018 06:50:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/XBM2uP6pTXSzzleUcc7XZppOeKks28Prv+a3zIQdWRThBEd3yr3M4lubYstfrWsBARR/ok X-Received: by 2002:a63:f959:: with SMTP id q25mr17167622pgk.315.1543935010415; Tue, 04 Dec 2018 06:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543935010; cv=none; d=google.com; s=arc-20160816; b=Awqp2ohrczb+3nSIGKF3O2o9tAnPwpIT1E+gn3S/AnsTLhVICq4sTb9r/O7yuXZl+T G4bUYD9eiWWAWcNHkOTrK2dBcTlyKI2hqKZv1GO1K5jY3yNbU3AeTt0m9FleCMh6+D+a XW+84IaeFUE0rjS0qWuHug5+71kk1nClwwXJKJJIQvekb6GDIuLYqlFcY5+n6+jMLCJI aySzQQMK4EU/VgdmxK26PycS2yaPmepGj9fvPbLkbYsleDNquKbkS0aJcgvPsH4Ty3Ay N3eEa+5H+rGZ4yvUw7u1bZjOvbtZRGKA5Imh344AqT/0oNZwTeBhI/IipES9krNykK+S LVcQ== 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=3OXZGZ7Z3oaxW8L5MaXRh1aknjlIkBthV96QrIbJvqg=; b=HSRO6NGZxyZ9kQxMqzD4cuY2k6hftxQZQw0jBlmmwr10vpTFs785uEoEa4juRNCkh8 dr3r1R69I1MUsf2GImMRGET/0JL9JM8Fm4OgAL4kwjer1z7rBT8Hnw4vXSHdAirBgW5K HZWs47hhibymEVoTKa2a2zUy3em2n5xwaYXEK38disZBSOcFlQHDbXONQAvkzJvDZ7ou 8Y0cs4xBBZyZ2X5cbAXsEgARrr7xGKbxcHYEnKSx25GsYvSmv5JGaK0ixYCFj2fBjFtI HAWpl1pjUb3ddbQo4JW3GMtbF6BcgK9gJZt+rWB5HbndRUEbPikzVMLz7gdQSgZBJmZR i3jw== 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 t13si15997576pgm.175.2018.12.04.06.49.54; Tue, 04 Dec 2018 06:50:10 -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 S1726504AbeLDOsA (ORCPT + 99 others); Tue, 4 Dec 2018 09:48:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:55384 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726064AbeLDOsA (ORCPT ); Tue, 4 Dec 2018 09:48:00 -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 855DAACCF; Tue, 4 Dec 2018 14:47:55 +0000 (UTC) Date: Tue, 4 Dec 2018 15:47:55 +0100 From: Petr Mladek To: Miroslav Benes Cc: Jiri Kosina , Josh Poimboeuf , Jason Baron , Joe Lawrence , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 05/11] livepatch: Simplify API by removing registration step Message-ID: <20181204144755.4hjextvlw6fqr4ee@pathway.suse.cz> References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-6-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue 2018-12-04 13:54:55, Miroslav Benes wrote: > > diff --git a/Documentation/livepatch/livepatch.txt b/Documentation/livepatch/livepatch.txt > > index 2d7ed09dbd59..d849af312576 100644 > > --- a/Documentation/livepatch/livepatch.txt > > +++ b/Documentation/livepatch/livepatch.txt > > @@ -12,12 +12,11 @@ Table of Contents: > > 4. Livepatch module > > 4.1. New functions > > 4.2. Metadata > > - 4.3. Livepatch module handling > > 5. Livepatch life-cycle > > - 5.1. Registration > > + 5.1. Loading > > 5.2. Enabling > > 5.3. Disabling > > - 5.4. Unregistration > > + 5.4. Removing > > 6. Sysfs > > 7. Limitations > > > > @@ -298,117 +297,91 @@ into three levels: > > see the "Consistency model" section. > > > > > > -4.3. Livepatch module handling > > ------------------------------- > > - > > -The usual behavior is that the new functions will get used when > > -the livepatch module is loaded. For this, the module init() function > > -has to register the patch (struct klp_patch) and enable it. See the > > -section "Livepatch life-cycle" below for more details about these > > -two operations. > > - > > -Module removal is only safe when there are no users of the underlying > > -functions. This is the reason why the force feature permanently disables > > -the removal. The forced tasks entered the functions but we cannot say > > -that they returned back. Therefore it cannot be decided when the > > -livepatch module can be safely removed. When the system is successfully > > -transitioned to a new patch state (patched/unpatched) without being > > -forced it is guaranteed that no task sleeps or runs in the old code. > > Is the change necessary? The documentation in v13 looked ok and I am not > sure if it is better now. Only my opinion though and I understand why you > changed it. The huge rewrite was triggered by an innocent Josh's comment, see https://lkml.kernel.org/r/20181017190657.dv3kwx467brzhdnz@treble I made a big effort to rework the text. I wanted to explain the difference between the module loading/unloading and the livepatch enabling/disabling in a better structured and hopefully easier to understand way. It is possible that I failed. But let's put it the following way. I refuse to do any other big rework of the documentation in this patchset. If anyone has a better idea, please provide alternative text or a patch. Please, do not take it wrong. I really appreciate your review and feedback. I am just a bit frustrated that my English or documentation capabilities are not good enough. I am scared that the patchset might get ready on v135 in 2025. And I will get a visit from Mudr. Chocholousek [1] in the meantime. [1] I am sorry for mentioning a person from a famous Czech film. I was not able to find any good explanation in English. I just found the following scene of the main character that was later being chaised by Mudr. Chocholousek: https://www.youtube.com/watch?v=NGjBlwHvs0Y Best Regards, Petr