Received: by 10.223.176.5 with SMTP id f5csp2869952wra; Thu, 1 Feb 2018 07:19:25 -0800 (PST) X-Google-Smtp-Source: AH8x225vNLmcU0Hya25oeTfic6cE+DwqMi79B77A0vaiaQ1ApwQuWeJb5Fwdwx1L4MM68vMDK2wU X-Received: by 10.98.152.90 with SMTP id q87mr37555837pfd.131.1517498364930; Thu, 01 Feb 2018 07:19:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517498364; cv=none; d=google.com; s=arc-20160816; b=FOpEYWCjHtdl24L3YX+hjNfNXmW+ZBkwpnxnOVX6NsQ4J61E0EiS8wCaAaXy4txzN8 Aa4wKTshnHh8Kaek021gN9T/iYdmM4s80a5zhyROi5o6y9Q2GYpWt8DZZTIZr6zb3oX8 R0iJJoNI4x3V+geq+O34mRTXWiMwEw1JxHZDAgVYQeOdaZhCnfogS3Ux+VIG3PrZ0Ye2 AkcKPEsehBSawmn5GwluHYauft3i5kSrSqPAiepMUStMMIGArMc1KlMEmXDBY1xZPmds oZlBzO5dj0qvEoZDYTTFP2u+1ueUJpbqJ7oylMbS2/pSA3JHGdssgNVYQ3E0LW6LL9dG 1QVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=bGT8El0b7CeijLIxQ5tMlBaxfYpDC8emCn7PladsfHU=; b=GIJOOFyPBfXfQv7fz3ha+O61m6/p2ZMaeyUVLb8cp90Wiuuz9ee0pyl4uJ9DR4EPdD my0JHbPzB+oO4XBts/e4FJCuk1Agy4bIqXX99PTzcjbDe4tQp1MlylWZGcYnqftFnYBa m0+T2RLSY0tIem+0PBJvuRMUKc5oSa4CH3GCjiXp7COrSMnwTxGRXCBQW+YKbk3CPhSf s1ndZmAwbbABEpZdCXtpGeVdzAOLPM/G2J32IEdM/tgI337OtiH95NY+BBGJRAJ7Owys YKouc1gLZJSwFOmO7FgNNWIkgdp7GbmhMInkMLKKaYyr7G1WiKD97OYfBUUh+v4WckJL 4HWg== 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 h20si6654048pfh.395.2018.02.01.07.19.09; Thu, 01 Feb 2018 07:19:24 -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 S1752381AbeBAPSO (ORCPT + 99 others); Thu, 1 Feb 2018 10:18:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15410 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752064AbeBAPSL (ORCPT ); Thu, 1 Feb 2018 10:18:11 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 317E2C0568DF; Thu, 1 Feb 2018 15:18:11 +0000 (UTC) Received: from treble (ovpn-122-228.rdu2.redhat.com [10.10.122.228]) by smtp.corp.redhat.com (Postfix) with SMTP id CCBDF61348; Thu, 1 Feb 2018 15:18:07 +0000 (UTC) Date: Thu, 1 Feb 2018 09:18:07 -0600 From: Josh Poimboeuf To: Miroslav Benes Cc: Joe Lawrence , Petr Mladek , jikos@kernel.org, Jason Baron , jeyu@kernel.org, Evgenii Shatokhin , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: PATCH v6 0/6] livepatch: Atomic replace feature Message-ID: <20180201151807.xjrldhmwwuot4c2o@treble> References: <20180125160203.28959-1-pmladek@suse.com> <1dd714ce-8d11-78b9-51f0-2b71734949e1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 01 Feb 2018 15:18:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 01, 2018 at 04:08:14PM +0100, Miroslav Benes wrote: > On Thu, 1 Feb 2018, Joe Lawrence wrote: > > > On 02/01/2018 08:49 AM, Miroslav Benes wrote: > > > > > > Well, one more thing. I think there is a problem with shadow variables. > > > Similar to callbacks situation. Shadow variables cannot be destroyed the > > > way it is shown in our samples. Cumulative patches want to preserve > > > everything as much as possible. If I'm right, it should be mentioned in > > > the documentation. > > > > Are you talking about using klp_shadow_free_all() call in a module_exit > > routine? Yeah, I think in this case, that responsibility would be > > passed to the newly loaded cumulative patch, right? > > Yes, but we haven't got an option not to call it here (as with callbacks, > where we can omit callbacks completely with atomic replace patches). A > live patch author must be aware of this and use shadow variables > appropriately. So maybe we should recommend that shadow variables generally be freed from a post-unpatch callback. -- Josh