All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Amerigo Wang <amwang@redhat.com>, linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	jdike@addtoit.com, mingo@elte.hu, sparclinux@vger.kernel.org,
	linux-ia64@vger.kernel.org
Subject: Re: [Patch 4/4] module: trim exception table in module_free()
Date: Wed, 27 May 2009 11:51:26 +0930	[thread overview]
Message-ID: <200905271151.28045.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090526083751.5050.60959.sendpatchset@localhost.localdomain>

On Tue, 26 May 2009 06:05:39 pm Amerigo Wang wrote:
>  void module_free(struct module *mod, void *module_region)
>  {
>  	vfree(module_region);
> -	/* FIXME: If module_region == mod->init_region, trim exception
> -	   table entries. */
> +	if (module_region == mod->module_init)
> +		mod->num_exentries = 0;
>  }

Hi Amerigo,

   This looks wrong.  The extable covers both init and core exception entries.   
We want to remove the ones in the module_init section.  The good news is that 
it's sorted, so they're either at the start or the end (except sparc 32).

  The bad news is that this is really a generic problem, and deserves a 
generic fix.  That's easy for archs which use the generic sort_extable(), but 
alpha, ia64 and sparc(32) will need to define their own trim_extable().

Thanks!
Rusty.

WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: Amerigo Wang <amwang@redhat.com>, linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	jdike@addtoit.com, mingo@elte.hu, sparclinux@vger.kernel.org,
	linux-ia64@vger.kernel.org
Subject: Re: [Patch 4/4] module: trim exception table in module_free()
Date: Wed, 27 May 2009 02:33:26 +0000	[thread overview]
Message-ID: <200905271151.28045.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090526083751.5050.60959.sendpatchset@localhost.localdomain>

On Tue, 26 May 2009 06:05:39 pm Amerigo Wang wrote:
>  void module_free(struct module *mod, void *module_region)
>  {
>  	vfree(module_region);
> -	/* FIXME: If module_region = mod->init_region, trim exception
> -	   table entries. */
> +	if (module_region = mod->module_init)
> +		mod->num_exentries = 0;
>  }

Hi Amerigo,

   This looks wrong.  The extable covers both init and core exception entries.   
We want to remove the ones in the module_init section.  The good news is that 
it's sorted, so they're either at the start or the end (except sparc 32).

  The bad news is that this is really a generic problem, and deserves a 
generic fix.  That's easy for archs which use the generic sort_extable(), but 
alpha, ia64 and sparc(32) will need to define their own trim_extable().

Thanks!
Rusty.

  reply	other threads:[~2009-05-27  2:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26  8:35 [Patch 0/4] module: merge module_32.c and module_64.c Amerigo Wang
2009-05-26  8:35 ` [Patch 1/4] x86 module: merge the same functions in " Amerigo Wang
2009-05-26  8:35 ` [Patch 2/4] x86 module: merge the rest functions with macros Amerigo Wang
2009-05-26  9:21   ` Christoph Hellwig
2009-05-26 10:02     ` Amerigo Wang
2009-05-26  8:35 ` [Patch 3/4] uml module: fix uml build process due to this merge Amerigo Wang
2009-05-26  8:35 ` [Patch 4/4] module: trim exception table in module_free() Amerigo Wang
2009-05-27  2:21   ` Rusty Russell [this message]
2009-05-27  2:33     ` Rusty Russell
2009-05-27  3:11     ` Amerigo Wang
2009-05-27  3:11       ` Amerigo Wang
2009-05-27  5:23       ` Rusty Russell
2009-05-27  5:35         ` Rusty Russell
2009-05-27  5:48         ` Amerigo Wang
2009-05-27  5:48           ` Amerigo Wang
2009-05-27  7:46         ` Amerigo Wang
2009-05-27  7:46           ` Amerigo Wang
2009-05-28  6:55           ` Rusty Russell
2009-05-28  7:07             ` Rusty Russell
2009-05-31  5:15             ` Amerigo Wang
2009-05-31  5:15               ` Amerigo Wang
2009-06-01 12:28               ` Rusty Russell
2009-06-01 12:40                 ` Rusty Russell

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=200905271151.28045.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=jdike@addtoit.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sparclinux@vger.kernel.org \
    /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.