From 3682bcd4b36f8cd31979b09177be845e7e1bba14 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Fri, 15 Jul 2022 13:10:55 +0900 Subject: [PATCH] arch: arm64: Fix do_stackcheck() Summary: - Since the stack coloration is done for every 32bits this function should be done in the same way. Impact: - None Testing: - Tested with qemu-a53:nsh Signed-off-by: Masayuki Ishikawa --- arch/arm64/src/common/arm64_checkstack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/src/common/arm64_checkstack.c b/arch/arm64/src/common/arm64_checkstack.c index 588da146b6..a319c5dafe 100644 --- a/arch/arm64/src/common/arm64_checkstack.c +++ b/arch/arm64/src/common/arm64_checkstack.c @@ -73,7 +73,7 @@ static size_t do_stackcheck(void *stackbase, size_t nbytes) { uintptr_t start; uintptr_t end; - uint64_t *ptr; + uint32_t *ptr; size_t mark; if (nbytes == 0) @@ -96,7 +96,7 @@ static size_t do_stackcheck(void *stackbase, size_t nbytes) * that does not have the magic value is the high water mark. */ - for (ptr = (uint64_t *)start, mark = (nbytes >> 2); + for (ptr = (uint32_t *)start, mark = (nbytes >> 2); *ptr == STACK_COLOR && mark > 0; ptr++, mark--);