lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h+CSu80-ZBbU-_RpHbdG8As4rrsKbXLM4RqY12JtV-Cg@mail.gmail.com>
Date: Fri, 23 May 2025 16:52:04 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Zhu Qiyu <qiyuzhu2@....com>
Cc: rafael@...nel.org, lenb@...nel.org, linux-acpi@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] ACPI:PRM: Reduce unnecessary printing to avoid the
 worries of regular users

On Sun, May 18, 2025 at 8:25 AM Zhu Qiyu <qiyuzhu2@....com> wrote:
>
> Commit 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM
> handler and context") introduces non-essential printing "Failed to find
> VA for GUID: xxxx, PA: 0x0" which causes unnecessary worry for regular
> users.
>
> Refer to PRM Spec Section 4.1.2[1], both static data buffer address
> and ACPI parameter buffer address may be NULL if they are not needed.
> So there is no need to print out "Failed to find VA ... " to intimidate
> regular users.
>
> Link: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf # [1]
>
> Signed-off-by: Zhu Qiyu <qiyuzhu2@....com>
> ---
>
> Previous versions can be found at:
> v1: https://lore.kernel.org/linux-acpi/CAJZ5v0hv0WKd-SXFhUgYs-Zpc+-PsSNOBu0r7L5TzJWgddtsKA@mail.gmail.com/t/#u
> v2: https://lore.kernel.org/linux-acpi/20250512010620.142155-1-qiyuzhu2@amd.com/#r
> v3: https://lore.kernel.org/linux-acpi/20250512011833.142204-1-qiyuzhu2@amd.com/t/#u
>
> Changes in v2:
>  - Reduce the code changes.
> Changes in v3:
>  - Fixed title letters not showing.
> Changes in v4:
>  - Only print the necessary warnings.
>
>  drivers/acpi/prmt.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
> index e549914a636c..bee450869cce 100644
> --- a/drivers/acpi/prmt.c
> +++ b/drivers/acpi/prmt.c
> @@ -85,8 +85,6 @@ static u64 efi_pa_va_lookup(efi_guid_t *guid, u64 pa)
>                 }
>         }
>
> -       pr_warn("Failed to find VA for GUID: %pUL, PA: 0x%llx", guid, pa);
> -
>         return 0;
>  }
>
> @@ -154,6 +152,15 @@ acpi_parse_prmt(union acpi_subtable_headers *header, const unsigned long end)
>                 guid_copy(&th->guid, (guid_t *)handler_info->handler_guid);
>                 th->handler_addr =
>                         (void *)efi_pa_va_lookup(&th->guid, handler_info->handler_address);
> +               /*
> +                * Refer to PRM Spec, both static data buffer address and
> +                * ACPI parameter buffer address may be NULL if they are not
> +                * needed. So there only print out warning if handler address
> +                * is zero.
> +                */
> +               if (!th->handler_addr)
> +                       pr_warn("Failed to find VA for GUID: %pUL, PA: 0x%llx",
> +                               &th->guid, handler_info->handler_address);

I think that the message should still be printed in the other cases if
the physical address passed to efi_pa_va_lookup() is nonzero and the
lookup fails.

>
>                 th->static_data_buffer_addr =
>                         efi_pa_va_lookup(&th->guid, handler_info->static_data_buffer_address);
>
> base-commit: 82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ