Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1464447 > unrolled thread

Re: [PATCH] arm64: take SHN_LIVEPATCH syms into account when calculating plt_max_entries

Started byMiroslav Benes <mbenes@suse.cz>
First post2016-08-17 11:40 +0200
Last post2016-08-17 11:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] arm64: take SHN_LIVEPATCH syms into account when  calculating plt_max_entries Miroslav Benes <mbenes@suse.cz> - 2016-08-17 11:40 +0200

#1464447 — Re: [PATCH] arm64: take SHN_LIVEPATCH syms into account when calculating plt_max_entries

FromMiroslav Benes <mbenes@suse.cz>
Date2016-08-17 11:40 +0200
SubjectRe: [PATCH] arm64: take SHN_LIVEPATCH syms into account when calculating plt_max_entries
Message-ID<s75ui-7zL-19@gated-at.bofh.it>
On Tue, 12 Jul 2016, Jessica Yu wrote:

> SHN_LIVEPATCH symbols are technically a subset of SHN_UNDEF/undefined
> symbols, except that their addresses are resolved by livepatch at runtime.
> Therefore, when calculating the upper-bound for the number of plt entries
> to allocate, make sure to take livepatch symbols into account as well.
> 
> Signed-off-by: Jessica Yu <jeyu@redhat.com>

FWIW, I think the patch does what we want, but it's for arm people to 
judge. It might be better to include it to Torsten's patch set.

Miroslav

> ---
> arch/arm64/kernel/module-plts.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c
> index 1ce90d8..1e95dc1 100644
> --- a/arch/arm64/kernel/module-plts.c
> +++ b/arch/arm64/kernel/module-plts.c
> @@ -122,7 +122,8 @@ static unsigned int count_plts(Elf64_Sym *syms, Elf64_Rela
> *rela, int num)
>                         * as well, so modules can never grow beyond that
> limit.
>                         */
>                        s = syms + ELF64_R_SYM(rela[i].r_info);
> -                       if (s->st_shndx != SHN_UNDEF)
> +                       if (s->st_shndx != SHN_UNDEF &&
> +                           s->st_shndx != SHN_LIVEPATCH)
>                                break;
> 
>                        /*
> -- 
> 2.5.5
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web