Received: by 10.223.176.5 with SMTP id f5csp476933wra; Fri, 9 Feb 2018 02:07:38 -0800 (PST) X-Google-Smtp-Source: AH8x224d7VDEQO04TgyUWvZqp/LyrkWjzbp+EH3dQVXmgbH3mJW5kIAtgDvRuCZmLS5yhziDrj7P X-Received: by 2002:a17:902:8498:: with SMTP id c24-v6mr2053933plo.450.1518170858214; Fri, 09 Feb 2018 02:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518170858; cv=none; d=google.com; s=arc-20160816; b=DFiJuPJnk2T8+UIXE5+E+ZFZGKGkmGnDVFUurAp7I2XEZRmpAib4LxLxXHWfr1/xq2 701+QGN04PSf5cnZecd8FvQbe1Wz3GS79zIDtFZRfVXiWu1WkfJqYwcEhD4KCggE7PFX hxCRIwKf5/RZ3AhKyQyvOTA37/GjBGcBEO3xTfp5nPRJs24v/6rmSQAjutjs6uqiJ8uP 0S9lEVmopa03R+p60dQDo6QBdHWdy+Z7NFkujkot1Abc6UBV+vq1nias5GmxEhpLZBDe dlTkfk2ZUyAhtlVj1LrFgQ6Xvi9LlGnP0zkR/UFo9vgpjKS7TarH6ygv9wql10oQtC0c 33Og== 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=jBMDdC1455uGP/4qDU8EdQo7cbELbDPq6cM7KwHJSXg=; b=P0yfQbfjNS3c+q7in2l5KTVYTPQBm3IuhVih0tSoFi8brQYzqCc/ad2lNBJT0Xk6v5 dQsblCtZ93KmQlOSEFro0zdtRfBbCiNEVYGQ3ADWO0S3W0G1PFFOjjVyA9s9oa0KK5g3 RpeG9n3BHq56vKy1KpCVhDxEZQvPXqi4EP9kTpoIaDXwpTiilpZZ4s6wbHg5pgau5RM+ 5t3+QJ9w7yOrJIWzsDUfAi7QCNJlRC6/3PG412/lMq1P5IgHKw75GxTZKanhfyrDjc5U J3UU5/JDM2GzcvYFMj7pUMa0pkeO1ttVCCZ/XVMAQgaGEIlPoYql1nU7Oy/nGuBbi15g 37FA== 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 s9si1521869pfj.14.2018.02.09.02.07.21; Fri, 09 Feb 2018 02:07:38 -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 S1751756AbeBIKGX (ORCPT + 99 others); Fri, 9 Feb 2018 05:06:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:47468 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751034AbeBIKGV (ORCPT ); Fri, 9 Feb 2018 05:06:21 -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 401D5AD6D; Fri, 9 Feb 2018 10:06:20 +0000 (UTC) Date: Fri, 9 Feb 2018 11:06:19 +0100 (CET) From: Miroslav Benes To: Petr Mladek cc: Jiri Kosina , Josh Poimboeuf , Jason Baron , Joe Lawrence , Jessica Yu , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 1/7] livepatch: Use lists to manage patches, objects and functions In-Reply-To: <20180206103424.10829-2-pmladek@suse.com> Message-ID: References: <20180206103424.10829-1-pmladek@suse.com> <20180206103424.10829-2-pmladek@suse.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 On Tue, 6 Feb 2018, Petr Mladek wrote: > From: Jason Baron > > Currently klp_patch contains a pointer to a statically allocated array of > struct klp_object and struct klp_objects contains a pointer to a statically > allocated array of klp_func. In order to allow for the dynamic allocation > of objects and functions, link klp_patch, klp_object, and klp_func together > via linked lists. This allows us to more easily allocate new objects and > functions, while having the iterator be a simple linked list walk. > > The static structures are added to the lists early. It allows to add > the dynamically allocated objects before klp_init_object() and > klp_init_func() calls. Therefore it reduces the further changes > to the code. > > Also klp_init_*_list() functions are split because they will > be used when adding the dynamically allocated structures. > > This patch does not change the existing behavior. > > Signed-off-by: Jason Baron > [pmladek@suse.com: Initialize lists before init calls] > Signed-off-by: Petr Mladek > Cc: Josh Poimboeuf > Cc: Jessica Yu > Cc: Jiri Kosina > Cc: Miroslav Benes Acked-by: Miroslav Benes Miroslav