On Wed, Oct 23, 2019 at 05:16:54PM +0200, Peter Zijlstra wrote: > @@ -157,6 +158,14 @@ static int __apply_relocate_add(Elf64_Sh > > val = sym->st_value + rel[i].r_addend; > > + /* > + * .klp.rela.* sections should only contain module > + * related RELAs. All core-kernel RELAs should be in > + * normal .rela.* sections and be applied when loading > + * the patch module itself. > + */ > + WARN_ON_ONCE(klp && core_kernel_text(val)); > +
This isn't quite true, we also use .klp.rela sections to access unexported vmlinux symbols. -- Josh

