On Fri, 20 Mar 2026, Rosen Penev wrote:
> On Fri, Mar 20, 2026 at 11:32 AM Kees Cook <[email protected]> wrote:
> >
> > On Thu, Mar 19, 2026 at 05:49:28PM -0700, Rosen Penev wrote:
> > > Change to a flexible array member to allocate once instead of twice.
> > >
> > > Allows using __counted_by for extra runtime analysis. Move the counting
> > > variable assignment to right after allocation as required by
> > > __counted_by.
> > >
> > > Remove + 1 to allocation. It's already done in the previous line.
> >
> > Are you sure this is an accidental +1? I see the "num_sifr++" that
> > happens earlier, but it's not immediately clear why either that or the
> > +1 in the original allocation are needed. I'd like to understand why
> > either/both are/aren't needed.
There's a comment right before the increment:
/*
* Some DSDT-s have an off-by-one bug where the SINF package count is
* one higher than the SQTY reported value, allocate 1 entry extra.
*/
num_sifr++;
..l.which comes from 33297cef3101 ("platform/x86: panasonic-laptop:
Allocate 1 entry extra in the sinf array").
So I don't know why you said it's not clear why it's there.
> Looks like a rebasing mistake to me honestly.
In which commit?
--
i.