Thread (9 messages) 9 messages, 5 authors, 2020-02-20

Re: [PATCH] firmware: imx: Align imx SC msg structs to 4

From: Leonard Crestez <hidden>
Date: 2020-02-18 17:48:57
Also in: linux-arm-kernel, linux-clk, linux-gpio

On 18.02.2020 11:18, Shawn Guo wrote:
On Mon, Feb 17, 2020 at 08:37:45PM +0000, Leonard Crestez wrote:
quoted
On 17.02.2020 08:21, Shawn Guo wrote:
quoted
On Tue, Feb 11, 2020 at 11:24:33PM +0200, Leonard Crestez wrote:
quoted
The imx SC api strongly assumes that messages are composed out of
4-bytes words but some of our message structs have sizeof "6" and "7".

This produces many oopses with CONFIG_KASAN=y:

	BUG: KASAN: stack-out-of-bounds in imx_mu_send_data+0x108/0x1f0

It shouldn't cause an issues in normal use because these structs are
always allocated on the stack.

Cc: stable@vger.kernel.org
Should we have a fixes tag and send it for -rc?
I haven't check but this would probably have to be split into multiple
patches because the structs were not added all at once.
Or maybe we can just drop the stable tag, as it addresses a corner
case issue which could concern very few people?
I think that "kernel does not boot with KASAN=y" is an issue worth fixing.

I will split and resend with appropriate Fixes: tags.

It seems likely that this will be picked up for -stable anyway via 
Sasha's automation scripts and those scripts benefit from Fixes: tags.

--
Regards,
Leonard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help