Merge tag 'fixes-for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm...
[deliverable/linux.git] / include / linux / module.h
index 4598bf03e98b83756f4f8ecb5b4acdfafec379ad..7760c6d344a32cd6a59cbb163a56c9bcd4888683 100644 (file)
@@ -21,7 +21,8 @@
 #include <linux/percpu.h>
 #include <asm/module.h>
 
-#include <trace/events/module.h>
+/* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */
+#define MODULE_SIG_STRING "~Module signature appended~\n"
 
 /* Not Yet Implemented */
 #define MODULE_SUPPORTED_DEVICE(name)
@@ -262,6 +263,11 @@ struct module
        const unsigned long *unused_gpl_crcs;
 #endif
 
+#ifdef CONFIG_MODULE_SIG
+       /* Signature was verified. */
+       bool sig_ok;
+#endif
+
        /* symbols that will be GPL-only in the near future. */
        const struct kernel_symbol *gpl_future_syms;
        const unsigned long *gpl_future_crcs;
@@ -452,33 +458,11 @@ void symbol_put_addr(void *addr);
 
 /* Sometimes we know we already have a refcount, and it's easier not
    to handle the error case (which only happens with rmmod --wait). */
-static inline void __module_get(struct module *module)
-{
-       if (module) {
-               preempt_disable();
-               __this_cpu_inc(module->refptr->incs);
-               trace_module_get(module, _THIS_IP_);
-               preempt_enable();
-       }
-}
+extern void __module_get(struct module *module);
 
-static inline int try_module_get(struct module *module)
-{
-       int ret = 1;
-
-       if (module) {
-               preempt_disable();
-
-               if (likely(module_is_live(module))) {
-                       __this_cpu_inc(module->refptr->incs);
-                       trace_module_get(module, _THIS_IP_);
-               } else
-                       ret = 0;
-
-               preempt_enable();
-       }
-       return ret;
-}
+/* This is the Right Way to get a module: if it fails, it's being removed,
+ * so pretend it's not there. */
+extern bool try_module_get(struct module *module);
 
 extern void module_put(struct module *module);
 
This page took 0.026179 seconds and 5 git commands to generate.