Re: [PATCH v2 2/2] livepatch/x86: apply alternatives and paravirt patches after relocations
From: Petr Mladek
Date: Tue Aug 02 2016 - 09:47:15 EST
On Tue 2016-08-02 10:59:07, Miroslav Benes wrote:
> On Thu, 21 Jul 2016, Jessica Yu wrote:
>
> > Implement arch_klp_init_object_loaded() for x86, which applies
> > alternatives/paravirt patches. This fixes the order in which relocations
> > and alternatives/paravirt patches are applied.
> >
> > diff --git a/arch/x86/kernel/livepatch.c b/arch/x86/kernel/livepatch.c
> > new file mode 100644
> > index 0000000..78209f1
> > --- /dev/null
> > +++ b/arch/x86/kernel/livepatch.c
> > +#include <linux/module.h>
> > +#include <linux/kallsyms.h>
> > +#include <linux/livepatch.h>
> > +#include <asm/text-patching.h>
>
> It seems I don't have such header file here and it causes a build error.
> Shouldn't it be <asm/alternative.h>?
It is in linux-next, see 35de5b0692aaa ("x86/asm: Stop depending on
ptrace.h in alternative.h").
I agree with the other Mirek's comments. Otherwise, it looks good.
Thanks for working on it,
Petr