Received: by 10.223.185.116 with SMTP id b49csp4841482wrg; Tue, 27 Feb 2018 03:38:46 -0800 (PST) X-Google-Smtp-Source: AH8x227BBGI65UmMtA8KHYv8H9jzqRspC14Yx7p4yadgYt//Pk7TZKAqiCnldP8TTEGxv1NlaKKm X-Received: by 10.167.131.135 with SMTP id u7mr13853459pfm.50.1519731525909; Tue, 27 Feb 2018 03:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519731525; cv=none; d=google.com; s=arc-20160816; b=VaoFNHFqBdBHhe7k//egeXYQr+UidoJKxVl6THDd2pLZdRarUQ9kVNWsaMkZ0XEjJY Ez41NReghHsgJ7weQCIpd6ICUIyviI2XYX4I8AoZjK6xRubV/Sirnq3kVyRtomq60Lv5 F4guqKoPevoZ9HkvaPQzxZ+07lLbEM+jzBvzN99AlU3ilF2XspNGVHDmlyHcBpF6Rbtg iWsTDXpKnMVg1MuyhMVczJ0Nd40cdcEoUmOgsU/BGogcJIOC1lDJHfMU8Ez2vsviZ29Q LQwZ2SHZVaPl5x1RPIaFjFdOwwVqyouUIuUg6IL3gqQdLewu16pGKyxW5PyCCi6/IV98 JPhw== 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=9Tg/aU1BHhtbCg/sKslxcCkENQj3GjT4qr4WY5mySvk=; b=BrykNjs/s0B3B/EWFBOPiaNCqQEuqyRS1kQDhF10MA4q+Dkb2DJEPLoJ3jsNsaCgNA /L9qIvxdiGaBcd0BDYtAA2HX6sWnOHSwiTbEXiQjh8sF6N3uABm+EYNUTSGhfysqzcTl 3QmsuV4vM7ikA/jDDdsqERZTwINsps9kXVLpLfzpizidvy72zRElSBFPwPL8drO7Z5tJ PP/CbdkZhES2XfYium/kYxyfdk/rhF1FmRyJGF9wBCK91cU2DmNbewHIwNKkOpIciPC6 EcL5Br3BvcUk+oeKz8eJrhD+QfrdstJdQ94KUAQ6mz9PcpeR/fWHKLkfJGUvYAZsHmo+ KSPg== 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 i2si6913475pgf.145.2018.02.27.03.38.31; Tue, 27 Feb 2018 03:38:45 -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 S932096AbeB0Lhp (ORCPT + 99 others); Tue, 27 Feb 2018 06:37:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:45167 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbeB0Lhn (ORCPT ); Tue, 27 Feb 2018 06:37:43 -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 684C5ABB2; Tue, 27 Feb 2018 11:37:42 +0000 (UTC) Date: Tue, 27 Feb 2018 12:37:39 +0100 (CET) From: Miroslav Benes To: Joe Lawrence cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Poimboeuf , Jessica Yu , Jiri Kosina , Petr Mladek , Jason Baron , Evgenii Shatokhin Subject: Re: [PATCH v0 1/3] livepatch: add sample cumulative patch In-Reply-To: <1519421630-12025-2-git-send-email-joe.lawrence@redhat.com> Message-ID: References: <1519421630-12025-1-git-send-email-joe.lawrence@redhat.com> <1519421630-12025-2-git-send-email-joe.lawrence@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 Hi, On Fri, 23 Feb 2018, Joe Lawrence wrote: > Add a simple atomic replace / cumulative livepatch example. It's not a cumulative patch, so I'd stick with an atomic replace example. The same applies to the subject, module name and also the comments. > Signed-off-by: Joe Lawrence > --- > samples/livepatch/Makefile | 1 + > samples/livepatch/livepatch-cumulative.c | 216 +++++++++++++++++++++++++++++++ > 2 files changed, 217 insertions(+) > create mode 100644 samples/livepatch/livepatch-cumulative.c > > diff --git a/samples/livepatch/Makefile b/samples/livepatch/Makefile > index 2472ce39a18d..dd0e2a8af1af 100644 > --- a/samples/livepatch/Makefile > +++ b/samples/livepatch/Makefile > @@ -5,3 +5,4 @@ obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-shadow-fix2.o > obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-callbacks-demo.o > obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-callbacks-mod.o > obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-callbacks-busymod.o > +obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-cumulative.o > diff --git a/samples/livepatch/livepatch-cumulative.c b/samples/livepatch/livepatch-cumulative.c > new file mode 100644 > index 000000000000..ab036439e08c > --- /dev/null > +++ b/samples/livepatch/livepatch-cumulative.c > @@ -0,0 +1,216 @@ > +/* > + * Copyright (C) 2018 Joe Lawrence > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version 2 > + * of the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, see . > + */ > + > +/* > + * livepatch-callbacks-cumulative.c - atomic replace / cumulative livepatch demo > + * > + * > + * Purpose > + * ------- > + * > + * Demonstration of atomic replace / cumulative livepatching. > + * > + * > + * Usage > + * ----- > + * > + * Step 1 - Load the sample livepatch demo > + * > + * insmod samples/livepatch/livepatch-sample.ko > + * > + * Notice that /proc/cmdline was modified by the patch. For the moment, > + * /proc/meminfo remains unmodified. > + * > + * head /proc/cmdline /proc/meminfo > + * ==> /proc/cmdline <== > + * this has been live patched Could you add the module names to the messages in livepatch-sample.c and here in the new sample module? It'd be clear what came from where then. Otherwise it looks good. Regards, Miroslav