lkml.org 
[lkml]   [2009]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 4/4] module: trim exception table in module_free()
Rusty Russell wrote:
> __ex_table ends up with two entries:
>
> Contents of section __ex_table:
> 0000 0c000000 00000000 0e000000 00000000 ................
> 0010 10000000 0a000000 12000000 0a000000 ................
>
> The first is for the __put_user in .text (extable_not_init()) and the second is
> for the one in .init.text (init()).
>
> Depending on how the module gets allocated, the one referring to .init.text
> may be first or last.
>

Hmm, how about the following? :-)

struct exception_table_entry *p = mod->extable;

for (;p <= mod->extable+mod->num_exentries; p++ )
if (with_in_module_init(p->insn, mod))
trim_it(p);





\
 
 \ /
  Last update: 2009-05-27 09:55    [W:0.065 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site