Received: by 10.223.176.5 with SMTP id f5csp2765718wra; Thu, 1 Feb 2018 05:50:20 -0800 (PST) X-Google-Smtp-Source: AH8x226bSLl2VkwmZsKwZ/EtGkFOUMh2BgE16LYg60BqfYhztbRcRjeQHOuoBzoZTGhRFfISyCGY X-Received: by 10.98.73.157 with SMTP id r29mr37395552pfi.41.1517493020560; Thu, 01 Feb 2018 05:50:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517493020; cv=none; d=google.com; s=arc-20160816; b=egKA/Ni3eg9fsLr2FUg2cVSSAjwd49fQ00Z/SANwYHa03xKGORhtv32pjCvarqE36L 9RQFL5RA+l3yffoxLQmdu716DXHEPraXvSevwCLqYrB5y71yT8FaKL7bcu+5qjxZN6KV oWDeoKtGhH6D6kMZwiPzEefCj+ZBIq2fw1I73P/nlQfPHZeNx+4UKT8Z21xyDxWNqL1/ oIFZFNINsOGXVW3tylleAc6JFF58TIzaASBWUIz935HaqtKbyfQ7KSmlklXVzwfzPTR1 zBIbj9500JG6Yj/XBskNUp5GPBdvfrHIMMYjacFlSngf/Y4f3y0YwwF8VoJwLeiYwlml IcwQ== 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=5zERfN0imtaNJVNYF1vOxetLNeUVK3LJiEHFXWyd6Q0=; b=eFWGWBPFrcRTloaDZjo0pyv7X//hJOQJYfYaCXX7yR/Szi9WEvr3DxBnmTNoMtRgVQ 3midgRdEr7Hj8X6Je6/HiFs3o/3jaJ43oHSTZOX03kQPkJRaNh1fl/E7isn1XwvxMLOi x0nZbUNbNkK8/Hz8IcLNulhhIhmmmCEbAgnBSW6qQWi9n/SfQYz3s1KIlZ00esxAhvW9 haP4z3L4EaWfTLZS7XnFSATy8hPeT0NVLeQmMi9EJL2oTJXfrusTCm0nrPnQQUgAU834 fOVqKnN8uOWUkczVBpOvGDsVpbvBZX0Fw5G7rJetbk12ZIOxdgVQ6F8L41vPz5zSFcHA f1Fg== 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 e3si46659pfi.191.2018.02.01.05.50.05; Thu, 01 Feb 2018 05:50:20 -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 S1752383AbeBANtV (ORCPT + 99 others); Thu, 1 Feb 2018 08:49:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:42971 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbeBANtS (ORCPT ); Thu, 1 Feb 2018 08:49:18 -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 22366ABF3; Thu, 1 Feb 2018 13:49:17 +0000 (UTC) Date: Thu, 1 Feb 2018 14:49:16 +0100 (CET) From: Miroslav Benes To: Petr Mladek cc: 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: <20180125160203.28959-1-pmladek@suse.com> Message-ID: References: <20180125160203.28959-1-pmladek@suse.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, 25 Jan 2018, Petr Mladek wrote: > Hi, > > the atomic replace allows to create cumulative patches. They > are useful when you maintain many livepatches and want to remove > one that is lower on the stack. In addition it is very useful when > more patches touch the same function and there are dependencies > between them. > > This is my rework based on Jason's v5 patchset[1]. My intention was: > > + reduce code duplication and nop-specific shortcuts > + split the huge patch for an easier review > + simplify the logic where possible > + add/update/clear comments > + better fit into the existing code > > I am not supper happy with the result. But it took me much longer > time than expected. It is high time, I shared the current state > and get some feedback. > > > Jason, > > I used your code in most of the patches and kept you as the author. > Please, let me know if you would prefer another solution. > > Also I am sorry that I have done it this way. I was not able to > suggest it out of head. I needed many iterations to end up with > the current state. I needed to play with the code. Therefore > it made sense to send what I got. > > > [1] https://lkml.kernel.org/r/cover.1515786085.git.jbaron@akamai.com Hi, the series looks good to me (apart from the mentioned bugs and a couple of nits). I'll port my old kGraft testing modules and hopefully it will survive. 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. Miroslav