Re: [PATCH 16/28] mfd: loongson-se: Zero-initialise controller command structures
From: Qunqin Zhao
Date: Mon Oct 26 2026 - 05:40:38 EST
在 2026/10/21 20:09, Lee Jones 写道:
> loongson_se_init() and loongson_se_init_engine() declare struct
> loongson_se_controller_cmd on the stack without zero-initialising it
> and only populate a subset of its fields before
> loongson_se_send_controller_cmd() writes all eight 32-bit words to the
> controller MMIO registers. Zero-initialise the stack command structures
> so that unused words do not leak residual kernel stack contents to the
> hardware.
>
> Fixes: e551fa3159e3 ("mfd: Add support for Loongson Security Engine chip controller")
> Closes: https://sashiko.dev/#/bug/linux-b81dca3d-6812-43b6-9ad9-912727674154
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
Reviewed-by: Qunqin Zhao <zhaoqunqin@xxxxxxxxxxx>
Thanks for fixing this!
Best Regards,
Qunqin.