mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Petr Mladek <pmladek@suse.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	Jessica Yu <jeyu@kernel.org>, Nicolai Stange <nstange@suse.de>,
	live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] livepatch: Initialize shadow variables by init function safely
Date: Wed, 21 Mar 2018 13:55:54 +0100 (CET)	[thread overview]
Message-ID: <alpine.LSU.2.21.1803211352090.19993@pobox.suse.cz> (raw)
In-Reply-To: <20180313155448.1998-2-pmladek@suse.com>


> @@ -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

  parent reply	other threads:[~2018-03-21 12:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13 15:54 [PATCH 0/2] livepatch: Allocate and free shadow variables more safely Petr Mladek
2018-03-13 15:54 ` [PATCH 1/2] livepatch: Initialize shadow variables by init function safely Petr Mladek
2018-03-14 19:27   ` Joe Lawrence
2018-03-14 19:44     ` Josh Poimboeuf
2018-04-04 13:08       ` Petr Mladek
2018-03-14 19:28   ` Josh Poimboeuf
2018-03-14 19:43     ` Joe Lawrence
2018-03-14 20:22       ` Josh Poimboeuf
2018-03-21 12:55   ` Miroslav Benes [this message]
2018-03-13 15:54 ` [PATCH 2/2] livepatch: Allow to unregister or free shadow data using a custom function Petr Mladek
2018-03-14 19:32   ` Josh Poimboeuf
2018-03-21 13:05     ` Miroslav Benes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.21.1803211352090.19993@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=jeyu@kernel.org \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=nstange@suse.de \
    --cc=pmladek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®