Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8382896imu; Tue, 4 Dec 2018 07:33:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/WYL2zgcd/4fCnfR0zlf6XTYpdLyNYXFE7XVfHm2BOg074xTEwtsspvuzVGUgnTq8KCBMce X-Received: by 2002:a17:902:a83:: with SMTP id 3mr19145398plp.276.1543937635815; Tue, 04 Dec 2018 07:33:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543937635; cv=none; d=google.com; s=arc-20160816; b=XZWKcjOEMYRfWJ1JTns5NxjSq0qPF1pK/Gx1ttdDS+Nv1L3VRZJyu8/Ps656iRY7Al ksiSYdOGsC6T0w8CL1yyHqpBD7Fn/ogwYb3dvHiJ/SFhSLIH62LpXV9bq4ZBY6zrqraR wJ+URN+aPnCCIiLJC6eeyxmEt9WERMv4vL3DfQ3FZWIvqmAEQCC9DobWmInB1Y2+Ipq3 3qu6hwynQBTu8wEUeUJHh4hotq2/yluf9E/0AlWuy69qDQ347UiU4mWS1nCK0Z7Norpf maUEcYxrN3lDk1fNLAaZ846dcjgOm6hKVZsY7z6tWGc1T2BEXtgajxXRTgcm+7I1Ag0x DVSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=55HiYE0M7S8I+z/SU1ZqK71WorVk8YQSV42r3+XB64U=; b=v77mXifX1JpBqetRlg4OdJD5EknstU8edxq4XIerU0T8jZkkOcma91BVdmecn2ytAZ EATp5W55b/hLxYkkLM06lVb0yDZ6ejO1E37Yu/exxmWJ1/i7yCmtzzbWnlF8axBlaa5o sqj12bAJGVpELYswrgNdDAXD9gk8yv0AGZa2Lzv7BLr4Gnqw9hzMYOkVAW3x9UOsVWa8 DFbpFvVbKQ2WsxXXwUSzJRpX4zDHBZ8eyZqq5/UAN48O9SOmrJMC9iJRTzzNMjYihNkq LXv6F26HAvBfoU6Ms9cSPapMrEew0ddamDFbbVLvdQHcjVEEKrJANETKm8k6gw4hrh7p Rm/w== 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 k186si16077716pgc.576.2018.12.04.07.33.40; Tue, 04 Dec 2018 07:33:55 -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 S1726949AbeLDPcG (ORCPT + 99 others); Tue, 4 Dec 2018 10:32:06 -0500 Received: from mx2.suse.de ([195.135.220.15]:34858 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726151AbeLDPcG (ORCPT ); Tue, 4 Dec 2018 10:32:06 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B4CF0AF84; Tue, 4 Dec 2018 15:32:03 +0000 (UTC) Date: Tue, 4 Dec 2018 16:32:03 +0100 (CET) From: Miroslav Benes To: Petr Mladek 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 In-Reply-To: <20181204144755.4hjextvlw6fqr4ee@pathway.suse.cz> Message-ID: References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-6-pmladek@suse.com> <20181204144755.4hjextvlw6fqr4ee@pathway.suse.cz> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 4 Dec 2018, Petr Mladek wrote: > 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. I let the others to judge if you failed or not, but I guess no one asked for the huge rewrite. I'm not asking for another one now. I only noticed a few things and I mentioned them. Regards, Miroslav