Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9837370imu; Wed, 5 Dec 2018 11:06:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/VDMnIuVNKz+DYxaJf8vx7DIWvfwNCGSkJmhUgd0NxGq9Hx44K1oTpYJbyPyNDd2JiuSh9O X-Received: by 2002:a63:160d:: with SMTP id w13mr22076430pgl.43.1544036766742; Wed, 05 Dec 2018 11:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544036766; cv=none; d=google.com; s=arc-20160816; b=tY9Og4vysS+5Tw8DT7d+JzQVwQCcgxK2dn8Q1l/0l7d7bCaJx4YtGZsrpqLbG8mlbz 78pNUgzmXYlfxha/FgvveE9tHoFxgSKcAd8XGiri+QZFsQSyVxOU+0lwD3MPgTGZoF9a BZxFOQULXf93rHYgA5pPkKIiChqOURjH8S6ISDDXoInT15susolOHfhQr0PMt0i6KzBH aGGTzE55vYpLceppXQI3UMtjx8bVdkW0TSP8ysO1jYxpPivcVpr7bCZtX5wwSmmoIWGL dFxwvK20rR2rfLJji0xKsDw+vFK6rNuDRNRCG2cYI0Vg6kYPAsq/5RZlxdUIUTTEll6M 5OGA== 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=BXbp0LMO0aZr1Hd7tGAm4W2qNsy2+Oh+vvCiEvu1nOM=; b=tvZQLSgUWMl/wwPtDJW20syJUZpZMj+aFZnLftjn0vigu+xAdGHRiwBVuU1vPCYQaR +/rwNc7HMI0/Fuu7UDstyfqRYypDosvAO3Z8K/SzqhQMfyApp4CvKgVzEj+rpYBNv2Zw X5v23tn56U6IyV00IzZxKPjcMAe8NspEg3k7JLRj9GQRTCUwpc6dIsefipzKuPjpXM4g eBUZPIrH5ty039+p/TW1MiDgLl5W6SOSooRI6c9NjuBb62j1zvei73Z5HI297tE4pSpm SLa5dGmkQLC8DbOdhDvjk/xcyomqSFXMb8FeCLogQFJ0/qcyqD0fFsBQUaTWOpYkNUCL Q36A== 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 m3si20091446pfh.58.2018.12.05.11.05.49; Wed, 05 Dec 2018 11:06:06 -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 S1728151AbeLETFI (ORCPT + 99 others); Wed, 5 Dec 2018 14:05:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727402AbeLETFI (ORCPT ); Wed, 5 Dec 2018 14:05:08 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DACE34E928; Wed, 5 Dec 2018 19:05:07 +0000 (UTC) Received: from redhat.com (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7A2F60BEE; Wed, 5 Dec 2018 19:05:06 +0000 (UTC) Date: Wed, 5 Dec 2018 14:05:06 -0500 From: Joe Lawrence To: Petr Mladek Cc: Jiri Kosina , Josh Poimboeuf , Miroslav Benes , Jason Baron , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 04/11] livepatch: Refuse to unload only livepatches available during a forced transition Message-ID: <20181205190506.o7feg4y7m7t7eyp7@redhat.com> References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-5-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181129094431.7801-5-pmladek@suse.com> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 05 Dec 2018 19:05:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 10:44:24AM +0100, Petr Mladek wrote: > module_put() is currently never called in klp_complete_transition() when > klp_force is set. As a result, we might keep the reference count even when > klp_enable_patch() fails and klp_cancel_transition() is called. > > This might make an assumption that a module might get blocked in some ^^^^^^^^^^^^^^^^^^ re-wording suggestion: "give the impression" > strange init state. Fortunately, it is not the case. The reference count > is ignored when mod->init fails and erroneous modules are always removed. > > Anyway, this might make some confusion. Instead, this patch moves ^^^^^^^^^^^^^^^^^^^ re-wording suggestions: "create confusion" or "be confusing" > the global klp_forced flag into struct klp_patch. As a result, > we block only modules that might still be in use after a forced > transition. Newly loaded livepatches might be eventually completely > removed later. > > It is not a big deal. But the code is at least consistent with > the reality. > > Signed-off-by: Petr Mladek Acked-by: Joe Lawrence -- Joe