public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
[parent not found: <HKAPR02MB429186AF5DC0A187A345F3BCE0640@HKAPR02MB4291.apcprd02.prod.outlook.com>]
[parent not found: <HKAPR02MB42915BECBD71F5ABA0890533E0640@HKAPR02MB4291.apcprd02.prod.outlook.com>]
[parent not found: <HKAPR02MB4291B970192A023778445B1BE0670@HKAPR02MB4291.apcprd02.prod.outlook.com>]
* [PATCH] arm64/module-plts: Consider the special case where plt_max_entries is 0
@ 2020-07-07 11:46 Peng Hao
  2020-07-08  8:25 ` Will Deacon
  0 siblings, 1 reply; 7+ messages in thread
From: Peng Hao @ 2020-07-07 11:46 UTC (permalink / raw)
  To: catalin.marinas, will; +Cc: Peng Hao, linux-kernel, linux-arm-kernel

If plt_max_entries is 0, a warning is triggered.
WARNING: CPU: 200 PID: 3000 at arch/arm64/kernel/module-plts.c:97 module_emit_plt_entry+0xa4/0x150

Signed-off-by: Peng Hao <richard.peng@oppo.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 65b08a74aec6..1868c9ac13f2 100644
--- a/arch/arm64/kernel/module-plts.c
+++ b/arch/arm64/kernel/module-plts.c
@@ -79,7 +79,8 @@ u64 module_emit_plt_entry(struct module *mod, Elf64_Shdr *sechdrs,
 	int i = pltsec->plt_num_entries;
 	int j = i - 1;
 	u64 val = sym->st_value + rela->r_addend;
-
+	if (pltsec->plt_max_entries == 0)
+		return 0;
 	if (is_forbidden_offset_for_adrp(&plt[i].adrp))
 		i++;
 
-- 
2.18.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-21 11:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <HKAPR02MB4291648701A6803290A17299E0610@HKAPR02MB4291.apcprd02.prod.outlook.com>
2020-08-21 11:17 ` [PATCH] arm64/module-plts: Consider the special case where plt_max_entries is 0 Will Deacon
     [not found] <HKAPR02MB429186AF5DC0A187A345F3BCE0640@HKAPR02MB4291.apcprd02.prod.outlook.com>
2020-07-09  7:31 ` Will Deacon
     [not found] <HKAPR02MB42915BECBD71F5ABA0890533E0640@HKAPR02MB4291.apcprd02.prod.outlook.com>
2020-07-09  6:55 ` Ard Biesheuvel
     [not found] <HKAPR02MB4291B970192A023778445B1BE0670@HKAPR02MB4291.apcprd02.prod.outlook.com>
2020-07-08 12:19 ` Ard Biesheuvel
2020-07-07 11:46 Peng Hao
2020-07-08  8:25 ` Will Deacon
2020-07-08  8:48   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox