From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762024AbcLPQVF (ORCPT ); Fri, 16 Dec 2016 11:21:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:33990 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760636AbcLPQVD (ORCPT ); Fri, 16 Dec 2016 11:21:03 -0500 Date: Fri, 16 Dec 2016 17:21:00 +0100 From: Petr Mladek To: Josh Poimboeuf Cc: Jessica Yu , Jiri Kosina , Miroslav Benes , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michael Ellerman , Heiko Carstens , x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Vojtech Pavlik , Jiri Slaby , Chris J Arges , Andy Lutomirski , Ingo Molnar , Peter Zijlstra Subject: Re: [PATCH v3 08/15] livepatch: separate enabled and patched states Message-ID: <20161216162100.GH393@pathway.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2016-12-08 12:08:33, Josh Poimboeuf wrote: > Once we have a consistency model, patches and their objects will be > enabled and disabled at different times. For example, when a patch is > disabled, its loaded objects' funcs can remain registered with ftrace > indefinitely until the unpatching operation is complete and they're no > longer in use. > > It's less confusing if we give them different names: patches can be > enabled or disabled; objects (and their funcs) can be patched or > unpatched: > > - Enabled means that a patch is logically enabled (but not necessarily > fully applied). > > - Patched means that an object's funcs are registered with ftrace and > added to the klp_ops func stack. > > Also, since these states are binary, represent them with booleans > instead of ints. > > Signed-off-by: Josh Poimboeuf Makes sense. The patch is pretty straightforward. Reviewed-by: Petr Mladek Best Regards, Petr