* [PATCH] MIPS: fw: sni: Fix out of bounds init of o32 stack
@ 2019-10-09 15:10 Thomas Bogendoerfer
2019-10-09 21:58 ` Paul Burton
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Bogendoerfer @ 2019-10-09 15:10 UTC (permalink / raw)
To: Ralf Baechle, Paul Burton, James Hogan, linux-mips, linux-kernel
Use ARRAY_SIZE to caluculate the top of the o32 stack.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
arch/mips/fw/sni/sniprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/fw/sni/sniprom.c b/arch/mips/fw/sni/sniprom.c
index 8772617b64ce..80112f2298b6 100644
--- a/arch/mips/fw/sni/sniprom.c
+++ b/arch/mips/fw/sni/sniprom.c
@@ -43,7 +43,7 @@
/* O32 stack has to be 8-byte aligned. */
static u64 o32_stk[4096];
-#define O32_STK &o32_stk[sizeof(o32_stk)]
+#define O32_STK (&o32_stk[ARRAY_SIZE(o32_stk)])
#define __PROM_O32(fun, arg) fun arg __asm__(#fun); \
__asm__(#fun " = call_o32")
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: fw: sni: Fix out of bounds init of o32 stack
2019-10-09 15:10 [PATCH] MIPS: fw: sni: Fix out of bounds init of o32 stack Thomas Bogendoerfer
@ 2019-10-09 21:58 ` Paul Burton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-10-09 21:58 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: Ralf Baechle, Paul Burton, James Hogan, linux-mips, linux-kernel,
linux-mips
Hello,
Thomas Bogendoerfer wrote:
> Use ARRAY_SIZE to caluculate the top of the o32 stack.
Applied to mips-fixes.
> commit efcb529694c3
> https://git.kernel.org/mips/c/efcb529694c3
>
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
> Signed-off-by: Paul Burton <paul.burton@mips.com>
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@mips.com to report it. ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-09 21:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 15:10 [PATCH] MIPS: fw: sni: Fix out of bounds init of o32 stack Thomas Bogendoerfer
2019-10-09 21:58 ` Paul Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).