From nobody Mon Mar 10 02:27:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZB14q45lhz5q8DT; Mon, 10 Mar 2025 02:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZB14q0zHyz3Q3T; Mon, 10 Mar 2025 02:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741573643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Li6+K038Xhkk7UMLJlbRh6eT08wcimIPj1em5yixGic=; b=m9n+Eo+C2er2GzLjQwtjfsGSF2BTRtZpQ7ctC2XHEzxVmcqoG2Gyl2QCVYTOS63WFt5LLq pjzayCaMtiuv9Qvg7MC3ryzHPf3fsIzGtj40Mo/eVUGnIwICIsS7inW3kuupgwFDNPYV6I uxxU7pnbxpa8JV29tztCrZ5BB1m73eCJE5ay2r3J/18bL0rcQbRLlVVpV+tD5H47+9UVj6 R9dPQKmdWZWljOcpfJxiTz0DBkHgHqkzdRthUBSmns6TEcKLv5CvEOR2uDTr/p4aMnyRPJ yiXEWKsm9xwJ0hQ8kkPQBaJoxpjWQcJ3wrFtfesj8xq1bPs2fuvBPMiDsSPXvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741573643; a=rsa-sha256; cv=none; b=a4x4hyBrPAHKZE/lkVDu5G9R5d+78/gEzYppKFDM69vh2UQG1U/XH9jGJG1Srq1fcwVmpz IhksaYhu9JrVfYNb/H4EFM66aYFXvjhw+DgNYj71iEm+EvWPz4MILCfY54viEpltsAiF5/ lj8CHcGv7PyjaYXco4rrbVbHLCsWYtEQJwvCKSJX+XQH2zZZfT2L+SBByMZrKQaRkMOpvi tbEcfUxLhMQy7K3O2fjTzAQApp9VJmSH/et7G2CMtjSOixHcx7KwCEa6127395yerGRD8b b9fKhXIRi7dPWvqyL1oV/+NuWqsy8n/80uEvYSqNr2i5zby7yOaEcEmnJ+/DjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741573643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Li6+K038Xhkk7UMLJlbRh6eT08wcimIPj1em5yixGic=; b=WC76OIR0x77L0Oe/V9qfSKfpNU8tbXzpWUxaQHL0khNnn7DgJmpUqeFasY6sV9XiBTnZRi r/qg63bP2RTCPKUVWRLexMKvVAkVutg40XdWv6htCCtf6+N4i7xtEgdsNKZ5P2YYYnSXpP xcitXciT6FxIbzzno0+zEx0VteIG64hOQNu/nCBjdE1Dwrr9CgqVI56Q8VyvihWr4cvOfH J+Bp6uVaB/uU/+Om4rjtU284zQpXFCNp/ot8jMIv93dNztuo/XIaVJYqknBt8E14ZUSOKZ eZrcQld0xPazfCgCZDish7VsN60w1/JMHNkrTSyBKM69r1EhM3e5xkzP/KZlZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZB14q02SRz51D; Mon, 10 Mar 2025 02:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52A2RMwQ023775; Mon, 10 Mar 2025 02:27:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52A2RMS7023772; Mon, 10 Mar 2025 02:27:22 GMT (envelope-from git) Date: Mon, 10 Mar 2025 02:27:22 GMT Message-Id: <202503100227.52A2RMS7023772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Takanori Watanabe Subject: git: f9b4092743fc - main - acpi_wmi: Add type check before evaluaeting query ACPI method Some ACPI wmi query is implemented by named object, not method, ACPICA complains when non-method object is evaluated with one or more arguments. Especially, almost all binary MOF object obtaining method is the case. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: takawata X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9b4092743fc99b1b3727a59f4c66fa07f0f895f Auto-Submitted: auto-generated The branch main has been updated by takawata: URL: https://cgit.FreeBSD.org/src/commit/?id=f9b4092743fc99b1b3727a59f4c66fa07f0f895f commit f9b4092743fc99b1b3727a59f4c66fa07f0f895f Author: Takanori Watanabe AuthorDate: 2025-02-25 09:54:34 +0000 Commit: Takanori Watanabe CommitDate: 2025-03-10 02:22:30 +0000 acpi_wmi: Add type check before evaluaeting query ACPI method Some ACPI wmi query is implemented by named object, not method, ACPICA complains when non-method object is evaluated with one or more arguments. Especially, almost all binary MOF object obtaining method is the case. This commit will fix it. PR: 284912 Reported by: Alexander Ziaee Differential Revision: https://reviews.freebsd.org/D49129 --- sys/dev/acpi_support/acpi_wmi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/acpi_support/acpi_wmi.c b/sys/dev/acpi_support/acpi_wmi.c index 56a08e59934d..e973b287dbb4 100644 --- a/sys/dev/acpi_support/acpi_wmi.c +++ b/sys/dev/acpi_support/acpi_wmi.c @@ -580,6 +580,16 @@ acpi_wmi_get_block_method(device_t dev, const char *guid_string, UINT8 instance, } wq_method[2] = winfo->ginfo.oid[0]; wq_method[3] = winfo->ginfo.oid[1]; + { + ACPI_HANDLE wq_handle; + ACPI_OBJECT_TYPE at; + + if (ACPI_SUCCESS(AcpiGetHandle(sc->wmi_handle, wq_method, &wq_handle)) && + ACPI_SUCCESS(AcpiGetType(wq_handle, &at)) && + at != ACPI_TYPE_METHOD) { + wq_input.Count = 0; + } + } status = AcpiEvaluateObject(sc->wmi_handle, wq_method, &wq_input, out); if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EXPENSIVE)