Received: by 10.223.176.46 with SMTP id f43csp2315035wra; Thu, 25 Jan 2018 08:04:12 -0800 (PST) X-Google-Smtp-Source: AH8x227MDbVe1u1XGObWw/2PEjci0gCvRdR7VooQJ5aobni9gM4ONJ0kCvc6CmK0nnXD28kM5AMM X-Received: by 2002:a17:902:b406:: with SMTP id x6-v6mr2528468plr.150.1516896251966; Thu, 25 Jan 2018 08:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516896251; cv=none; d=google.com; s=arc-20160816; b=GhpTMaF1YjZINrjJfIXZR4JYI6zSPEctjoZH1YPrk1pBPqA0UzjRkVBYjIENkYiLZ2 pNirelkHHaKPVHWz999DzbjQ2jAAijdUfQHJW2eLEGuftq2/cQdpORZVm5UJxzpOszMz y6ph3svxDM/W3jalim5+Rd+i686PpLOn66fV8lrwG1Hf6VxkE2dkh6S2+8iyxb4Cc/W4 f7WRRKeF7krXzlxrdBzBtqFBsT6bUc+OVLDZpA5AUxg+vzOC20FyAm1mxqfGMyD9tC1m YO3kC9K2DdwSQOrjbSxrl+Y5wYYNe2OzvUNXWPUGg8vNowC5ysdA2BLGsxL2HtBSGPWW TF9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=OgqnCj42pcOtlYeeTimB7+bf3gQ4BC0YC7j9QgQd9YM=; b=N6g3S+e7TpI39XqduYPDrq5zLGlG/BnABIgY+XnDHllYXR1mKsDCcK30coYF98uZ1p VrYgF8mPJ4Eexz5kzKSkfkJrXQNHcBwOJxC9TgFQXPcamDEynd0QCBh/T31SsEsxztcl PusTUxDBGP9PH3OAApwaEm1qAy9sdvPFG21ddbcLWcs+/9rUXIYD8hFcKlNULfC0CvfV jlvOz4JxBOcSlixgNxm/YZZMsEtOMtQ0rXlSO0WSFZ0xTJRb+TSjg5hqGYT+Ku7yd5g5 RurdQkbpWIOv30Jt7rbUFeeAwGg/cMhzRFnM6p3RVCRaThDM5TCX0z7dRKDvNwqooPUv 0sEg== 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 q4-v6si1732597plb.124.2018.01.25.08.03.57; Thu, 25 Jan 2018 08:04:11 -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 S1751264AbeAYQCP (ORCPT + 99 others); Thu, 25 Jan 2018 11:02:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:59712 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeAYQCO (ORCPT ); Thu, 25 Jan 2018 11:02:14 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4E1BBAE1E; Thu, 25 Jan 2018 16:02:13 +0000 (UTC) From: Petr Mladek To: jpoimboe@redhat.com, jikos@kernel.org, mbenes@suse.cz Cc: Jason Baron , jeyu@kernel.org, Evgenii Shatokhin , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Petr Mladek Subject: PATCH v6 0/6] livepatch: Atomic replace feature Date: Thu, 25 Jan 2018 17:01:57 +0100 Message-Id: <20180125160203.28959-1-pmladek@suse.com> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Jason Baron (5): livepatch: Use lists to manage patches, objects and functions livepatch: Initial support for dynamic structures livepatch: Allow to unpatch only functions of the given type livepatch: Support separate list for replaced patches. livepatch: Add atomic replace Petr Mladek (1): livepatch: Free only structures with initialized kobject include/linux/livepatch.h | 59 ++++++- kernel/livepatch/core.c | 378 ++++++++++++++++++++++++++++++++++++++---- kernel/livepatch/core.h | 4 + kernel/livepatch/patch.c | 29 +++- kernel/livepatch/patch.h | 4 +- kernel/livepatch/transition.c | 38 ++++- 6 files changed, 464 insertions(+), 48 deletions(-) -- 2.13.6