~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/module.h

Version: ~ [ linux-5.16 ] ~ [ linux-5.15.13 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.90 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.170 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.224 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.261 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.296 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.298 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _LINUX_MODULE_H
  2 #define _LINUX_MODULE_H
  3 /*
  4  * Dynamic loading of modules into the kernel.
  5  *
  6  * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
  7  * Rewritten again by Rusty Russell, 2002
  8  */
  9 #include <linux/list.h>
 10 #include <linux/stat.h>
 11 #include <linux/compiler.h>
 12 #include <linux/cache.h>
 13 #include <linux/kmod.h>
 14 #include <linux/elf.h>
 15 #include <linux/stringify.h>
 16 #include <linux/kobject.h>
 17 #include <linux/moduleparam.h>
 18 #include <linux/tracepoint.h>
 19 #include <linux/export.h>
 20 
 21 #include <linux/percpu.h>
 22 #include <asm/module.h>
 23 
 24 /* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */
 25 #define MODULE_SIG_STRING "~Module signature appended~\n"
 26 
 27 /* Not Yet Implemented */
 28 #define MODULE_SUPPORTED_DEVICE(name)
 29 
 30 #define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
 31 
 32 struct modversion_info {
 33         unsigned long crc;
 34         char name[MODULE_NAME_LEN];
 35 };
 36 
 37 struct module;
 38 
 39 struct module_kobject {
 40         struct kobject kobj;
 41         struct module *mod;
 42         struct kobject *drivers_dir;
 43         struct module_param_attrs *mp;
 44         struct completion *kobj_completion;
 45 };
 46 
 47 struct module_attribute {
 48         struct attribute attr;
 49         ssize_t (*show)(struct module_attribute *, struct module_kobject *,
 50                         char *);
 51         ssize_t (*store)(struct module_attribute *, struct module_kobject *,
 52                          const char *, size_t count);
 53         void (*setup)(struct module *, const char *);
 54         int (*test)(struct module *);
 55         void (*free)(struct module *);
 56 };
 57 
 58 struct module_version_attribute {
 59         struct module_attribute mattr;
 60         const char *module_name;
 61         const char *version;
 62 } __attribute__ ((__aligned__(sizeof(void *))));
 63 
 64 extern ssize_t __modver_version_show(struct module_attribute *,
 65                                      struct module_kobject *, char *);
 66 
 67 extern struct module_attribute module_uevent;
 68 
 69 /* These are either module local, or the kernel's dummy ones. */
 70 extern int init_module(void);
 71 extern void cleanup_module(void);
 72 
 73 /* Archs provide a method of finding the correct exception table. */
 74 struct exception_table_entry;
 75 
 76 const struct exception_table_entry *
 77 search_extable(const struct exception_table_entry *first,
 78                const struct exception_table_entry *last,
 79                unsigned long value);
 80 void sort_extable(struct exception_table_entry *start,
 81                   struct exception_table_entry *finish);
 82 void sort_main_extable(void);
 83 void trim_init_extable(struct module *m);
 84 
 85 #ifdef MODULE
 86 #define MODULE_GENERIC_TABLE(gtype, name)                       \
 87 extern const struct gtype##_id __mod_##gtype##_table            \
 88   __attribute__ ((unused, alias(__stringify(name))))
 89 
 90 #else  /* !MODULE */
 91 #define MODULE_GENERIC_TABLE(gtype, name)
 92 #endif
 93 
 94 /* Generic info of form tag = "info" */
 95 #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
 96 
 97 /* For userspace: you can also call me... */
 98 #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
 99 
100 /* Soft module dependencies. See man modprobe.d for details.
101  * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
102  */
103 #define MODULE_SOFTDEP(_softdep) MODULE_INFO(softdep, _softdep)
104 
105 /*
106  * The following license idents are currently accepted as indicating free
107  * software modules
108  *
109  *      "GPL"                           [GNU Public License v2 or later]
110  *      "GPL v2"                        [GNU Public License v2]
111  *      "GPL and additional rights"     [GNU Public License v2 rights and more]
112  *      "Dual BSD/GPL"                  [GNU Public License v2
113  *                                       or BSD license choice]
114  *      "Dual MIT/GPL"                  [GNU Public License v2
115  *                                       or MIT license choice]
116  *      "Dual MPL/GPL"                  [GNU Public License v2
117  *                                       or Mozilla license choice]
118  *
119  * The following other idents are available
120  *
121  *      "Proprietary"                   [Non free products]
122  *
123  * There are dual licensed components, but when running with Linux it is the
124  * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
125  * is a GPL combined work.
126  *
127  * This exists for several reasons
128  * 1.   So modinfo can show license info for users wanting to vet their setup
129  *      is free
130  * 2.   So the community can ignore bug reports including proprietary modules
131  * 3.   So vendors can do likewise based on their own policies
132  */
133 #define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
134 
135 /*
136  * Author(s), use "Name <email>" or just "Name", for multiple
137  * authors use multiple MODULE_AUTHOR() statements/lines.
138  */
139 #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
140 
141 /* What your module does. */
142 #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
143 
144 #define MODULE_DEVICE_TABLE(type, name)         \
145   MODULE_GENERIC_TABLE(type##_device, name)
146 
147 /* Version of form [<epoch>:]<version>[-<extra-version>].
148  * Or for CVS/RCS ID version, everything but the number is stripped.
149  * <epoch>: A (small) unsigned integer which allows you to start versions
150  * anew. If not mentioned, it's zero.  eg. "2:1.0" is after
151  * "1:2.0".
152 
153  * <version>: The <version> may contain only alphanumerics and the
154  * character `.'.  Ordered by numeric sort for numeric parts,
155  * ascii sort for ascii parts (as per RPM or DEB algorithm).
156 
157  * <extraversion>: Like <version>, but inserted for local
158  * customizations, eg "rh3" or "rusty1".
159 
160  * Using this automatically adds a checksum of the .c files and the
161  * local headers in "srcversion".
162  */
163 
164 #if defined(MODULE) || !defined(CONFIG_SYSFS)
165 #define MODULE_VERSION(_version) MODULE_INFO(version, _version)
166 #else
167 #define MODULE_VERSION(_version)                                        \
168         static struct module_version_attribute ___modver_attr = {       \
169                 .mattr  = {                                             \
170                         .attr   = {                                     \
171                                 .name   = "version",                    \
172                                 .mode   = S_IRUGO,                      \
173                         },                                              \
174                         .show   = __modver_version_show,                \
175                 },                                                      \
176                 .module_name    = KBUILD_MODNAME,                       \
177                 .version        = _version,                             \
178         };                                                              \
179         static const struct module_version_attribute                    \
180         __used __attribute__ ((__section__ ("__modver")))               \
181         * __moduleparam_const __modver_attr = &___modver_attr
182 #endif
183 
184 /* Optional firmware file (or files) needed by the module
185  * format is simply firmware file name.  Multiple firmware
186  * files require multiple MODULE_FIRMWARE() specifiers */
187 #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
188 
189 /* Given an address, look for it in the exception tables */
190 const struct exception_table_entry *search_exception_tables(unsigned long add);
191 
192 struct notifier_block;
193 
194 #ifdef CONFIG_MODULES
195 
196 extern int modules_disabled; /* for sysctl */
197 /* Get/put a kernel symbol (calls must be symmetric) */
198 void *__symbol_get(const char *symbol);
199 void *__symbol_get_gpl(const char *symbol);
200 #define symbol_get(x) ((typeof(&x))(__symbol_get(VMLINUX_SYMBOL_STR(x))))
201 
202 /* modules using other modules: kdb wants to see this. */
203 struct module_use {
204         struct list_head source_list;
205         struct list_head target_list;
206         struct module *source, *target;
207 };
208 
209 enum module_state {
210         MODULE_STATE_LIVE,      /* Normal state. */
211         MODULE_STATE_COMING,    /* Full formed, running module_init. */
212         MODULE_STATE_GOING,     /* Going away. */
213         MODULE_STATE_UNFORMED,  /* Still setting it up. */
214 };
215 
216 /**
217  * struct module_ref - per cpu module reference counts
218  * @incs: number of module get on this cpu
219  * @decs: number of module put on this cpu
220  *
221  * We force an alignment on 8 or 16 bytes, so that alloc_percpu()
222  * put @incs/@decs in same cache line, with no extra memory cost,
223  * since alloc_percpu() is fine grained.
224  */
225 struct module_ref {
226         unsigned long incs;
227         unsigned long decs;
228 } __attribute((aligned(2 * sizeof(unsigned long))));
229 
230 struct mod_kallsyms {
231         Elf_Sym *symtab;
232         unsigned int num_symtab;
233         char *strtab;
234 };
235 
236 struct module {
237         enum module_state state;
238 
239         /* Member of list of modules */
240         struct list_head list;
241 
242         /* Unique handle for this module */
243         char name[MODULE_NAME_LEN];
244 
245         /* Sysfs stuff. */
246         struct module_kobject mkobj;
247         struct module_attribute *modinfo_attrs;
248         const char *version;
249         const char *srcversion;
250         struct kobject *holders_dir;
251 
252         /* Exported symbols */
253         const struct kernel_symbol *syms;
254         const unsigned long *crcs;
255         unsigned int num_syms;
256 
257         /* Kernel parameters. */
258         struct kernel_param *kp;
259         unsigned int num_kp;
260 
261         /* GPL-only exported symbols. */
262         unsigned int num_gpl_syms;
263         const struct kernel_symbol *gpl_syms;
264         const unsigned long *gpl_crcs;
265 
266 #ifdef CONFIG_UNUSED_SYMBOLS
267         /* unused exported symbols. */
268         const struct kernel_symbol *unused_syms;
269         const unsigned long *unused_crcs;
270         unsigned int num_unused_syms;
271 
272         /* GPL-only, unused exported symbols. */
273         unsigned int num_unused_gpl_syms;
274         const struct kernel_symbol *unused_gpl_syms;
275         const unsigned long *unused_gpl_crcs;
276 #endif
277 
278 #ifdef CONFIG_MODULE_SIG
279         /* Signature was verified. */
280         bool sig_ok;
281 #endif
282 
283         /* symbols that will be GPL-only in the near future. */
284         const struct kernel_symbol *gpl_future_syms;
285         const unsigned long *gpl_future_crcs;
286         unsigned int num_gpl_future_syms;
287 
288         /* Exception table */
289         unsigned int num_exentries;
290         struct exception_table_entry *extable;
291 
292         /* Startup function. */
293         int (*init)(void);
294 
295         /* If this is non-NULL, vfree after init() returns */
296         void *module_init;
297 
298         /* Here is the actual code + data, vfree'd on unload. */
299         void *module_core;
300 
301         /* Here are the sizes of the init and core sections */
302         unsigned int init_size, core_size;
303 
304         /* The size of the executable code in each section.  */
305         unsigned int init_text_size, core_text_size;
306 
307         /* Size of RO sections of the module (text+rodata) */
308         unsigned int init_ro_size, core_ro_size;
309 
310         /* Arch-specific module values */
311         struct mod_arch_specific arch;
312 
313         unsigned int taints;    /* same bits as kernel:tainted */
314 
315 #ifdef CONFIG_GENERIC_BUG
316         /* Support for BUG */
317         unsigned num_bugs;
318         struct list_head bug_list;
319         struct bug_entry *bug_table;
320 #endif
321 
322 #ifdef CONFIG_KALLSYMS
323         /* Protected by RCU and/or module_mutex: use rcu_dereference() */
324         struct mod_kallsyms *kallsyms;
325         struct mod_kallsyms core_kallsyms;
326 
327         /* Section attributes */
328         struct module_sect_attrs *sect_attrs;
329 
330         /* Notes attributes */
331         struct module_notes_attrs *notes_attrs;
332 #endif
333 
334         /* The command line arguments (may be mangled).  People like
335            keeping pointers to this stuff */
336         char *args;
337 
338 #ifdef CONFIG_SMP
339         /* Per-cpu data. */
340         void __percpu *percpu;
341         unsigned int percpu_size;
342 #endif
343 
344 #ifdef CONFIG_TRACEPOINTS
345         unsigned int num_tracepoints;
346         struct tracepoint * const *tracepoints_ptrs;
347 #endif
348 #ifdef HAVE_JUMP_LABEL
349         struct jump_entry *jump_entries;
350         unsigned int num_jump_entries;
351 #endif
352 #ifdef CONFIG_TRACING
353         unsigned int num_trace_bprintk_fmt;
354         const char **trace_bprintk_fmt_start;
355 #endif
356 #ifdef CONFIG_EVENT_TRACING
357         struct ftrace_event_call **trace_events;
358         unsigned int num_trace_events;
359 #endif
360 #ifdef CONFIG_FTRACE_MCOUNT_RECORD
361         unsigned int num_ftrace_callsites;
362         unsigned long *ftrace_callsites;
363 #endif
364 
365 #ifdef CONFIG_MODULE_UNLOAD
366         /* What modules depend on me? */
367         struct list_head source_list;
368         /* What modules do I depend on? */
369         struct list_head target_list;
370 
371         /* Destruction function. */
372         void (*exit)(void);
373 
374         struct module_ref __percpu *refptr;
375 #endif
376 
377 #ifdef CONFIG_CONSTRUCTORS
378         /* Constructor functions. */
379         ctor_fn_t *ctors;
380         unsigned int num_ctors;
381 #endif
382 };
383 #ifndef MODULE_ARCH_INIT
384 #define MODULE_ARCH_INIT {}
385 #endif
386 
387 extern struct mutex module_mutex;
388 
389 /* FIXME: It'd be nice to isolate modules during init, too, so they
390    aren't used before they (may) fail.  But presently too much code
391    (IDE & SCSI) require entry into the module during init.*/
392 static inline int module_is_live(struct module *mod)
393 {
394         return mod->state != MODULE_STATE_GOING;
395 }
396 
397 struct module *__module_text_address(unsigned long addr);
398 struct module *__module_address(unsigned long addr);
399 bool is_module_address(unsigned long addr);
400 bool is_module_percpu_address(unsigned long addr);
401 bool is_module_text_address(unsigned long addr);
402 
403 static inline int within_module_core(unsigned long addr, const struct module *mod)
404 {
405         return (unsigned long)mod->module_core <= addr &&
406                addr < (unsigned long)mod->module_core + mod->core_size;
407 }
408 
409 static inline int within_module_init(unsigned long addr, const struct module *mod)
410 {
411         return (unsigned long)mod->module_init <= addr &&
412                addr < (unsigned long)mod->module_init + mod->init_size;
413 }
414 
415 /* Search for module by name: must hold module_mutex. */
416 struct module *find_module(const char *name);
417 
418 struct symsearch {
419         const struct kernel_symbol *start, *stop;
420         const unsigned long *crcs;
421         enum {
422                 NOT_GPL_ONLY,
423                 GPL_ONLY,
424                 WILL_BE_GPL_ONLY,
425         } licence;
426         bool unused;
427 };
428 
429 /* Search for an exported symbol by name. */
430 const struct kernel_symbol *find_symbol(const char *name,
431                                         struct module **owner,
432                                         const unsigned long **crc,
433                                         bool gplok,
434                                         bool warn);
435 
436 /* Walk the exported symbol table */
437 bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
438                                     struct module *owner,
439                                     void *data), void *data);
440 
441 /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if
442    symnum out of range. */
443 int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
444                         char *name, char *module_name, int *exported);
445 
446 /* Look for this name: can be of form module:name. */
447 unsigned long module_kallsyms_lookup_name(const char *name);
448 
449 int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
450                                              struct module *, unsigned long),
451                                    void *data);
452 
453 extern void __module_put_and_exit(struct module *mod, long code)
454         __attribute__((noreturn));
455 #define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
456 
457 #ifdef CONFIG_MODULE_UNLOAD
458 unsigned long module_refcount(struct module *mod);
459 void __symbol_put(const char *symbol);
460 #define symbol_put(x) __symbol_put(VMLINUX_SYMBOL_STR(x))
461 void symbol_put_addr(void *addr);
462 
463 /* Sometimes we know we already have a refcount, and it's easier not
464    to handle the error case (which only happens with rmmod --wait). */
465 extern void __module_get(struct module *module);
466 
467 /* This is the Right Way to get a module: if it fails, it's being removed,
468  * so pretend it's not there. */
469 extern bool try_module_get(struct module *module);
470 
471 extern void module_put(struct module *module);
472 
473 #else /*!CONFIG_MODULE_UNLOAD*/
474 static inline int try_module_get(struct module *module)
475 {
476         return !module || module_is_live(module);
477 }
478 static inline void module_put(struct module *module)
479 {
480 }
481 static inline void __module_get(struct module *module)
482 {
483 }
484 #define symbol_put(x) do { } while (0)
485 #define symbol_put_addr(p) do { } while (0)
486 
487 #endif /* CONFIG_MODULE_UNLOAD */
488 int ref_module(struct module *a, struct module *b);
489 
490 /* This is a #define so the string doesn't get put in every .o file */
491 #define module_name(mod)                        \
492 ({                                              \
493         struct module *__mod = (mod);           \
494         __mod ? __mod->name : "kernel";         \
495 })
496 
497 /* For kallsyms to ask for address resolution.  namebuf should be at
498  * least KSYM_NAME_LEN long: a pointer to namebuf is returned if
499  * found, otherwise NULL. */
500 const char *module_address_lookup(unsigned long addr,
501                             unsigned long *symbolsize,
502                             unsigned long *offset,
503                             char **modname,
504                             char *namebuf);
505 int lookup_module_symbol_name(unsigned long addr, char *symname);
506 int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
507 
508 /* For extable.c to search modules' exception tables. */
509 const struct exception_table_entry *search_module_extables(unsigned long addr);
510 
511 int register_module_notifier(struct notifier_block *nb);
512 int unregister_module_notifier(struct notifier_block *nb);
513 
514 extern void print_modules(void);
515 
516 #else /* !CONFIG_MODULES... */
517 
518 /* Given an address, look for it in the exception tables. */
519 static inline const struct exception_table_entry *
520 search_module_extables(unsigned long addr)
521 {
522         return NULL;
523 }
524 
525 static inline struct module *__module_address(unsigned long addr)
526 {
527         return NULL;
528 }
529 
530 static inline struct module *__module_text_address(unsigned long addr)
531 {
532         return NULL;
533 }
534 
535 static inline bool is_module_address(unsigned long addr)
536 {
537         return false;
538 }
539 
540 static inline bool is_module_percpu_address(unsigned long addr)
541 {
542         return false;
543 }
544 
545 static inline bool is_module_text_address(unsigned long addr)
546 {
547         return false;
548 }
549 
550 /* Get/put a kernel symbol (calls should be symmetric) */
551 #define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
552 #define symbol_put(x) do { } while (0)
553 #define symbol_put_addr(x) do { } while (0)
554 
555 static inline void __module_get(struct module *module)
556 {
557 }
558 
559 static inline int try_module_get(struct module *module)
560 {
561         return 1;
562 }
563 
564 static inline void module_put(struct module *module)
565 {
566 }
567 
568 #define module_name(mod) "kernel"
569 
570 /* For kallsyms to ask for address resolution.  NULL means not found. */
571 static inline const char *module_address_lookup(unsigned long addr,
572                                           unsigned long *symbolsize,
573                                           unsigned long *offset,
574                                           char **modname,
575                                           char *namebuf)
576 {
577         return NULL;
578 }
579 
580 static inline int lookup_module_symbol_name(unsigned long addr, char *symname)
581 {
582         return -ERANGE;
583 }
584 
585 static inline int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name)
586 {
587         return -ERANGE;
588 }
589 
590 static inline int module_get_kallsym(unsigned int symnum, unsigned long *value,
591                                         char *type, char *name,
592                                         char *module_name, int *exported)
593 {
594         return -ERANGE;
595 }
596 
597 static inline unsigned long module_kallsyms_lookup_name(const char *name)
598 {
599         return 0;
600 }
601 
602 static inline int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
603                                                            struct module *,
604                                                            unsigned long),
605                                                  void *data)
606 {
607         return 0;
608 }
609 
610 static inline int register_module_notifier(struct notifier_block *nb)
611 {
612         /* no events will happen anyway, so this can always succeed */
613         return 0;
614 }
615 
616 static inline int unregister_module_notifier(struct notifier_block *nb)
617 {
618         return 0;
619 }
620 
621 #define module_put_and_exit(code) do_exit(code)
622 
623 static inline void print_modules(void)
624 {
625 }
626 #endif /* CONFIG_MODULES */
627 
628 #ifdef CONFIG_SYSFS
629 extern struct kset *module_kset;
630 extern struct kobj_type module_ktype;
631 extern int module_sysfs_initialized;
632 #endif /* CONFIG_SYSFS */
633 
634 #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
635 
636 /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
637 
638 #define __MODULE_STRING(x) __stringify(x)
639 
640 #ifdef CONFIG_DEBUG_SET_MODULE_RONX
641 extern void set_all_modules_text_rw(void);
642 extern void set_all_modules_text_ro(void);
643 #else
644 static inline void set_all_modules_text_rw(void) { }
645 static inline void set_all_modules_text_ro(void) { }
646 #endif
647 
648 #ifdef CONFIG_GENERIC_BUG
649 void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,
650                          struct module *);
651 void module_bug_cleanup(struct module *);
652 
653 #else   /* !CONFIG_GENERIC_BUG */
654 
655 static inline void module_bug_finalize(const Elf_Ehdr *hdr,
656                                         const Elf_Shdr *sechdrs,
657                                         struct module *mod)
658 {
659 }
660 static inline void module_bug_cleanup(struct module *mod) {}
661 #endif  /* CONFIG_GENERIC_BUG */
662 
663 #endif /* _LINUX_MODULE_H */
664 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp