Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2222198ybd; Mon, 24 Jun 2019 02:49:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSDMVjpjcm3th8q2xLaSZc7hCWW4aGFu9IaWRMlFNHt6XLT4NhGgBSVXeBUWov9naH91gB X-Received: by 2002:a17:902:a607:: with SMTP id u7mr7891243plq.43.1561369780604; Mon, 24 Jun 2019 02:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561369780; cv=none; d=google.com; s=arc-20160816; b=wXBBTil4QHYTJkXvZScCyoFmYFox8Q7H/dNdFHLwIRJebwpGLpmKsVfgAL1DhaCCG3 pppAu/FTc45Vh0UoMF4DRjTj9BudDJvkxV3grkf3bdcm7UVVEY0t2ibGhR2IWWbqxJVy UwMgoORYE+Dtl7hr12cUFJUWWyRcsZiLdPfOpmTHnIjxuUtvTUr8wYBGy7Nt5JfVa9eX zd12lvntNMMoTK+oKPJYzhCNicblqY7VaAxKxYZaFBxqMI5lyebgKcEM5MMuvoQUEmoP CchpLVLHlxXsNxe/VSkg9+DZ4Fuk0PNaw3G3sETK1tTDeY62VqPn461NHpDQT5YyI84i tvWw== 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:message-id :in-reply-to:date:references:subject:cc:to:from; bh=dZGiyd+ZpKzOhTUv7POmBRsUz2fEpdQ0AzFBLoSJ1y8=; b=FppFji1eoLdy7o/gzy59+E8meMQrdxGNjhI1viCtqTP06i6zbg5Z7cEqoTWg6KIc7i vki6dG9jEuwltDQtqn62dJGr4Fnt3Z3a8/gIwMC/WmA6fgP5BmuDIdXWJSy2QSR4hh+C 2bIyZNS2+aKuP2tIvEQZ59Ih/0ezYgclhn2XqoNGCkLrLKS3VCdGR6EHcIf1FVMUlr3L 5gMTV/QM7YJgSyFHpKMwjj+FifaslCG4n6zbhHLi8zPipx/MUOmgb+9GLc6cqEqVCufT YaBTYEwas8E0zNCEToGHtFl7l0Zpa2KZNtIM+QVWn62gGBG6AhVVSotgHXC5192yrG8m Zovg== 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 i62si10303857pge.573.2019.06.24.02.49.25; Mon, 24 Jun 2019 02:49:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728097AbfFXJcV (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; > +}; > +