Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751685AbdG0UoB (ORCPT ); Thu, 27 Jul 2017 16:44:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40578 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641AbdG0Un7 (ORCPT ); Thu, 27 Jul 2017 16:43:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7F01FC0ED2ED Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=joe.lawrence@redhat.com Subject: Re: [PATCH] livepatch: add (un)patch hooks To: Josh Poimboeuf , Petr Mladek Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Jessica Yu , Jiri Kosina , Miroslav Benes , Chris J Arges References: <1499868600-10176-1-git-send-email-joe.lawrence@redhat.com> <1499868600-10176-2-git-send-email-joe.lawrence@redhat.com> <20170717155144.GF32632@pathway.suse.cz> <20170719204952.4fyhtig3rbw7z4w4@treble> <20170720041723.35r6qk2fia7xix3t@treble> From: Joe Lawrence Organization: Red Hat Message-ID: Date: Thu, 27 Jul 2017 16:43:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170720041723.35r6qk2fia7xix3t@treble> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 27 Jul 2017 20:43:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 880 Lines: 27 On 07/20/2017 12:17 AM, Josh Poimboeuf wrote: > - The pre-patch and pre-unpatch hooks can be run before the > patching/unpatching process begins. Hi Josh, By "(un)patching process" are you referring to the klp_patch at large or each klp_object? ie, would all klp_objects execute their hooks before anything is (un)patched? Just trying to clarify. > - The post-patch and post-unpatch hooks will need to be run from either > klp_complete_transition() or klp_module_coming/going(), depending on > whether the to-be-patched module is already loaded or is being > loaded/unloaded. You're suggesting that post-(un)patch-hooks: 1 - Notify klp_objects when a KLP_(UN)PATCHED transition completes and for subsequently loaded klp_objects (ie modules): 2 - On load - notify it with current KLP_(UN)PATCHED state, Steady state - same as (1) above. Thanks, -- Joe