Received: by 10.213.65.68 with SMTP id h4csp1228283imn; Wed, 21 Mar 2018 05:58:23 -0700 (PDT) X-Google-Smtp-Source: AG47ELsCSOeUhq6ny8wpbOCNZJZSRJoTK6wv+y5c7et+k+4Y5HrQGaXJBp6sStL0ezwZQ1f6B0eH X-Received: by 2002:a17:902:6547:: with SMTP id d7-v6mr17039768pln.253.1521637103588; Wed, 21 Mar 2018 05:58:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521637103; cv=none; d=google.com; s=arc-20160816; b=J2oHX+zP+ifStVdgvdZuhNMrdyLLIG6Qvpjg9udMOX0YRaXPMGeMMy5CvDBRBWmLab 0ha3eGF6Ooh8UazcUvd0mrrK6Lgl4QYP9MKtWYKsnFksdS1GvLNd99hD0pKD2UnjZAh5 +3dhh55/yN+OAJP1Pto/dRIsY9fwdyzeRsjeZXHqFkx2e5v+sZjdlO67JL5nNN5I6Y4+ lyZt4OPqU7nT2IBYc0mq12dovQJrJQW/Qr7jXBHBBiWffgI6dRFrm/rlBL/NoOva7+vE J36uVmEgxnlN9UxnVMz1kaP2T15T4Aqlhzmt0oGXyAdCZ1W+oeJFikLfoV0Zyq3szzbN WyYw== 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=JMRi0KoyC3dEe7o3uSmZfJtoJDIrZS0AQScbMlxvAos=; b=AUKTVyLkoaB3aEwegdXfWC5Pygw26msR6ze7jyG8VPPwpqiN8cwAUPfXQdSwuXPMTu iYBkKVU1aJeEXzQAVuvEFvwdVkasCHmyTvK3jtadElMq3AFZpivtEOGeOG3e6WZWL0hp 2tcC27H/ikHNZBNYOJ5BvUK9oyJunfmhYBRVYWjUIOV+8TF7k1/IsvWhOPi/5tb5RMTx ye4l/GXcuUaBsDxSdPJs++L857htrUYY7Vdexq/RRIZ+zv6+EDbNm8zS9yXU9HtOrOHe hShK2L5HXaqgyCyv5ACfek4ejVt7VlzkfhweiFxQp+3drYgGA0fQSi31lzvOTwe5v7Oe yE9g== 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 v20-v6si3555710plo.199.2018.03.21.05.58.08; Wed, 21 Mar 2018 05:58:23 -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 S1751806AbeCUMz7 (ORCPT + 99 others); Wed, 21 Mar 2018 08:55:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:43447 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751502AbeCUMz4 (ORCPT ); Wed, 21 Mar 2018 08:55:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AC504AFED; Wed, 21 Mar 2018 12:55:54 +0000 (UTC) Date: Wed, 21 Mar 2018 13:55:54 +0100 (CET) From: Miroslav Benes To: Petr Mladek cc: Jiri Kosina , Josh Poimboeuf , Joe Lawrence , Jessica Yu , Nicolai Stange , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] livepatch: Initialize shadow variables by init function safely In-Reply-To: <20180313155448.1998-2-pmladek@suse.com> Message-ID: References: <20180313155448.1998-1-pmladek@suse.com> <20180313155448.1998-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 > @@ -186,10 +198,13 @@ static void *__klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data, > * Return: the shadow variable data element, NULL on duplicate or > * failure. > */ > -void *klp_shadow_alloc(void *obj, unsigned long id, void *data, > - size_t size, gfp_t gfp_flags) > +void *klp_shadow_alloc(void *obj, unsigned long id, > + size_t size, gfp_t gfp_flags, > + klp_shadow_init_func_t init_func, > + void *init_data) The comment above the function should be also updated, because the function's parameters changed. > { > - return __klp_shadow_get_or_alloc(obj, id, data, size, gfp_flags, true); > + return __klp_shadow_get_or_alloc(obj, id, size, gfp_flags, > + init_func, init_data, true); > } > EXPORT_SYMBOL_GPL(klp_shadow_alloc); > > @@ -212,10 +227,13 @@ EXPORT_SYMBOL_GPL(klp_shadow_alloc); > * > * Return: the shadow variable data element, NULL on failure. > */ > -void *klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data, > - size_t size, gfp_t gfp_flags) > +void *klp_shadow_get_or_alloc(void *obj, unsigned long id, > + size_t size, gfp_t gfp_flags, > + klp_shadow_init_func_t init_func, > + void *init_data) Ditto. Thanks, Miroslav