mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "David Thomson (dt@linux.com)" <dt@linux-mail.net>
Cc: boris.ostrovsky@oracle.com, sstabellini@kernel.org,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	jgross@suse.com
Subject: Re: [PATCH] xen/acpi-processor: fix _CST detection using undersized evaluation buffer
Date: Tue, 24 Feb 2026 10:21:24 +0100	[thread overview]
Message-ID: <a24723d2-0c7b-4e04-b47d-fd0e188d72dd@suse.com> (raw)
In-Reply-To: <FvW05oEjY785ua6lBtiEat0hzzY8RM9BeRC-RTwpIQ8QYO7lMvYmJ78U8C0S0vT_TRg4YX4-TzoGEsDvqwUVeX9w89FR47MYWR1oxpFJCBo=@linux-mail.net>

On 24.02.2026 10:10, David Thomson (dt@linux.com) wrote:
>> I understand you reflect original behavior in this regard, but why involve any
>> ACPI function here at all when pblk is non-zero? I.e. why not swap the operands
>> of && ? Object evaluation could have wanted side effects (in which case,
>> however, some different change would be needed here), but checking for method
>> presence surely hasn't.
>>
> You're right on both counts. The original evaluate_object() call at least had the appearance of wanting the result (even though buf was undersized and the result was never used). A pure presence check has no such pretense. Swapping the operands is the obvious improvement. I think dropping the _CST check entirely is also defensible since C-state support is confirmed when pblk is set. But I'm not certain there's no edge case where pblk is non-zero and _CST is also not present, so I'd defer to your judgement.
> 
> Would you prefer:
> a) if (pblk && acpi_has_method(handle, "_CST"))
> b) just if (pblk)

I don't think b) is correct, so a) please (albeit suitably adjusted to really only
flip the operands from what your original patch had).

Jan

      reply	other threads:[~2026-02-24  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 19:56 David Thomson
     [not found] ` <aZzAYEo0S3pP4HUG@mattapan.m5p.com>
2026-02-23 23:20   ` David Thomson (dt@linux.com)
2026-02-24  7:28 ` Jan Beulich
2026-02-24  9:10   ` David Thomson (dt@linux.com)
2026-02-24  9:21     ` Jan Beulich [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=a24723d2-0c7b-4e04-b47d-fd0e188d72dd@suse.com \
    --to=jbeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dt@linux-mail.net \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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®