Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9864952imu; Wed, 5 Dec 2018 11:36:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/VE1T+MahorNyrjgy9F4OdjBtdRCPyuJ4Skg2tJ/dI725BgZLNJTdLNEUUy7AzSSpFCyGEn X-Received: by 2002:a63:f959:: with SMTP id q25mr21810541pgk.315.1544038582649; Wed, 05 Dec 2018 11:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544038582; cv=none; d=google.com; s=arc-20160816; b=mAVot4j7jYnHBoU2E1jEG2J531yj4UJaed62y86eiKWiHv/ePCdmIyku7uPq1CQZxY hKM1YdXlVfHTrAv1eDWgowLyVnqjeQyU6jrgv4zN4ZGY7hGkOrFsOqYCMRxEtwe44tmy oLsPji3zBhdK/rlpAkTWQsABwAQGu2fCiJowcKM1npX7TX7v3ORcpJjYvZj5l+sJUxCH 6knU7S15lj/joShShlsuC9USRv3WptXhredsLQiKeWFsOZKwM5s3rB+r6XXMufUjm3By W9fnHOPP6HU71AJE2rjT3OVxUqX5MiMQsVChRV5YuI0ehOvtW09vJZaTEjJPiFKj+nmU JhLg== 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=ZEAbIggLRnbFuyOf6KeqHUwWJ5lVMpvqj3NXJMOWE4s=; b=t8kl6fcvZkLYxFtQT8bduGpbwavM3Tw3zYoHYrrAV1AVgG2eBUH5tMXhVpCjmGsC+M dLfDAcGdhkXzKYBSaFkEiFMoL4u+jzOX3NFMVxWzrPkvY8DMktEmCmSB3MAXMYTYIHSQ l6Gof6IC+Iny7if+Dta4s35YxoyC29xp1+w1SRhtritP1DPsSF8j37ax/HvaHwqShqnv I9h8scVoZE0F2z5fIlNDHtzfnKHe8vYaPdPow2nmUR5115P7Ufo8GO8QR0rLwQ5WXUut fcOPBhz5jsf5wsFK5lzMkgzBlcuIWR6b5Ajg4P8o5Ggb3/azV7kDqVBl6YFQF9ifbK5F I57A== 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 m3si19918164plt.394.2018.12.05.11.36.07; Wed, 05 Dec 2018 11:36:22 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728320AbeLETeV (ORCPT + 99 others); Wed, 5 Dec 2018 14:34:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42948 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbeLETeV (ORCPT ); Wed, 5 Dec 2018 14:34:21 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE808307EA8A; Wed, 5 Dec 2018 19:34:20 +0000 (UTC) Received: from redhat.com (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D960C5D96E; Wed, 5 Dec 2018 19:34:19 +0000 (UTC) Date: Wed, 5 Dec 2018 14:34:19 -0500 From: Joe Lawrence To: Petr Mladek Cc: Jiri Kosina , Josh Poimboeuf , Miroslav Benes , Jason Baron , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Jessica Yu Subject: Re: [PATCH v14 06/11] livepatch: Use lists to manage patches, objects and functions Message-ID: <20181205193419.pyqbctefkypdpitf@redhat.com> References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-7-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181129094431.7801-7-pmladek@suse.com> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 05 Dec 2018 19:34:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 10:44:26AM +0100, 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. > > 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: Joe Lawrence -- Joe