Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10468902imu; Thu, 6 Dec 2018 01:26:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/WbSYdbwuejeQ7gwxwkyxTnGykFLAY0LOQGIO+3ModkdqNQEC0X527sMjf8VQL82ECpsKpr X-Received: by 2002:a63:e516:: with SMTP id r22mr23937389pgh.256.1544088381965; Thu, 06 Dec 2018 01:26:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544088381; cv=none; d=google.com; s=arc-20160816; b=RmLz4es3AiXVbVz+p4pBJdUiegvYweNLwmA8EoB+yGw87Dt3RAdqmB1727IkhRDwDT L48DDrMW85yvDP7DcS3yUuV7XnIaPOpHOAV3kx/bPUYh9lsZg7sGFco4BtbNVqJfcbvN X+lEU2ciRMYCrUStCWyXoroUg0WUZwIkfUW1bqMe+e5D+5ToUB4wJrfic88HnT3vTkae HmQYWF5RzGxPSx3WxruPyFLwROek6Pqv9NkCfGuLYO7KlTlMB4xPjfY9ZVKyTHq/xS8o /qAdRnNPqYk0CY8iikqFLiAdrD19H8GKm1iRqX1fpeeGUD0bsyj6/ujav+yPZ9fLVNj1 ouhg== 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=z3tGewlCyQT+HEUoFnDCCZYVLPS6F86f1PXHsrn86bI=; b=GISs5zzxXo9QfGqOKzte7OVnIPPjYIrjpD8+15+MCej4Omwy65v3ldEIzWZWS+u6ep abtSX8xtq2e7z2JruZXb90sq2FqoduhdPxqscrBalfJy3aaPpQLAV37OYZ4X0oDRypaZ IS8Ar8jy3oWOm/dzv368DY+Sh4cgpuZPUiw0kx4jz61AWIPH58sEKVX8ZCRtLubHK/VS T6qkqAC8idDHKeJ0tSU9O1SGLuigXj75BmIKAEGm2jjtcljhKQvfrrdHTAmvvIxSZk0h tEguupJB0WrFIhlIo+KVBT0vNoqv9v5FAOBAAiYeMBSd+7VxczTemuq8JFtqQjx0yPkW RX7Q== 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 b6si21027816pgg.2.2018.12.06.01.26.06; Thu, 06 Dec 2018 01:26:21 -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 S1729357AbeLFJXo (ORCPT + 99 others); Thu, 6 Dec 2018 04:23:44 -0500 Received: from mx2.suse.de ([195.135.220.15]:54770 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727783AbeLFJXo (ORCPT ); Thu, 6 Dec 2018 04:23:44 -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 6548AAF41; Thu, 6 Dec 2018 09:23:42 +0000 (UTC) Date: Thu, 6 Dec 2018 10:23:40 +0100 (CET) From: Miroslav Benes To: Petr Mladek cc: Joe Lawrence , Jiri Kosina , Josh Poimboeuf , Jason Baron , 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: <20181206082814.uyzjw2q4avknhswd@pathway.suse.cz> Message-ID: References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-6-pmladek@suse.com> <20181205193253.mhlqj37r4o6ukkhp@redhat.com> <20181206082814.uyzjw2q4avknhswd@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 Thu, 6 Dec 2018, Petr Mladek wrote: > On Wed 2018-12-05 14:32:53, Joe Lawrence wrote: > > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > > > index 972520144713..e01dfa3b58d2 100644 > > > --- a/kernel/livepatch/core.c > > > +++ b/kernel/livepatch/core.c > > > @@ -45,7 +45,7 @@ > > > */ > > > DEFINE_MUTEX(klp_mutex); > > > > > > -/* Registered patches */ > > > +/* Actively used patches. */ > > > LIST_HEAD(klp_patches); > > > > By itself, this comment makes me wonder if there are un-active and/or > > un-used patches that I need to worry about. After this patchset, > > klp_patches will include patches that have been enabled and those that > > have been replaced, but the replacement transition is still in progress. > > > > If that sounds accurate, how about adding to the comment: > > > > /* Actively used patches: enabled or replaced and awaiting transition */ > > The replaced patches are not in the list. This is why I used the word > "actively". The replaced patches are removed in klp_discard_replaced_patches(), which is called from klp_complete_transition(). Joe is right. The patches are in the list if a transition is still in progress. Miroslav > /* > * Actively used patches: enabled or in transition. Note that replaced > * or disabled patches are not listed even though the related kernel > * module still can be loaded. > */