From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0037C43613 for ; Mon, 24 Jun 2019 09:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE625208CA for ; Mon, 24 Jun 2019 09:32:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbfFXJcV (ORCPT ); Mon, 24 Jun 2019 05:32:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:56130 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726632AbfFXJcV (ORCPT ); Mon, 24 Jun 2019 05:32:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 10828AF47; Mon, 24 Jun 2019 09:32:20 +0000 (UTC) From: Nicolai Stange To: Petr Mladek Cc: Jiri Kosina , Josh Poimboeuf , Miroslav Benes , Joe Lawrence , Kamalesh Babulal , Nicolai Stange , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC 2/5] livepatch: Basic API to track system state changes References: <20190611135627.15556-1-pmladek@suse.com> <20190611135627.15556-3-pmladek@suse.com> Date: Mon, 24 Jun 2019 11:32:19 +0200 In-Reply-To: <20190611135627.15556-3-pmladek@suse.com> (Petr Mladek's message of "Tue, 11 Jun 2019 15:56:24 +0200") Message-ID: <87k1db49cs.fsf@suse.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: live-patching-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: live-patching@vger.kernel.org Petr Mladek writes: > --- > include/linux/livepatch.h | 15 +++++++++ > kernel/livepatch/Makefile | 2 +- > kernel/livepatch/state.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 99 insertions(+), 1 deletion(-) > create mode 100644 kernel/livepatch/state.c > > diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h > index eeba421cc671..591abdee30d7 100644 > --- a/include/linux/livepatch.h > +++ b/include/linux/livepatch.h > @@ -132,10 +132,21 @@ struct klp_object { > bool patched; > }; > > +/** > + * struct klp_state - state of the system modified by the livepatch > + * @id: system state identifier (non zero) > + * @data: custom data > + */ > +struct klp_state { > + int id; Can we make this an unsigned long please? It would be consistent with shadow variable ids and would give more room for encoding bugzilla or CVE numbers or so. Nicolai > + void *data; > +}; > +