Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65d52cc9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param:
  module: cleanup FIXME comments about trimming exception table entries.
  module: trim exception table on init free.
  module: merge module_alloc() finally
  uml module: fix uml build process due to this merge
  x86 module: merge the rest functions with macros
  x86 module: merge the same functions in module_32.c and module_64.c
  uvesafb: improve parameter handling.
  module_param: allow 'bool' module_params to be bool, not just int.
  module_param: add __same_type convenience wrapper for __builtin_types_compatible_p
  module_param: split perm field into flags and perm
  module_param: invbool should take a 'bool', not an 'int'
  cyber2000fb.c: use proper method for stopping unload if CONFIG_ARCH_SHARK
parents d614aec4 5933048c
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -48,6 +48,27 @@ void sort_extable(struct exception_table_entry *start,
	     cmp_ex, swap_ex);
}

#ifdef CONFIG_MODULES
/*
 * Any entry referring to the module init will be at the beginning or
 * the end.
 */
void trim_init_extable(struct module *m)
{
	/*trim the beginning*/
	while (m->num_exentries &&
	       within_module_init(ex_to_addr(&m->extable[0]), m)) {
		m->extable++;
		m->num_exentries--;
	}
	/*trim the end*/
	while (m->num_exentries &&
	       within_module_init(ex_to_addr(&m->extable[m->num_exentries-1]),
				  m))
		m->num_exentries--;
}
#endif /* CONFIG_MODULES */

const struct exception_table_entry *
search_extable(const struct exception_table_entry *first,
	       const struct exception_table_entry *last,
+0 −2
Original line number Diff line number Diff line
@@ -32,8 +32,6 @@ void module_free(struct module *mod, void *module_region)
	mod->arch.syminfo = NULL;

	vfree(module_region);
	/* FIXME: if module_region == mod->init_region, trim exception
	 * table entries. */
}

static inline int check_rela(Elf32_Rela *rela, struct module *module,
+0 −2
Original line number Diff line number Diff line
@@ -48,8 +48,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
	FREE_MODULE(module_region);
	/* FIXME: If module_region == mod->init_region, trim exception
	   table entries. */
}

/* We don't need anything special. */
+0 −2
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
	vfree(module_region);
	/* FIXME: If module_region == mod->init_region, trim exception
           table entries. */
}

/* We don't need anything special. */
+0 −2
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@ void *module_alloc(unsigned long size)
void module_free(struct module *mod, void *module_region)
{
	vfree(module_region);
	/* FIXME: If module_region == mod->init_region, trim exception
           table entries. */
}

/* We don't need anything special. */
Loading