linux-stable/drivers/remoteproc
Sibi Sankar 988fcef346 remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load
commit 135b9e8d1c upstream.

The following mem abort is observed when one of the modem blob firmware
size exceeds the allocated mpss region. Fix this by restricting the copy
size to segment size using request_firmware_into_buf before load.

Err Logs:
Unable to handle kernel paging request at virtual address
Mem abort info:
...
Call trace:
  __memcpy+0x110/0x180
  rproc_start+0xd0/0x190
  rproc_boot+0x404/0x550
  state_store+0x54/0xf8
  dev_attr_store+0x44/0x60
  sysfs_kf_write+0x58/0x80
  kernfs_fop_write+0x140/0x230
  vfs_write+0xc4/0x208
  ksys_write+0x74/0xf8
...

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Fixes: 051fb70fd4 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5")
Cc: stable@vger.kernel.org
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20200722201047.12975-3-sibis@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-21 13:05:29 +02:00
..
da8xx_remoteproc.c remoteproc: Remove dev_err() usage after platform_get_irq() 2019-08-26 21:59:58 -07:00
imx_rproc.c remoteproc updates for v5.3 2019-07-17 11:44:41 -07:00
Kconfig remoteproc: don't allow modular build 2019-09-04 11:13:19 +02:00
keystone_remoteproc.c remoteproc: Remove dev_err() usage after platform_get_irq() 2019-08-26 21:59:58 -07:00
Makefile remoteproc: stm32: add an ST stm32_rproc driver 2019-06-29 21:00:02 -07:00
omap_remoteproc.c
omap_remoteproc.h
qcom_common.c remoteproc: qcom: Move glink_ssr notification after stop 2019-07-24 16:01:14 -07:00
qcom_common.h
qcom_q6v5.c remoteproc: qcom: q6v5: Update running state before requesting stop 2020-08-21 13:05:29 +02:00
qcom_q6v5.h
qcom_q6v5_adsp.c
qcom_q6v5_mss.c remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load 2020-08-21 13:05:29 +02:00
qcom_q6v5_pas.c
qcom_q6v5_wcss.c
qcom_sysmon.c
qcom_wcnss.c
qcom_wcnss.h
qcom_wcnss_iris.c
remoteproc_core.c remoteproc: Fix IDR initialisation in rproc_alloc() 2020-06-24 17:50:09 +02:00
remoteproc_debugfs.c
remoteproc_elf_loader.c remoteproc updates for v5.3 2019-07-17 11:44:41 -07:00
remoteproc_internal.h remoteproc updates for v5.3 2019-07-17 11:44:41 -07:00
remoteproc_sysfs.c remoteproc: Add a sysfs interface for name 2019-08-26 14:50:16 -07:00
remoteproc_virtio.c remoteproc: Fall back to using parent memory pool if no dedicated available 2020-06-17 16:40:33 +02:00
st_remoteproc.c
st_slim_rproc.c
stm32_rproc.c remoteproc: stm32: manage the get_irq probe defer case 2019-08-26 14:59:24 -07:00
wkup_m3_rproc.c