]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/module.h
printk: when dumping regs, show the stack, not thread_info
[karo-tx-linux.git] / include / linux / module.h
index 2bb0c308570672e7105b14f85a4215b0f9500207..3daf2b3a09d29b934a865be849dab354bd00dde0 100644 (file)
@@ -330,6 +330,15 @@ struct mod_kallsyms {
        char *strtab;
 };
 
+#ifdef CONFIG_LIVEPATCH
+struct klp_modinfo {
+       Elf_Ehdr hdr;
+       Elf_Shdr *sechdrs;
+       char *secstrings;
+       unsigned int symndx;
+};
+#endif
+
 struct module {
        enum module_state state;
 
@@ -456,7 +465,11 @@ struct module {
 #endif
 
 #ifdef CONFIG_LIVEPATCH
+       bool klp; /* Is this a livepatch module? */
        bool klp_alive;
+
+       /* Elf information */
+       struct klp_modinfo *klp_info;
 #endif
 
 #ifdef CONFIG_MODULE_UNLOAD
@@ -630,6 +643,18 @@ static inline bool module_requested_async_probing(struct module *module)
        return module && module->async_probe_requested;
 }
 
+#ifdef CONFIG_LIVEPATCH
+static inline bool is_livepatch_module(struct module *mod)
+{
+       return mod->klp;
+}
+#else /* !CONFIG_LIVEPATCH */
+static inline bool is_livepatch_module(struct module *mod)
+{
+       return false;
+}
+#endif /* CONFIG_LIVEPATCH */
+
 #else /* !CONFIG_MODULES... */
 
 /* Given an address, look for it in the exception tables. */