Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp967462ybp; Fri, 4 Oct 2019 07:42:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYJwonNOJiSQLTyIGxCyNzUqX2wy6gwuh5EiDssdHFgm00cAhLMl2PjY0Hs0dPpceyPN+6 X-Received: by 2002:a17:906:81c6:: with SMTP id e6mr12665449ejx.284.1570200133443; Fri, 04 Oct 2019 07:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570200133; cv=none; d=google.com; s=arc-20160816; b=kbOFOsGciCq92Pr23xoMtBmMm1/ZS2FyrNmPT39bp1aRlZkLxUwIlEwmSYAmLb72AR Zmsjtpl5jxwsw5sIKeW6FxH+hpFpVG8nyOaBuLNkjksSlOBxJIPUfuj+isMfYduxCG4l QTlOFQ1TiIwV2Aa/o/YtpcuQDsbRXx1ltpspEHYpVN5LLyD9muOCr2QC4gH8ePnZYlBo TvncFckI1jCA6e4NXO3WAcjxoNaHRi2teF7fsdUBuhKgsHF6vT1vP17ZCH8ThekUgMgQ A229ZfVwhpAxg8/dE5PWHo1AuLUjxlbJ5nJkOqLeOGbbHSk3y6ZGqzwibt6pi0DtcZ+Y EGsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dHlcoNOLvSiCQ5A5u4O5vGvlmxe2DlkqVvVnvi7m/oQ=; b=qZAipkd8B3q0PoTyUyv3CbXra4ih9dxEjgYZ6MTj6q8qJemuO3+EiEZLfePhR7Ffps 4U/SRBT4sL78R2IBu7Jp3LRQH+Ck1/5RkFLDSf1ybkzGua7qonp1ZA8+ObrlOli9Gr2D XUIWEIqs6pe4xUxKqimms4mBvkzmkhPMQAMwmOLI9sU71bRkuHny81nvLaIKX8DBU1R4 vmMfV+Vcx9AGh1CtVb1verHwTlLd8Ut2abXsyIIbjJGopjemPBuH4rnWV6SmF0rd+EwF gTEab/K2m6NM6+s1WtM5gMqeRJeuEnN6VlKQvNbocEFsuJV5Cofj8oHuG8PLATr7cOSD LMOQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si2954206ejx.68.2019.10.04.07.41.49; Fri, 04 Oct 2019 07:42:13 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389285AbfJDOjG (ORCPT + 99 others); Fri, 4 Oct 2019 10:39:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49256 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388982AbfJDOjG (ORCPT ); Fri, 4 Oct 2019 10:39:06 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B150E30860D5; Fri, 4 Oct 2019 14:39:05 +0000 (UTC) Received: from redhat.com (ovpn-122-165.rdu2.redhat.com [10.10.122.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3EDD960600; Fri, 4 Oct 2019 14:39:04 +0000 (UTC) Date: Fri, 4 Oct 2019 10:39:01 -0400 From: Joe Lawrence To: Petr Mladek Cc: Jiri Kosina , Josh Poimboeuf , Miroslav Benes , Kamalesh Babulal , Nicolai Stange , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/5] livepatch: new API to track system state changes Message-ID: <20191004143901.GA3768@redhat.com> References: <20191003090137.6874-1-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191003090137.6874-1-pmladek@suse.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 04 Oct 2019 14:39:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 03, 2019 at 11:01:32AM +0200, Petr Mladek wrote: > Hi, > > this is another piece in the puzzle that helps to maintain more > livepatches. > > Especially pre/post (un)patch callbacks might change a system state. > Any newly installed livepatch has to somehow deal with system state > modifications done be already installed livepatches. > > This patchset provides a simple and generic API that > helps to keep and pass information between the livepatches. > It is also usable to prevent loading incompatible livepatches. > > Changes since v2: > > + Typo fixes [Miroslav] > + Move the documentation at the end of the list [Miroslav] > + Add Miroslav's acks > > Changes since v1: > > + Use "unsigned long" instead of "int" for "state.id" [Nicolai] > + Use "unsigned int" instead of "int" for "state.version [Petr] > + Include "state.h" to avoid warning about non-static func [Miroslav] > + Simplify logic in klp_is_state_compatible() [Miroslav] > + Document how livepatches should handle the state [Nicolai] > + Fix some typos, formulation, module metadata [Joe, Miroslav] > > Petr Mladek (5): > livepatch: Keep replaced patches until post_patch callback is called > livepatch: Basic API to track system state changes > livepatch: Allow to distinguish different version of system state > changes > livepatch: Documentation of the new API for tracking system state > changes > livepatch: Selftests of the API for tracking system state changes > > Documentation/livepatch/index.rst | 1 + > Documentation/livepatch/system-state.rst | 167 +++++++++++++++++++++ > include/linux/livepatch.h | 17 +++ > kernel/livepatch/Makefile | 2 +- > kernel/livepatch/core.c | 44 ++++-- > kernel/livepatch/core.h | 5 +- > kernel/livepatch/state.c | 122 +++++++++++++++ > kernel/livepatch/state.h | 9 ++ > kernel/livepatch/transition.c | 12 +- > lib/livepatch/Makefile | 5 +- > lib/livepatch/test_klp_state.c | 161 ++++++++++++++++++++ > lib/livepatch/test_klp_state2.c | 190 ++++++++++++++++++++++++ > lib/livepatch/test_klp_state3.c | 5 + > tools/testing/selftests/livepatch/Makefile | 3 +- > tools/testing/selftests/livepatch/test-state.sh | 180 ++++++++++++++++++++++ > 15 files changed, 902 insertions(+), 21 deletions(-) > create mode 100644 Documentation/livepatch/system-state.rst > create mode 100644 kernel/livepatch/state.c > create mode 100644 kernel/livepatch/state.h > create mode 100644 lib/livepatch/test_klp_state.c > create mode 100644 lib/livepatch/test_klp_state2.c > create mode 100644 lib/livepatch/test_klp_state3.c > create mode 100755 tools/testing/selftests/livepatch/test-state.sh > > -- > 2.16.4 > Hi Petr, Thanks for respinning this one with the latest updates. The implementation looks fine to me. I have two really minor nits for the selftest (I'll reply to that commit), but I wouldn't hold up the series for them. Acked-by: Joe Lawrence -- Joe