Received: by 10.223.176.5 with SMTP id f5csp319564wra; Tue, 30 Jan 2018 12:03:01 -0800 (PST) X-Google-Smtp-Source: AH8x224QPzn6hoxskzMI4TVN8D2716R5d2z0cxzT86S0lLbErL1mi/kpbIN3keCztEpP3isBAwBI X-Received: by 2002:a17:902:6bca:: with SMTP id m10-v6mr25741774plt.351.1517342581779; Tue, 30 Jan 2018 12:03:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517342581; cv=none; d=google.com; s=arc-20160816; b=lY1aSrQ8gyONHwBuvLJ3wTaSPjRY29NsmsokFIEbzLdCxCxh9AZKqSh+B6GFxmWjf0 ZOmjTTwzC0GiuWXzDpkwZFoGvarlxjSTECTq1R34vyjYMRESN5fxV0fHfcHzqapHIy+9 Zg1/eYZKvig0QW+4vkZ29M2rmY4q3VDvip1VUOuNOETi8iUo6TWn9Y9N7GHx1pL72Gpd 9Bqd0g/9RK+0BLsKlQnfOt1LB4aGY4kRZGUiaJ/L+wcx8shdhrAMZcUX67qrJM7zTJkm +qGxC6fcNXEaA+k8jPl39J0ZJEVQXCGOXPKf0nAyfYXBFdKdGE+tPbMM9zXtAj2B6y+7 BcSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=3dOi7gMSWusaO7i6dfPbuXuwEHg4/z9lxM2o80RwrMU=; b=PwMhm0g/20ToPgBCBbhSyFBBbGtTSy3wm6hjFFqho3wsZ/aH4vZrPDEGr8BPXMEFIK GDLm26sUZ4RVsOBFNST3UswS5mYx32eoNYHDBBGGCaEIbHrDgrtyWD7Cjnc83ZvnuCuH x+MDDzMDxxWMKdL0OYt2zYqB37iSU52GiBH2GVqgL8lPa/rxYowEDQxH0mTg1PWS+ytD GH1rQZv8vV/Ikt090fUdh6DzH/EANwpmHA0WrGC5yatg69Bx24QcAFxosV4a7ggm7k// vTmRIz5fGBLkMFPtqs1zvP7++B4A8omqB5jmWbA7r/jRDjBNx+Q45wZdzXown3LSaoqz 5ETQ== 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 s22si504998pfh.396.2018.01.30.12.02.46; Tue, 30 Jan 2018 12:03:01 -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 S1753016AbeA3TYR (ORCPT + 99 others); Tue, 30 Jan 2018 14:24:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35912 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621AbeA3TYP (ORCPT ); Tue, 30 Jan 2018 14:24:15 -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 09D7A3DBE1; Tue, 30 Jan 2018 19:24:15 +0000 (UTC) Received: from jlaw-desktop.bos.csb (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C2E0608F1; Tue, 30 Jan 2018 19:24:14 +0000 (UTC) Subject: Re: [PATCH v5 0/3] livepatch: introduce atomic replace To: Jason Baron , Evgenii Shatokhin , Petr Mladek Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, jpoimboe@redhat.com, jeyu@kernel.org, jikos@kernel.org, mbenes@suse.cz References: <86cac2eb-0de4-bae7-f633-5ad03297880d@akamai.com> <20180126102326.u5jscbbgburrzatp@pathway.suse.cz> <20180130140303.6xmjgnbdemovzif5@pathway.suse.cz> <54c06e8c-2749-7c53-5a44-575c0ba69551@virtuozzo.com> From: Joe Lawrence Organization: Red Hat Message-ID: Date: Tue, 30 Jan 2018 14:24:13 -0500 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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.30]); Tue, 30 Jan 2018 19:24:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/30/2018 01:19 PM, Jason Baron wrote: > [ ... snip ... ] > > Our main interest in 'atomic replace' is simply to make sure that > cumulative patches work as expected in that they 'replace' any prior > patches. We have an interest primarily in being able to apply patches > from the stable trees via livepatch. I think the current situation with > respect to 'replace' and callbacks is fine for us as well, but could > change based on more experience with livepatch. Well the callback implementation was based somewhat on theoretical usage.. it was inspired by the kpatch macros that you talk about below, in which we had a few specific use-cases. Converting (un)patch notifiers to the livepatch model presented additional callback locations, and as such we ended up with pre-patch, post-patch, pre-unpatch and post-unpatch callbacks. Hopefully we'll get a better idea of their worth as we gain experience using them. At this point in time I would suggest keeping it as simple and safe as possible. :) > As an aside I was just wondering how you are making use of the callbacks > using the tool you mentioned (that is based on kpatch)? I see in the > upstream kpatch that there are hooks such as: 'KPATCH_LOAD_HOOK(fn)' and > 'KPATCH_UNLOAD_HOOK(fn)'. However, these are specific to 'kpatch' (as > opposed to livepatch), and I do not see these sort of macros for the > recently introduced livepatch callbacks. It seems it would be easy > enough to add similar hooks for the livepatch callbacks. I was thinking > of writing such a patch, but was wondering if there was an existing > solution? I've got a work in progress PR for this very feature: https://github.com/dynup/kpatch/pull/780 Evgenii has already provided some helpful feedback. Another set of eyes/testing would be appreciated! Regards, -- Joe