mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@kernel.org>
To: "Rafael J. Wysocki (Intel)" <rafael@kernel.org>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sudeep Holla <sudeep.holla@kernel.org>
Subject: Re: [PATCH 6/6] ACPI: PCC: Preserve shared memory signature in OpRegion handler
Date: Wed, 1 Jul 2026 15:13:42 +0100	[thread overview]
Message-ID: <20260701-predictable-dragon-of-emphasis-50e5dc@sudeepholla> (raw)
In-Reply-To: <20260701-hopeful-cuddly-bobcat-6a8cf6@sudeepholla>

On Wed, Jul 01, 2026 at 02:34:10PM +0100, Sudeep Holla wrote:
> On Wed, Jul 01, 2026 at 12:44:30PM +0200, Rafael J. Wysocki (Intel) wrote:
> > On Tue, Jun 30, 2026 at 7:00 PM Sudeep Holla <sudeep.holla@kernel.org> wrote:
> > >
> > > On Tue, Jun 30, 2026 at 02:33:08PM +0200, Rafael J. Wysocki (Intel) wrote:
> > > > On Sat, Jun 27, 2026 at 6:39 PM Sudeep Holla <sudeep.holla@kernel.org> wrote:
> > > > >
> > > > > ACPI defines a PCC OperationRegion as the shared memory fields that
> > > > > follow the PCC signature. The OperationRegion length is likewise the
> > > > > total size of the fields that succeed the signature in shared memory.
> > > > >
> > > > > ACPI 6.6 adds clarification that the PCC shared memory signature is
> > > > > populated by the platform and verified by OSPM.
> > > > >
> > > > > The PCC address space handler currently copies the OperationRegion
> > > > > buffer to and from the start of the PCC shared memory region. That can
> > > > > overwrite or expose the signature at byte offset 0, and it also misses
> > > > > the last 4 bytes of the actual PCC OperationRegion data.
> > > > >
> > > > > Offset OperationRegion copies by the size of the signature and reject
> > > > > regions that do not fit in the shared memory after that signature.
> > > > >
> > > > > Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> > > > > Fixes: 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype")
> > > > > Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
> > > >
> > > > Does this depend on anything else in the series or is it independent?
> > > >
> > >
> > > It is independent. This just fixes the issue of including the signature in
> > > the opregion data. It can go independently as all other patches as well.
> > 
> > So I've looked at Sashiko's feedback on this change:
> > 
> > https://sashiko.dev/#/patchset/20260627-acpi_pcc_signature-v1-0-c1b7268d4fdc%40kernel.org
> > 
> > and I'm a bit worried.
> > 
> > Of course, the preexisting issues found by it will need to be
> > addressed separately, but what about firmware released before the
> > clarification in ACPI 6.6 and the possible misalignment issue
> > mentioned by it?
> 
> I haven't analysed all the report from Sashiko yet. But unlike other patches
> in the series, this one is not strictly to validate the signature.
> 
> Even before v6.6, the PCC Opregion didn't include the signature which is
> at offset 0. The code always started copying to/from offset 0 missing the
> last 32-bit field(word). Since v6.3 when PCC Opregion was added we have
> this in the specification:
> 
>   | <section> Declaring message fields within a PCC OperationRegion
>   |
>   | For all PCC subspace types, the PCC Operation Region pertains to the
>   | region of PCC subspace that succeeds the PCC signature.
> 
> So, this patch addresses that issue of wrong starting offset used by this
> driver.
> 
> Other patches I agree, it is more likely we just need to warn and not
> reject absence of wrong PCC signatures.
> 
> I will take a look at the other issues reported by Sashiko soon.
> 

Forgot to add that let us wait at-least until I go through the report
understand and conclude it is not fatal/critical before we can merge this.
Indeed a quick read concerned as much that I would like to spend time
analysing it carefully.

-- 
Regards,
Sudeep

  reply	other threads:[~2026-07-01 14:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-27 16:37 [PATCH 0/6] ACPI/PCC: Preserve platform-populated PCC signatures Sudeep Holla
2026-06-27 16:37 ` [PATCH 1/6] mailbox: pcc: Validate shared memory signature on request Sudeep Holla
2026-06-30  9:02   ` lihuisong (C)
2026-06-30  9:18     ` lihuisong (C)
2026-06-30 10:17       ` Sudeep Holla
2026-06-27 16:37 ` [PATCH 2/6] hwmon: xgene: Stop writing PCC shared memory signature Sudeep Holla
2026-06-29 21:11   ` Guenter Roeck
2026-06-27 16:37 ` [PATCH 3/6] i2c: xgene-slimpro: " Sudeep Holla
2026-06-27 16:37 ` [PATCH 4/6] devfreq: hisi_uncore: Preserve " Sudeep Holla
2026-06-27 16:37 ` [PATCH 5/6] soc: hisilicon: kunpeng_hccs: Preserve PCC signatures Sudeep Holla
2026-06-27 16:37 ` [PATCH 6/6] ACPI: PCC: Preserve shared memory signature in OpRegion handler Sudeep Holla
2026-06-30 12:33   ` Rafael J. Wysocki (Intel)
2026-06-30 17:00     ` Sudeep Holla
2026-07-01 10:44       ` Rafael J. Wysocki (Intel)
2026-07-01 13:34         ` Sudeep Holla
2026-07-01 14:13           ` Sudeep Holla [this message]
2026-07-01 14:39             ` Rafael J. Wysocki (Intel)
2026-07-02 12:19             ` Sudeep Holla
2026-06-30  9:25 ` [PATCH 0/6] ACPI/PCC: Preserve platform-populated PCC signatures lihuisong (C)
2026-06-30 10:49   ` Sudeep Holla
2026-07-01  7:38     ` lihuisong (C)
2026-07-02 10:21       ` Sudeep Holla
2026-07-06  9:02         ` lihuisong (C)

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=20260701-predictable-dragon-of-emphasis-50e5dc@sudeepholla \
    --to=sudeep.holla@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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

all inboxes | Powered by JetHome®