Received: by 10.223.176.5 with SMTP id f5csp2857450wra; Thu, 1 Feb 2018 07:09:31 -0800 (PST) X-Google-Smtp-Source: AH8x227R4CPel3qWSy93awtghy0zs5uPZX11PYW3lFTG01RmzZd15miKf3B00mCpimMQ7rSf9poP X-Received: by 10.99.111.8 with SMTP id k8mr29430605pgc.262.1517497771577; Thu, 01 Feb 2018 07:09:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517497771; cv=none; d=google.com; s=arc-20160816; b=sqMJ2XjNgomkMUPtPll9t+ENlEoQHzM8JuxcUdYJt1xDxxmSWVmM2bpkJErAIdZgD4 kcrRPwsZ4tfM7iidImeHN3da6fwe+wbds3vTbXmj0Vj5KnG2u0yfDI+9pCWCMPAjmkhb Z9z2q0qpxOSfDVPARhnjZynG7NwbrEUodV1cNYHblYOgnHBf4zUe0h6GQPHyz87ORu16 A54LsN9zMo4TwUG5eJ0UmTPNSQCJ8XYol9Z/4S7ohxWfI2XEPtbvmaKoMk1wbCpl16/g g8IYIa2x3+VO+NkE5ktHRBwOmkRi/b3e0E2BZIVSoYwADE8U/hZXEypbTiDvF1ULS6TQ MU5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=6I+NtYNJDt2eGQ8l84/tFLVth6tgCuQP/3UQnKFj8IQ=; b=upz30GhsV5skCUz55vSudep6FJxHtP5PjcLPAZuevI4twnMKW1De1gQi3ag4EO6E2t VKaESajbm8EQQuMpL3U8eFqnMz63/AIRWUXMwfb4yzGZHy5KX2NRM/eR7BNwmFy4vcVT yeKoI4p1Vx3wkqvUn2eI6MGicnM5ONVv+7+HGUASWj++owAIHFXXFmavvlQdLprD7577 k1liZN1AYqBphWOyg/Dlcg8pKw8/8rWoVMtfRMsYeurJ0IrfUVQVHIe1OUdhmzLP6CZs G+OUEQTHXjaVgpFwLu/vll4l43OMSueFTzSGAVzOLroOQL9Nq51KoqhO7Ed/BKYdtqhk pW8Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si6695012pgs.536.2018.02.01.07.09.15; Thu, 01 Feb 2018 07:09:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751679AbeBAPIT (ORCPT + 99 others); Thu, 1 Feb 2018 10:08:19 -0500 Received: from mx2.suse.de ([195.135.220.15]:50679 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbeBAPIQ (ORCPT ); Thu, 1 Feb 2018 10:08:16 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7857FACAE; Thu, 1 Feb 2018 15:08:15 +0000 (UTC) Date: Thu, 1 Feb 2018 16:08:14 +0100 (CET) From: Miroslav Benes To: Joe Lawrence cc: Petr Mladek , jpoimboe@redhat.com, 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 In-Reply-To: <1dd714ce-8d11-78b9-51f0-2b71734949e1@redhat.com> Message-ID: References: <20180125160203.28959-1-pmladek@suse.com> <1dd714ce-8d11-78b9-51f0-2b71734949e1@redhat.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Miroslav