init_module() loads the relocated module image into kernel space and runs the
modules
init function.
The module image begins with a module structure and is followed by
code and data as appropriate.
The module structure is defined as follows:
struct module {
unsigned long size_of_struct;
struct module *next;
const char *name;
unsigned long size;
long usecount;
unsigned long flags;
unsigned int nsyms;
unsigned int ndeps;
struct module_symbol *syms;
struct module_ref *deps;
struct module_ref *refs;
int (*init)(void);
void (*cleanup)(void);
const struct exception_table_entry *ex_table_start;
const struct exception_table_entry *ex_table_end;
#ifdef __alpha__
unsigned long gp;
#endif
};
All of the pointer fields, with the exception of
next and
refs, are expected to point within the module body and be
initialized as appropriate for kernel space, i.e., relocated with
the rest of the module.
This system call requires privilege.