Skip to content

Commit 4df69e0

Browse files
nickdesaulnierswilldeacon
authored andcommitted
arm64: kernel: remove SHF_WRITE|SHF_EXECINSTR from .idmap.text
commit d541708 ("arm64: fix .idmap.text assertion for large kernels") modified some of the section assembler directives that declare .idmap.text to be SHF_ALLOC instead of SHF_ALLOC|SHF_WRITE|SHF_EXECINSTR. This patch fixes up the remaining stragglers that were left behind. Add Fixes tag so that this doesn't precede related change in stable. Fixes: d541708 ("arm64: fix .idmap.text assertion for large kernels") Reported-by: Greg Thelen <gthelen@google.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20230428-awx-v2-1-b197ffa16edc@google.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent eda081d commit 4df69e0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

arch/arm64/kernel/cpu-reset.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <asm/virt.h>
1515

1616
.text
17-
.pushsection .idmap.text, "awx"
17+
.pushsection .idmap.text, "a"
1818

1919
/*
2020
* cpu_soft_restart(el2_switch, entry, arg0, arg1, arg2)

arch/arm64/kernel/sleep.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ SYM_FUNC_START(__cpu_suspend_enter)
9797
ret
9898
SYM_FUNC_END(__cpu_suspend_enter)
9999

100-
.pushsection ".idmap.text", "awx"
100+
.pushsection ".idmap.text", "a"
101101
SYM_CODE_START(cpu_resume)
102102
mov x0, xzr
103103
bl init_kernel_el

arch/arm64/mm/proc.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ alternative_else_nop_endif
167167
SYM_FUNC_END(cpu_do_resume)
168168
#endif
169169

170-
.pushsection ".idmap.text", "awx"
170+
.pushsection ".idmap.text", "a"
171171

172172
.macro __idmap_cpu_set_reserved_ttbr1, tmp1, tmp2
173173
adrp \tmp1, reserved_pg_dir
@@ -201,7 +201,7 @@ SYM_FUNC_END(idmap_cpu_replace_ttbr1)
201201

202202
#define KPTI_NG_PTE_FLAGS (PTE_ATTRINDX(MT_NORMAL) | SWAPPER_PTE_FLAGS)
203203

204-
.pushsection ".idmap.text", "awx"
204+
.pushsection ".idmap.text", "a"
205205

206206
.macro kpti_mk_tbl_ng, type, num_entries
207207
add end_\type\()p, cur_\type\()p, #\num_entries * 8
@@ -400,7 +400,7 @@ SYM_FUNC_END(idmap_kpti_install_ng_mappings)
400400
* Output:
401401
* Return in x0 the value of the SCTLR_EL1 register.
402402
*/
403-
.pushsection ".idmap.text", "awx"
403+
.pushsection ".idmap.text", "a"
404404
SYM_FUNC_START(__cpu_setup)
405405
tlbi vmalle1 // Invalidate local TLB
406406
dsb nsh

0 commit comments

Comments
 (0)