The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Prasanth Ksr <prasanth.ksr@dell.com>,
	Hans de Goede <hansg@kernel.org>,
	 Dell.Client.Kernel@dell.com,
	platform-driver-x86@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: dell-wmi-sysman: Clean up security buffer helpers
Date: Tue, 31 Mar 2026 17:55:04 +0300 (EEST)	[thread overview]
Message-ID: <2524c3f1-9400-5ad1-6613-987283c66887@linux.intel.com> (raw)
In-Reply-To: <acve8iuIuycAtHyS@linux.dev>

[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]

On Tue, 31 Mar 2026, Thorsten Blum wrote:

> On Tue, Mar 31, 2026 at 03:46:11PM +0300, Ilpo Järvinen wrote:
> > On Mon, 9 Mar 2026, Thorsten Blum wrote:
> > > In calculate_security_buffer(), call strlen() once and use ALIGN() to
> > > round up to an even size.
> > > 
> > > In populate_security_buffer(), also avoid recomputing strlen(), rename
> > > the u32 pointer from 'seclen' to 'seclenp' to avoid confusion with the
> > > new length variable, and drop the memcpy() guard since calling it with
> > > size 0 is a no-op and therefore safe.
> > > 
> > > Use 'const char *' for the read-only source string in both helpers.
> > > 
> > > Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> > > ---
> > >  .../dell/dell-wmi-sysman/dell-wmi-sysman.h    |  4 ++--
> > >  .../x86/dell/dell-wmi-sysman/sysman.c         | 20 ++++++++-----------
> > >  2 files changed, 10 insertions(+), 14 deletions(-)
> > > 
> > > [...]
> > 
> > Logicwise this change seem fine to me but I wonder why is buffer char *
> > (again, this is a pre-existing problem). It seems u8 * would be more 
> > appropriate given how it's handled here as something else than characters.
> 
> Yes, I agree. However, using u8 * would also require changing the call
> sites in biosattr-interface.c and passwordattr-interface.c. Happy to
> change it, but it would probably be better as a follow-up patch.

A follow-up patch is fine.

> > Also, you don't need resend if your patch is still listed in the 
> > patchwork, it's not lost as long as it remains in patchwork and I'll 
> > eventually get to it.
> 
> I wasn't aware of the patchwork instance - is it this one?
> 
> https://patchwork.kernel.org/project/platform-driver-x86/list/

Correct.

You can find that URL from MAINTAINERS.

> I see 67 patches in total, but this one is not part of the list, afaict.

It was there until today but I marked it changes required after noting it 
lacks the header so I'm expecting a new version.

-- 
 i.

      reply	other threads:[~2026-03-31 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 21:18 [PATCH] platform/x86: dell-wmi-sysman: Clean up security buffer helpers Thorsten Blum
2026-03-31 12:46 ` Ilpo Järvinen
2026-03-31 14:49   ` Thorsten Blum
2026-03-31 14:55     ` Ilpo Järvinen [this message]

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=2524c3f1-9400-5ad1-6613-987283c66887@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=prasanth.ksr@dell.com \
    --cc=thorsten.blum@linux.dev \
    /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