lkml.org 
[lkml]   [2018]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm64/module: use mod->klp_info section header information
On Tue, 23 Oct 2018, Jessica Yu wrote:

> diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c
> index f0690c2ca3e0..05067717dfc5 100644
> --- a/arch/arm64/kernel/module-plts.c
> +++ b/arch/arm64/kernel/module-plts.c
> @@ -210,9 +210,15 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr
> *sechdrs,
> * entries. Record the symtab address as well.
> */
> for (i = 0; i < ehdr->e_shnum; i++) {
> - if (!strcmp(secstrings + sechdrs[i].sh_name, ".plt"))
> + if (!strcmp(secstrings + sechdrs[i].sh_name, ".plt")) {
> mod->arch.core.plt = sechdrs + i;
> - else if (!strcmp(secstrings + sechdrs[i].sh_name,
> ".init.plt"))
> + /*
> + * Keep the section index for the .plt section for
> + * livepatching. Note that .init.plt is irrelevant to
> + * livepatch, so only the shndx for .plt is saved.
> + */
> + mod->arch.core.plt_shndx = i;
> + } else if (!strcmp(secstrings + sechdrs[i].sh_name,
> ".init.plt"))

Else branches should have braces now too according to the coding style.

Otherwise it looks good to me.

Thanks,
Miroslav

\
 
 \ /
  Last update: 2018-10-24 13:58    [W:0.206 / U:7.768 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site