aboutsummaryrefslogtreecommitdiff
path: root/hmp-commands.hx
diff options
context:
space:
mode:
authorJean-Christophe Dubois <jcd@tribudubois.net>2017-01-09 11:40:23 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-01-09 11:40:23 +0000
commit24cb2e0d57cea0cbc163f23fa47d530b35425a21 (patch)
tree43a73f13f9bb22940a818e9e863f2bc66cd0015c /hmp-commands.hx
parent8dd845d3c434cf2c799e0f86a1b53b33057b61ab (diff)
m25p80: don't let rogue SPI controllers cause buffer overruns
In normal operation we should never attempt to put more data into the data[] array than it can hold. However if the SPI controller connected to us misbehaves then it can send us a sequence of commands that attempt this. Since the controller might be in the guest (if the hardware does SPI via bit-banging), catch the possible overrun conditions and reset the flash internal state, logging them as guest errors. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> Message-id: 20170107111631.24444-1-jcd@tribudubois.net Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: rewrote commit message to be more exact about when this can happen] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hmp-commands.hx')
0 files changed, 0 insertions, 0 deletions