diff options
author | Carlo Caione <carlo@endlessm.com> | 2017-03-03 16:17:58 +0100 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2017-03-23 20:22:32 +0100 |
commit | 83e007a0c6a3f4bfdf8f3f8d0fc266cda189b3d6 (patch) | |
tree | 7f5abab493f662317dc23ae0bf857e750c2917ff /drivers/nvmem | |
parent | Linux 4.11-rc1 (diff) | |
download | linux-83e007a0c6a3f4bfdf8f3f8d0fc266cda189b3d6.tar.xz linux-83e007a0c6a3f4bfdf8f3f8d0fc266cda189b3d6.zip |
firmware: meson-sm: Check for buffer output size
After the data is read by the secure monitor driver it is being copied
in the output buffer checking only the size of the bounce buffer but not
the size of the output buffer.
Fix this in the secure monitor driver slightly changing the API. Fix
also the efuse driver that it is the only driver using this API to not
break bisectability.
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> # for nvmem
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/meson-efuse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c index f207c3b10482..70bfc9839bb2 100644 --- a/drivers/nvmem/meson-efuse.c +++ b/drivers/nvmem/meson-efuse.c @@ -27,7 +27,7 @@ static int meson_efuse_read(void *context, unsigned int offset, u8 *buf = val; int ret; - ret = meson_sm_call_read(buf, SM_EFUSE_READ, offset, + ret = meson_sm_call_read(buf, bytes, SM_EFUSE_READ, offset, bytes, 0, 0, 0); if (ret < 0) return ret; |