提交 ef1950a3 编写于 作者: T Thomas Bogendoerfer 提交者: Xie XiuQi

MIPS: fw: sni: Fix out of bounds init of o32 stack

[ Upstream commit efcb529694c3b707dc0471b312944337ba16e4dd ]

Use ARRAY_SIZE to caluculate the top of the o32 stack.
Signed-off-by: NThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: NPaul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 c212bb7c
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
/* O32 stack has to be 8-byte aligned. */ /* O32 stack has to be 8-byte aligned. */
static u64 o32_stk[4096]; 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); \ #define __PROM_O32(fun, arg) fun arg __asm__(#fun); \
__asm__(#fun " = call_o32") __asm__(#fun " = call_o32")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册