summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorLinmao Li <lilinmao@kylinos.cn>2026-07-28 19:19:24 +0800
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-08-03 20:02:53 +0300
commit1b04f556e8428a3865a95627ab7a0acb5d9b93a5 (patch)
tree0025b6974377cf06798058e53b28918124d22302 /tools/perf/scripts/python/stackcollapse.py
parent31e1acf15df9a23ff3ead6dddf8ae1b7103d8b49 (diff)
platform: arm64: qcom-hamoa-ec: reject incomplete responses
qcom_ec_read() accepts short positive transfers, while both callers unconditionally consume every field in their fixed-size response. A short transfer can therefore make them use trailing stack bytes that were not returned by the device. The first response byte contains the number of payload bytes, excluding the byte count itself. A complete response of resp_len bytes must therefore report resp_len - 1 payload bytes. The existing check only rejects counts that do not fit in the response buffer and still accepts an incomplete payload. Require both the SMBus transfer length and the EC-provided payload count to match the expected response size. Fixes: 5c44f48e91de ("platform: arm64: Add driver for EC found on Qualcomm reference devices") Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Anvesh Jain P <anvesh.p@oss.qualcomm.com> Link: https://patch.msgid.link/20260728111924.4106898-1-lilinmao@kylinos.cn Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions