Re: [PATCH] soc: qcom: mdt_loader: Deal with zero e_shentsize

From: Bjorn Andersson
Date: Tue Aug 05 2025 - 21:52:08 EST


On Thu, Jul 31, 2025 at 11:23:25PM +0300, Dmitry Baryshkov wrote:
> On Thu, Jul 31, 2025 at 04:58:09PM +0200, Neil Armstrong wrote:
> > On 30/07/2025 22:51, Bjorn Andersson wrote:
> > > Firmware that doesn't provide section headers leave both e_shentsize and
> > > e_shnum 0, which obvious isn't compatible with the newly introduced
> > > stricter checks.
> > >
> > > Make the section-related checks conditional on either of these values
> > > being non-zero.
> > >
> > Missing:
> > Fixes: 9f35ab0e53cc ("soc: qcom: mdt_loader: Fix error return values in mdt_header_valid()")
> >
> > Or it won't apply on stable kernels
>
> Then it should also be:
>
> Cc: stable@xxxxxxxxxxxxxxx
>

Given that the fixed commit is Cc: stable, it makes sense to include
both.

Thanks,
Bjorn

>
> --
> With best wishes
> Dmitry