Received: by 10.223.185.116 with SMTP id b49csp4778456wrg; Wed, 7 Mar 2018 00:24:37 -0800 (PST) X-Google-Smtp-Source: AG47ELuMwgNZZaqNwKcgV/d7+uycl0N4C7/wBvSFznPoUhmxeAXFlNGjx1TFklIf4K1wkeLsA+Ko X-Received: by 2002:a17:902:8bc3:: with SMTP id r3-v6mr19431581plo.450.1520411077788; Wed, 07 Mar 2018 00:24:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520411077; cv=none; d=google.com; s=arc-20160816; b=nlBcNBKauNFlEa07QIh1A7vEPZv0cAjzfMXuWIMh/X30IzqSyUrhDJd21z0YQVYlBr pgTkHuEi5hY0/+H56qZ2pASpfw/VfglT2dCbMaIt+bKv0nvRxpDqOdG8+oiDz4YQTirm qEEa720wdVVYDhqNYg7VyG0W6KVyWTAdBk9hVI0/V9zYWpPUoJHkpIs2Z0YKkPBE0Dgh mn0pWq7QHR72jJgwShhUQ+yIbeY/BCpE2Un9ic18zEPc4apJTMC9fyj9QmeNCea7/75d rLfN2TG9EnPePsI/21hrHg6pUvrG+cKI+YvWCXq0/gGLrOXtME7L1nV3KjSPcyhh1JFN yh5A== 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=ML8d3PPXlJlfX6EV2wiqZVyJEEI59JhvoYt5EL98FU0=; b=j5ukpObR+yUbytvRbk60Wpv7V/flQe44JRndZAi+vSZgkijlrh0TvHj97OGn0hPZd8 mYpWww3YlNg219GiXObL0SuSjoNBx8GtFWeYG1V1T5hZ8P1DosiBFv7Uckn7ehzSn9kU JjANjvI+9DBqeQOAsOCx8rp80EEwdahHrQsboMclBYWRAQAtduo1oEydmFYlnXR7PpGU DulCNelgwGePScN1XRmh4KlILDToY3Gv8GWym/QPJcR+iu9vvJIJHH6cK34i1yNDQOfb C7/87fHxyXtLyK//oek//L2qB2oi6T3v3lzf+rJwKMfebogunAYyhBFBgs6TktXP0Czg VsFw== 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 d88si13449912pfe.215.2018.03.07.00.24.23; Wed, 07 Mar 2018 00:24:37 -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 S1751206AbeCGIUx (ORCPT + 99 others); Wed, 7 Mar 2018 03:20:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:50091 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbeCGIUv (ORCPT ); Wed, 7 Mar 2018 03:20:51 -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 46423AF91; Wed, 7 Mar 2018 08:20:50 +0000 (UTC) From: Petr Mladek To: Jiri Kosina , Josh Poimboeuf , Miroslav Benes Cc: Jason Baron , Joe Lawrence , Jessica Yu , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Mladek Subject: [PATCH v10 00/10] livepatch: Atomic replace feature Date: Wed, 7 Mar 2018 09:20:29 +0100 Message-Id: <20180307082039.10196-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 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. Changes against v9: + Fixed check of valid NOPs for already loaded objects, regression introduced in v9 [Joe, Mirek] + Allow to replace even disabled patches [Evgenii] Changes against v8: + Fixed handling of statically defined struct klp_object with empty array of functions [Joe, Mirek] + Removed redundant func->new_func assignment for NOPs [Mirek] + Improved some wording [Mirek] Changes against v7: + Fixed handling of NOPs for not-yet-loaded modules + Made klp_replaced_patches list static [Mirek] + Made klp_free_object() public later [Mirek] + Fixed several reported typos [Mirek, Joe] + Updated documentation according to the feedback [Joe] + Added some Acks [Mirek] Changes against v6: + used list_move when disabling replaced patches [Jason] + renamed KLP_FUNC_ORIGINAL -> KLP_FUNC_STATIC [Mirek] + used klp_is_func_type() in klp_unpatch_object() [Mirek] + moved static definition of klp_get_or_add_object() [Mirek] + updated comment about synchronization in forced mode [Mirek] + added user documentation + fixed several typos 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 (5): livepatch: Free only structures with initialized kobject livepatch: Correctly handle atomic replace for not yet loaded modules livepatch: Improve dynamic struct klp_object detection and manipulation livepatch: Allow to replace even disabled patches livepatch: Atomic replace and cumulative patches documentation Documentation/livepatch/cumulative-patches.txt | 83 +++++ include/linux/livepatch.h | 65 +++- kernel/livepatch/core.c | 422 ++++++++++++++++++++++--- kernel/livepatch/core.h | 4 + kernel/livepatch/patch.c | 31 +- kernel/livepatch/patch.h | 4 +- kernel/livepatch/transition.c | 41 ++- 7 files changed, 598 insertions(+), 52 deletions(-) create mode 100644 Documentation/livepatch/cumulative-patches.txt -- 2.13.6