Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441929
| From | Jessica Yu <jeyu@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] arm64: take SHN_LIVEPATCH syms into account when calculating plt_max_entries |
| Date | 2016-07-13 02:20 +0200 |
| Message-ID | <rUg4a-3O9-9@gated-at.bofh.it> (permalink) |
| References | <rOGul-20Y-5@gated-at.bofh.it> <rOGul-20Y-13@gated-at.bofh.it> <rTK4i-842-21@gated-at.bofh.it> <rTRp7-4gA-3@gated-at.bofh.it> <rU2ud-37M-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v2 2/2] arm64: implement live patching Miroslav Benes <mbenes@suse.cz> - 2016-07-11 16:10 +0200
Re: arm64: implement live patching Jessica Yu <jeyu@redhat.com> - 2016-07-12 00:00 +0200
Re: arm64: implement live patching Miroslav Benes <mbenes@suse.cz> - 2016-07-12 11:50 +0200
[PATCH] arm64: take SHN_LIVEPATCH syms into account when calculating plt_max_entries Jessica Yu <jeyu@redhat.com> - 2016-07-13 02:20 +0200
csiph-web