diff mbox series

[1/8] slw: slw_reinit fix array overrun

Message ID 20191107135220.20401-2-npiggin@gmail.com
State Superseded
Headers show
Series misc fixes and cleanups | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Nicholas Piggin Nov. 7, 2019, 1:52 p.m. UTC
The slw patch saving array is too small, which results in slw_reinit
overwriting 32 bytes beyond the end of it. The size is increased to
0x100, which is the architecture interrupt vector size.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 hw/slw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/slw.c b/hw/slw.c
index f1d0298b3..cb27f2497 100644
--- a/hw/slw.c
+++ b/hw/slw.c
@@ -28,7 +28,7 @@ 
 #include <p8_pore_table_gen_api.H>
 #include <sbe_xip_image.h>
 
-#define MAX_RESET_PATCH_SIZE	64
+#define MAX_RESET_PATCH_SIZE	0x100
 
 static uint32_t slw_saved_reset[MAX_RESET_PATCH_SIZE];