linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] firmware: imx: Align imx SC msg structs to 4
@ 2020-02-20 16:29 Leonard Crestez
  2020-02-20 16:29 ` [PATCH v2 1/8] clk: imx: Align imx sc clock " Leonard Crestez
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Leonard Crestez @ 2020-02-20 16:29 UTC (permalink / raw)
  To: Shawn Guo, Dong Aisheng
  Cc: Fabio Estevam, Michael Turquette, Stephen Boyd, Stefan Agner,
	Linus Walleij, Alessandro Zummo, Alexandre Belloni, Anson Huang,
	Abel Vesa, Franck LENORMAND, kernel, linux-imx, linux-arm-kernel,
	linux-clk, linux-gpio, linux-rtc

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 but tools like KASAN are very useful on
stable kernels.

Chnages since v1:
* Split into many patches with individual fixes: tags
Link to v1: https://patchwork.kernel.org/patch/11376909/

Leonard Crestez (8):
  clk: imx: Align imx sc clock msg structs to 4
  clk: imx: Align imx sc clock parent msg structs to 4
  firmware: imx: misc: Align imx sc msg structs to 4
  firmware: imx: scu-pd: Align imx sc msg structs to 4
  firmware: imx: Align imx_sc_msg_req_cpu_start to 4
  pinctrl: imx: scu: Align imx sc msg structs to 4
  rtc: imx-sc: Align imx sc msg structs to 4
  soc: imx-scu: Align imx sc msg structs to 4

 drivers/clk/imx/clk-scu.c               | 8 ++++----
 drivers/firmware/imx/misc.c             | 8 ++++----
 drivers/firmware/imx/scu-pd.c           | 2 +-
 drivers/pinctrl/freescale/pinctrl-scu.c | 4 ++--
 drivers/rtc/rtc-imx-sc.c                | 2 +-
 drivers/soc/imx/soc-imx-scu.c           | 2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-03-16  8:52 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 16:29 [PATCH v2 0/8] firmware: imx: Align imx SC msg structs to 4 Leonard Crestez
2020-02-20 16:29 ` [PATCH v2 1/8] clk: imx: Align imx sc clock " Leonard Crestez
2020-02-24  7:22   ` Shawn Guo
2020-03-16  0:25     ` Shawn Guo
2020-02-25 16:51   ` Stephen Boyd
2020-02-25 19:52     ` Leonard Crestez
2020-03-16  8:52     ` Aisheng Dong
2020-02-20 16:29 ` [PATCH v2 2/8] clk: imx: Align imx sc clock parent " Leonard Crestez
2020-02-24  7:23   ` Shawn Guo
2020-02-20 16:29 ` [PATCH v2 3/8] firmware: imx: misc: Align imx sc " Leonard Crestez
2020-02-24  7:28   ` Shawn Guo
2020-02-20 16:29 ` [PATCH v2 4/8] firmware: imx: scu-pd: " Leonard Crestez
2020-02-24  7:28   ` Shawn Guo
2020-02-20 16:29 ` [PATCH v2 5/8] firmware: imx: Align imx_sc_msg_req_cpu_start " Leonard Crestez
2020-02-24  7:28   ` Shawn Guo
2020-02-20 16:29 ` [PATCH v2 6/8] pinctrl: imx: scu: Align imx sc msg structs " Leonard Crestez
2020-02-21 15:34   ` Linus Walleij
2020-02-20 16:29 ` [PATCH v2 7/8] rtc: imx-sc: " Leonard Crestez
2020-03-03 11:02   ` Alexandre Belloni
2020-02-20 16:29 ` [PATCH v2 8/8] soc: imx-scu: " Leonard Crestez
2020-02-24  7:30   ` Shawn Guo

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).