From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761392AbdAJJK6 (ORCPT ); Tue, 10 Jan 2017 04:10:58 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43474 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761323AbdAJJKz (ORCPT ); Tue, 10 Jan 2017 04:10:55 -0500 Subject: Re: [PATCH v3 08/15] livepatch: separate enabled and patched states To: Josh Poimboeuf , Jessica Yu , Jiri Kosina , Miroslav Benes , Petr Mladek References: Cc: 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 From: Kamalesh Babulal Date: Tue, 10 Jan 2017 14:40:41 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17011009-0012-0000-0000-0000020210D7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17011009-0013-0000-0000-000006C8D66D Message-Id: <3f6e85b4-dcd1-ee45-1cd6-144b6db7d51b@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-10_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701100130 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 08 December 2016 11:38 PM, 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 Reviewed-by: Kamalesh Babulal -- cheers, Kamalesh.