Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-11-05 Thread Ard Biesheuvel
On 1 November 2018 at 17:07, Will Deacon wrote: > Hello, Jessica, > > On Tue, Oct 30, 2018 at 02:19:10PM +0100, Jessica Yu wrote: >> +++ Will Deacon [29/10/18 15:28 +]: >> >On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: >> >>diff --git a/arch/arm64/include/asm/module.h >>

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-11-05 Thread Ard Biesheuvel
On 1 November 2018 at 17:07, Will Deacon wrote: > Hello, Jessica, > > On Tue, Oct 30, 2018 at 02:19:10PM +0100, Jessica Yu wrote: >> +++ Will Deacon [29/10/18 15:28 +]: >> >On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: >> >>diff --git a/arch/arm64/include/asm/module.h >>

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-11-01 Thread Will Deacon
Hello, Jessica, On Tue, Oct 30, 2018 at 02:19:10PM +0100, Jessica Yu wrote: > +++ Will Deacon [29/10/18 15:28 +]: > >On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: > >>diff --git a/arch/arm64/include/asm/module.h > >>b/arch/arm64/include/asm/module.h > >>index

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-11-01 Thread Will Deacon
Hello, Jessica, On Tue, Oct 30, 2018 at 02:19:10PM +0100, Jessica Yu wrote: > +++ Will Deacon [29/10/18 15:28 +]: > >On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: > >>diff --git a/arch/arm64/include/asm/module.h > >>b/arch/arm64/include/asm/module.h > >>index

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-11-01 Thread Miroslav Benes
> >Does this mean we can drop the plt pointer from this struct altogether, and > >simply offset into the section headers when applying the relocations? > > Hmm, if everyone is OK with dropping the plt pointer from struct > mod_plt_sec, then I think we can simplify this patch even further. > >

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-11-01 Thread Miroslav Benes
> >Does this mean we can drop the plt pointer from this struct altogether, and > >simply offset into the section headers when applying the relocations? > > Hmm, if everyone is OK with dropping the plt pointer from struct > mod_plt_sec, then I think we can simplify this patch even further. > >

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-30 Thread Jessica Yu
+++ Will Deacon [29/10/18 15:28 +]: Hi Jessica, On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: The arm64 module loader keeps a pointer into info->sechdrs to keep track of section header information for .plt section(s). A pointer to the relevent section header (struct

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-30 Thread Jessica Yu
+++ Will Deacon [29/10/18 15:28 +]: Hi Jessica, On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: The arm64 module loader keeps a pointer into info->sechdrs to keep track of section header information for .plt section(s). A pointer to the relevent section header (struct

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-29 Thread Will Deacon
Hi Jessica, On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: > The arm64 module loader keeps a pointer into info->sechdrs to keep track > of section header information for .plt section(s). A pointer to the > relevent section header (struct elf64_shdr) in info->sechdrs is stored > in

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-29 Thread Will Deacon
Hi Jessica, On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: > The arm64 module loader keeps a pointer into info->sechdrs to keep track > of section header information for .plt section(s). A pointer to the > relevent section header (struct elf64_shdr) in info->sechdrs is stored > in

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-29 Thread Jessica Yu
+++ Miroslav Benes [29/10/18 14:24 +0100]: diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index dd23655fda3a..490e56070a7e 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c @@ -461,5 +461,15 @@ int module_finalize(const Elf_Ehdr *hdr, #endif

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-29 Thread Jessica Yu
+++ Miroslav Benes [29/10/18 14:24 +0100]: diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index dd23655fda3a..490e56070a7e 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c @@ -461,5 +461,15 @@ int module_finalize(const Elf_Ehdr *hdr, #endif

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-29 Thread Miroslav Benes
> diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c > index dd23655fda3a..490e56070a7e 100644 > --- a/arch/arm64/kernel/module.c > +++ b/arch/arm64/kernel/module.c > @@ -461,5 +461,15 @@ int module_finalize(const Elf_Ehdr *hdr, > #endif > } > > +#ifdef CONFIG_LIVEPATCH

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-29 Thread Miroslav Benes
> diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c > index dd23655fda3a..490e56070a7e 100644 > --- a/arch/arm64/kernel/module.c > +++ b/arch/arm64/kernel/module.c > @@ -461,5 +461,15 @@ int module_finalize(const Elf_Ehdr *hdr, > #endif > } > > +#ifdef CONFIG_LIVEPATCH

[PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-26 Thread Jessica Yu
The arm64 module loader keeps a pointer into info->sechdrs to keep track of section header information for .plt section(s). A pointer to the relevent section header (struct elf64_shdr) in info->sechdrs is stored in mod->arch.{init,core}.plt. This pointer may be accessed while applying relocations

[PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-26 Thread Jessica Yu
The arm64 module loader keeps a pointer into info->sechdrs to keep track of section header information for .plt section(s). A pointer to the relevent section header (struct elf64_shdr) in info->sechdrs is stored in mod->arch.{init,core}.plt. This pointer may be accessed while applying relocations