From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Rosen Penev <rosenp@gmail.com>, Kees Cook <kees@kernel.org>
Cc: platform-driver-x86@vger.kernel.org,
Kenneth Chan <kenneth.t.chan@gmail.com>,
Hans de Goede <hansg@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:KERNEL HARDENING (not covered by other
areas):Keyword:b__counted_by(_le|_be)?b"
<linux-hardening@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: panasonic-laptop: simplify allocation of sinf
Date: Mon, 23 Mar 2026 11:13:15 +0200 (EET) [thread overview]
Message-ID: <17effdb3-7406-d280-8d9a-e699e54dadef@linux.intel.com> (raw)
In-Reply-To: <CAKxU2N9fqr8XunsR+=-P8AngLbUbphTq6aFnEJ_yEGhue9d2wA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
On Fri, 20 Mar 2026, Rosen Penev wrote:
> On Fri, Mar 20, 2026 at 11:32 AM Kees Cook <kees@kernel.org> 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.
next prev parent reply other threads:[~2026-03-23 9:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 0:49 [PATCH] platform/x86: panasonic-laptop: simplify allocation of sinf Rosen Penev
2026-03-20 18:32 ` Kees Cook
2026-03-20 23:02 ` Rosen Penev
2026-03-23 9:13 ` Ilpo Järvinen [this message]
2026-03-23 16:44 ` Rosen Penev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17effdb3-7406-d280-8d9a-e699e54dadef@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gustavoars@kernel.org \
--cc=hansg@kernel.org \
--cc=kees@kernel.org \
--cc=kenneth.t.chan@gmail.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rosenp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox