Received: by 10.223.176.5 with SMTP id f5csp523223wra; Tue, 30 Jan 2018 15:27:03 -0800 (PST) X-Google-Smtp-Source: AH8x227bftiSZGV6/qitPuDvHp54n741Cuspn8IKSjAgAXD80CMVZxoaV7/jairI5/8LSYRLmQy/ X-Received: by 2002:a17:902:b614:: with SMTP id b20-v6mr6351681pls.229.1517354823016; Tue, 30 Jan 2018 15:27:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517354822; cv=none; d=google.com; s=arc-20160816; b=O2mcBZ313w3284FV2Gqi0OR3bov11r7gPGYwcZwdnyJWLuP9Wy9aRu5LItUwfy5/5r IgSn7c7526HlMVoVq1U20WUwggvFksmI78TFbf8Dzgi2PX33Hl+ZXxddna1z6b7Qx0Y4 hZ5iYqGe47h87ysIx52sZoLopTd32rYYsqDvr/xV7AGWxlRYb2aQ3X/gABRUWNEVIyO7 dFGmfvFCkt6L4kzc8VmEPPzpMo4Gus7q69z/CUkd6FI6Ut/tFdVLFRjd9bjJ9m6nTElg sjQk/eJ7r/VeDBcI/6wzU0sfIUs+ivcov1pmnsfqRPJhcTS8tAdDaLlDPvA8zZfR9yQp OuVg== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=97dCiIimHgim7aTt6PuVcLVUVyGDNwFo4ll1p2Yo8l8=; b=FVdE90Bm2Ibi3Y8cup7alLsDr9jiMo+aXWxKyzu3jOMRSnyrTXDIWgkUd1LJ4p7Nzb z+xwNe0EYJYR+g4xrOseSsv4lM4cANnpcoCEWSczfdlSB9RPcfTEfeUGwyFttOvrQKdv XjM1nZe8Logeg70pE/YZh1TdR7HGIB48oZPCkyitjvyTV1GH4nBwiRYr3k30PhfpvoAx Nw80VTu60A9fjj+0WiO80wI9iWfyiLYItQFmkGrQ/nf+zzn5ovlrslvx7U7h8fVGtSrD 6jM4agPjZxgc9/+uoS1KJBbEygX4p09OUPNyN8nBOqFHcpraU4YXGQk50XYlG/FmnPVt P0Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@akamai.com header.s=jan2016.eng header.b=dhGFF3E1; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c21si760595pgn.225.2018.01.30.15.26.48; Tue, 30 Jan 2018 15:27:02 -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; dkim=pass header.i=@akamai.com header.s=jan2016.eng header.b=dhGFF3E1; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753493AbeA3WLn (ORCPT + 99 others); Tue, 30 Jan 2018 17:11:43 -0500 Received: from mx0a-00190b01.pphosted.com ([67.231.149.131]:40638 "EHLO mx0a-00190b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753342AbeA3WLl (ORCPT ); Tue, 30 Jan 2018 17:11:41 -0500 Received: from pps.filterd (m0050095.ppops.net [127.0.0.1]) by mx0a-00190b01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0UM7Z6n003843; Tue, 30 Jan 2018 22:11:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=jan2016.eng; bh=97dCiIimHgim7aTt6PuVcLVUVyGDNwFo4ll1p2Yo8l8=; b=dhGFF3E1H0MkWi53P9L3T3iZR9BgI4RUTGtf3wpgjBVnChuerSg8xGWlNcXMUP6J0HHf r5E40ZaAjK2r7GJZscAtcP0byFl+kw1uUEyZJbEvWK7qHxTrD+FZCnIJU1q1kM1CtaZG MY/c5+9jSKoC1CFIhdzmegib/khViisQ1uE4TAdtY+AnWiyGwj/IuY+RmiE1596HLgMl zQDsVrTQ8xhIkf2XWhSwkfZj4FkfhhZ9AzwQjb1vTD9I/jUwZx4ltPigYdLlOVXIGO/e 4HoiCUAr0kvYDAXFU5e1eBBOsDSRcfbgtEm582oWRk8RMOqaNTFsVxkAiL2gmo0XUeF8 /Q== Received: from prod-mail-ppoint1 (prod-mail-ppoint1.akamai.com [184.51.33.18]) by m0050095.ppops.net-00190b01. with ESMTP id 2frhu6qsdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jan 2018 22:11:31 +0000 Received: from pps.filterd (prod-mail-ppoint1.akamai.com [127.0.0.1]) by prod-mail-ppoint1.akamai.com (8.16.0.21/8.16.0.21) with SMTP id w0UMAaiH027338; Tue, 30 Jan 2018 17:11:30 -0500 Received: from prod-mail-relay11.akamai.com ([172.27.118.250]) by prod-mail-ppoint1.akamai.com with ESMTP id 2frnmy3kyf-1; Tue, 30 Jan 2018 17:11:30 -0500 Received: from [172.28.12.191] (bos-lpjec.kendall.corp.akamai.com [172.28.12.191]) by prod-mail-relay11.akamai.com (Postfix) with ESMTP id 14530331AA; Tue, 30 Jan 2018 22:11:30 +0000 (GMT) Subject: Re: [PATCH v5 0/3] livepatch: introduce atomic replace To: Joe Lawrence , 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: Jason Baron Message-ID: Date: Tue, 30 Jan 2018 17:11:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-30_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801300270 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-30_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801300269 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/30/2018 02:24 PM, Joe Lawrence wrote: > 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! Cool - this would be a nice feature to add. I've added some comments at the above link. Thanks, -Jason