#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <asm/cacheflush.h>
+#include "module-verify.h"
#if 0
#define DEBUGP printk
/* If this is set, the section belongs in the init part of the module */
#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
+#define symbol_is(literal, string) \
+ (strcmp(MODULE_SYMBOL_PREFIX literal, (string)) == 0)
+
/* Protects module list */
static spinlock_t modlist_lock = SPIN_LOCK_UNLOCKED;
goto free_hdr;
}
+ /* verify the signature on the module */
+#ifdef CONFIG_MODULE_SIG
+ if (module_verify_sig(hdr, sechdrs, secstrings, mod)) {
+ err = -EPERM;
+ goto free_hdr;
+ }
+#endif
+
/* Now copy in args */
arglen = strlen_user(uargs);
if (!arglen) {
struct module *mod;
printk("Modules linked in:");
- list_for_each_entry(mod, &modules, list)
+ list_for_each_entry(mod, &modules, list) {
printk(" %s", mod->name);
+#if CONFIG_MODULE_SIG
+ if (!mod->gpgsig_ok)
+ printk("(U)");
+#endif
+ }
printk("\n");
}