Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8296051imu; Tue, 4 Dec 2018 06:15:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/U7g/CYwj8ndhZlsJZ1Z7O0OO4LTtd0FCciJqFwpRbpFuBrbX1thsKC5AInKQgslEau7ZaC X-Received: by 2002:a62:9913:: with SMTP id d19mr20233891pfe.107.1543932940063; Tue, 04 Dec 2018 06:15:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543932940; cv=none; d=google.com; s=arc-20160816; b=NqBVOqcD5fa2bdBBTw5QC4HKw1+Eimi2QfnqNyPyyBQVcLufiu6sz3Ep+nXDWwCpKg kZs3tWOaEPB8IXdtPNA1myBgFACI33CHLJ81NZB7YztNVGnMZEp+YBjAQBHgVGIXFqMT /653pZ8yI4JUGSk3Mk6H4lzITEMQZDHf+Gfh/rPA9JIBpIZ1+rsNCRG/4Y50QrArSf+t U0lxMZr1PLWXXh1d9i4vpQE5iU0T+gFM4HgoL+8L/xM3w7Tih/IlFlGlggvjsKwOev+B cNYuWqjYpZ8wDDIxgLZxaAPT6NpQqPDxrH/J8IGU7XFjTpvF/Euuq1JENOlcYBQXrrnh JmCQ== 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; bh=bT+AqqilRwc73z+OVuqOOE0ru59tB8CawAzCL/n05sw=; b=bukGiIs31Lec8yXEE4j5Kgh6KtfMZevhZt2FSyP1vTSL/nNPXoKYLqU6pUw2mVTBDZ V5OUQkR1NeRdXi0G5aQS3ceCAEcyztEvkUsh3xawc6q4I6rl7RxK7ZBZ+g/aXRidOM1f kmlMbT3PvpaE4WCmQB0twlm+NAKl5YpfHHvaWPzVCwI/9S5oF/wbGGam7NBhSB99bbq2 7ckn7dTnoR82l2S3ebQcZel/rWfwDXX9lrUsBkuIDX1/APx+XBkrWpd8dI6OffHGYOur kflMd4R3LIm/0opWLKAARpX77UzRy2SYFbeQm+qdL1zzzoXRqVsZPH0ducGWUimm2jB2 NHNg== 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 o2si18185940pfb.166.2018.12.04.06.15.24; Tue, 04 Dec 2018 06:15:40 -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 S1726531AbeLDONF (ORCPT + 99 others); Tue, 4 Dec 2018 09:13:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:48010 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725910AbeLDONE (ORCPT ); Tue, 4 Dec 2018 09:13:04 -0500 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 9EEA6ACED; Tue, 4 Dec 2018 14:13:01 +0000 (UTC) Date: Tue, 4 Dec 2018 15:13:00 +0100 (CET) From: Miroslav Benes To: Petr Mladek cc: Jiri Kosina , Josh Poimboeuf , Jason Baron , Joe Lawrence , 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 In-Reply-To: <20181129094431.7801-7-pmladek@suse.com> Message-ID: References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-7-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 Thu, 29 Nov 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. > > 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 M