Skip to content

Commit

Permalink
core: asan: tag access for .ARM.extab and .ARM.exidx
Browse files Browse the repository at this point in the history
The two sections .ARM.extab and .ARM.exidx are accessed when printing a
stack trace. Tag access for these two sections to avoid recursive panics
due to failing checks against shadow area.

Tested-by: Jens Wiklander <[email protected]> (QEMU)
Reviewed-by: Etienne Carriere <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Signed-off-by: Jens Wiklander <[email protected]>
  • Loading branch information
jenswi-linaro committed Sep 14, 2017
1 parent 4b31888 commit 121e56f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/arch/arm/include/kernel/linker.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
*/
extern const uint8_t __exidx_start[];
extern const uint8_t __exidx_end[];
extern const uint8_t __extab_start[];
extern const uint8_t __extab_end[];

extern const struct pseudo_ta_head __start_ta_head_section;
extern const struct pseudo_ta_head __stop_ta_head_section;
Expand Down
2 changes: 2 additions & 0 deletions core/arch/arm/kernel/generic_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ static void init_asan(void)
asan_tag_access(&__ctor_list, &__ctor_end);
asan_tag_access(__rodata_start, __rodata_end);
asan_tag_access(__nozi_start, __nozi_end);
asan_tag_access(__exidx_start, __exidx_end);
asan_tag_access(__extab_start, __extab_end);

init_run_constructors();

Expand Down
2 changes: 2 additions & 0 deletions core/arch/arm/kernel/link_dummy.ld
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ __end_phys_nsec_ddr_section = .;
__end_phys_sdp_mem_section = .;
__exidx_end = .;
__exidx_start = .;
__extab_end = .;
__extab_start = .;
__heap1_end = .;
__heap1_start = .;
__heap2_end = .;
Expand Down

0 comments on commit 121e56f

Please sign in to comment.