All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 2/4] gcov: use within_module() helper.
Date: Mon, 9 Nov 2015 09:19:43 +0100	[thread overview]
Message-ID: <5640571F.2040609@linux.vnet.ibm.com> (raw)
In-Reply-To: <1447043037-10833-3-git-send-email-rusty@rustcorp.com.au>

On 09.11.2015 05:23, Rusty Russell wrote:
> An exact mapping would be within_module_core(), but at this stage
> (MODULE_STATE_GOING) the init section is empty, and this is clearer.
> 
> Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> ---
>  kernel/gcov/base.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
> index 7080ae1eb6c1..2f9df37940a0 100644
> --- a/kernel/gcov/base.c
> +++ b/kernel/gcov/base.c
> @@ -123,11 +123,6 @@ void gcov_enable_events(void)
>  }
> 
>  #ifdef CONFIG_MODULES
> -static inline int within(void *addr, void *start, unsigned long size)
> -{
> -	return ((addr >= start) && (addr < start + size));
> -}
> -
>  /* Update list and generate events when modules are unloaded. */
>  static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
>  				void *data)
> @@ -142,7 +137,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
> 
>  	/* Remove entries located in module from linked list. */
>  	while ((info = gcov_info_next(info))) {
> -		if (within(info, mod->module_core, mod->core_size)) {
> +		if (within_module((unsigned long)info, mod)) {
>  			gcov_info_unlink(prev, info);
>  			if (gcov_events_enabled)
>  				gcov_event(GCOV_REMOVE, info);

Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>


  reply	other threads:[~2015-11-09  8:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09  4:23 [PATCH 0/4] module RO/NX cleanups Rusty Russell
2015-11-09  4:23 ` [PATCH 1/4] module: Use the same logic for setting and unsetting RO/NX Rusty Russell
2015-11-09  4:23 ` [PATCH 2/4] gcov: use within_module() helper Rusty Russell
2015-11-09  8:19   ` Peter Oberparleiter [this message]
2015-11-09  4:23 ` [PATCH 3/4] module: use a structure to encapsulate layout Rusty Russell
2015-11-09  9:41   ` Peter Zijlstra
2015-11-10  1:41     ` Rusty Russell
2015-11-09 16:54   ` Josh Poimboeuf
2015-11-09  4:23 ` [PATCH 4/4] module: clean up RO/NX handling Rusty Russell
2015-11-09 19:51   ` Josh Poimboeuf
2015-11-10  1:57     ` Rusty Russell
2015-11-10  4:27       ` Josh Poimboeuf
2015-11-12  1:28         ` Rusty Russell
2015-11-12  3:41           ` Josh Poimboeuf

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=5640571F.2040609@linux.vnet.ibm.com \
    --to=oberpar@linux.vnet.ibm.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rusty@rustcorp.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.