Re: [PATCH v7 3/4] hwmon: (sht3x) Add devicetree support
From: Zaixiang Xu
Date: Mon Jul 13 2026 - 04:28:25 EST
On Mon, 13 Jul 2026 08:01:29 +0000, sashiko-bot@xxxxxxxxxx wrote:
> While reviewing this patch, I noticed a few pre-existing regressions
> in this file that might be worth addressing.
>
> [Severity: Critical]
> This is a pre-existing issue, but does this unaligned memory access
> crash strict-alignment architectures?
[...]
> [Severity: High]
> This isn't a bug introduced by this patch, but does this integer
> arithmetic overflow?
Thanks for the report. All five findings are in pre-existing code and
are not touched by this series, so I would prefer to keep them
separate from the devicetree support here.
I checked the first two: the unaligned access in sht3x_update_client()
(buf + 3 is an odd offset into a byte buffer, so it needs
get_unaligned_be16()), and the limit_write() overflow (temperature is
clamped to 130000, and (130000 + 45000) * 24543 = 4295025000 just
exceeds U32_MAX, so writing the maximum limit wraps the raw
temperature field to 0). Both look real.
I plan to go through all five and send fixes as a separate series
after this one.
Thanks,
Zaixiang