diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-13 09:27:50 +0100 |
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-13 09:27:50 +0100 |
| commit | a1eccc574f977bd21a4ec8ac54bd73a2756bd281 (patch) | |
| tree | 4bf81d9f35b36aebb150128e865193bf8984bf8c /include/linux/moduleloader.h | |
| parent | 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9 (diff) | |
| parent | fe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff) | |
Merge drm/drm-next into drm-misc-next
Backmerging to get v6.3-rc1 and sync with the other DRM trees.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'include/linux/moduleloader.h')
| -rw-r--r-- | include/linux/moduleloader.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h index 7b4587a19189..03be088fb439 100644 --- a/include/linux/moduleloader.h +++ b/include/linux/moduleloader.h @@ -75,6 +75,23 @@ int apply_relocate_add(Elf_Shdr *sechdrs, unsigned int symindex, unsigned int relsec, struct module *mod); +#ifdef CONFIG_LIVEPATCH +/* + * Some architectures (namely x86_64 and ppc64) perform sanity checks when + * applying relocations. If a patched module gets unloaded and then later + * reloaded (and re-patched), klp re-applies relocations to the replacement + * function(s). Any leftover relocations from the previous loading of the + * patched module might trigger the sanity checks. + * + * To prevent that, when unloading a patched module, clear out any relocations + * that might trigger arch-specific sanity checks on a future module reload. + */ +void clear_relocate_add(Elf_Shdr *sechdrs, + const char *strtab, + unsigned int symindex, + unsigned int relsec, + struct module *me); +#endif #else static inline int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, |
