acpica-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Abhishek Mainkar <abmainkar@nvidia.com>
Cc: rafael.j.wysocki@intel.com, robert.moore@intel.com,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	acpica-devel@lists.linuxfoundation.org, lenb@kernel.org
Subject: Re: [Acpica-devel] [Patch] acpica: Add AML_NO_OPERAND_RESOLVE flag to Timer
Date: Thu, 29 Jun 2023 10:26:00 +0200	[thread overview]
Message-ID: <CAJZ5v0iE4MtjnBWwq0dS7x8B8AsZS0sJFfO6fRwtLJOfUhbEUg@mail.gmail.com> (raw)
In-Reply-To: <20230626220525.1654780-1-abmainkar@nvidia.com>

On Tue, Jun 27, 2023 at 12:10 AM Abhishek Mainkar <abmainkar@nvidia.com> wrote:
>
> According to the ACPI specification 19.6.134, no argument is
> required to be passed for ASL Timer instruction. For taking
> care of no argument, AML_NO_OPERAND_RESOLVE flag is added to
> ASL Timer instruction opcode.
>
> When ASL timer instruction interpreted by ACPI interpreter,
> getting error. After adding AML_NO_OPERAND_RESOLVE flag to
> ASL Timer instruction opcode, issue is not observed.
>
> =============================================================
> UBSAN: array-index-out-of-bounds in acpica/dswexec.c:401:12
> index -1 is out of range for type 'acpi_operand_object *[9]'
> CPU: 37 PID: 1678 Comm: cat Not tainted
> 6.0.0-dev-th500-6.0.y-1+bcf8c46459e407-generic-64k
> HW name: NVIDIA BIOS v1.1.1-d7acbfc-dirty 12/19/2022 Call trace:
>  dump_backtrace+0xe0/0x130
>  show_stack+0x20/0x60
>  dump_stack_lvl+0x68/0x84
>  dump_stack+0x18/0x34
>  ubsan_epilogue+0x10/0x50
>  __ubsan_handle_out_of_bounds+0x80/0x90
>  acpi_ds_exec_end_op+0x1bc/0x6d8
>  acpi_ps_parse_loop+0x57c/0x618
>  acpi_ps_parse_aml+0x1e0/0x4b4
>  acpi_ps_execute_method+0x24c/0x2b8
>  acpi_ns_evaluate+0x3a8/0x4bc
>  acpi_evaluate_object+0x15c/0x37c
>  acpi_evaluate_integer+0x54/0x15c
>  show_power+0x8c/0x12c [acpi_power_meter]
>
> Signed-off-by: Abhishek Mainkar <abmainkar@nvidia.com>

ACPICA changes need to be submitted as pull requests to the upstream
ACPICA project on GitHub.

Once you have submitted an ACPICA pull request, please resend the
corresponding Linux patch with a Link: tag pointing to that pull
request.

Thanks!

> ---
>  drivers/acpi/acpica/psopcode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/acpica/psopcode.c b/drivers/acpi/acpica/psopcode.c
> index bef69e87a0a2..8c34c0ffb1d9 100644
> --- a/drivers/acpi/acpica/psopcode.c
> +++ b/drivers/acpi/acpica/psopcode.c
> @@ -603,7 +603,7 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {
>
>  /* 7E */ ACPI_OP("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY,
>                          AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R,
> -                        AML_FLAGS_EXEC_0A_0T_1R),
> +                        AML_FLAGS_EXEC_0A_0T_1R | AML_NO_OPERAND_RESOLVE),
>
>  /* ACPI 5.0 opcodes */
>
> --
> 2.17.1
>

  reply	other threads:[~2023-06-29  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 22:06 [Acpica-devel] [Patch] acpica: Add AML_NO_OPERAND_RESOLVE flag to Timer Abhishek Mainkar
2023-06-29  8:26 ` Rafael J. Wysocki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-30  4:24 [Acpica-devel] [PATCH] " Abhishek Mainkar

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=CAJZ5v0iE4MtjnBWwq0dS7x8B8AsZS0sJFfO6fRwtLJOfUhbEUg@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=abmainkar@nvidia.com \
    --cc=acpica-devel@lists.linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).