summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/intel/byt.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-11-14 05:53:10 +1000
committerDave Airlie <airlied@redhat.com>2019-11-14 05:53:10 +1000
commit77e0723bd27f830d0903225372aa778fe2975648 (patch)
tree4c035783e014b3a0ac9174390f88dc75150533e4 /sound/soc/sof/intel/byt.c
parent3ca3a9eab7085b3c938b5d088c3020269cfecdc8 (diff)
parent31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c (diff)
downloadlinux-77e0723bd27f830d0903225372aa778fe2975648.tar.bz2
Merge v5.4-rc7 into drm-next
We have the i915 security fixes to backmerge, but first let's clear the decks for other drivers to avoid a bigger mess. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'sound/soc/sof/intel/byt.c')
-rw-r--r--sound/soc/sof/intel/byt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c
index 5e7a6aaa627a..a1e514f71739 100644
--- a/sound/soc/sof/intel/byt.c
+++ b/sound/soc/sof/intel/byt.c
@@ -28,6 +28,7 @@
#define MBOX_OFFSET 0x144000
#define MBOX_SIZE 0x1000
#define EXCEPT_OFFSET 0x800
+#define EXCEPT_MAX_HDR_SIZE 0x400
/* DSP peripherals */
#define DMAC0_OFFSET 0x098000
@@ -126,6 +127,11 @@ static void byt_get_registers(struct snd_sof_dev *sdev,
/* note: variable AR register array is not read */
/* then get panic info */
+ if (xoops->arch_hdr.totalsize > EXCEPT_MAX_HDR_SIZE) {
+ dev_err(sdev->dev, "invalid header size 0x%x. FW oops is bogus\n",
+ xoops->arch_hdr.totalsize);
+ return;
+ }
offset += xoops->arch_hdr.totalsize;
sof_mailbox_read(sdev, offset, panic_info, sizeof(*panic_info));