Re: [PATCH] platform: arm64: qcom-hamoa-ec: reject incomplete responses

Ilpo Järvinen <[email protected]> Mon, 03 Aug 2026 22:12:45 +0300
Newsgroups org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.platform-driver-x86
Message-ID <178578436515.17622.4835801853250373634.b4-ty@b4>
On Tue, 28 Jul 2026 19:19:24 +0800, Linmao Li wrote:

> 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.
> 
> [...]

Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.

The list of commits applied:
[1/1] platform: arm64: qcom-hamoa-ec: reject incomplete responses
      commit: 1b04f556e8428a3865a95627ab7a0acb5d9b93a5

--
 i.