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]
Date:   Fri, 2 Dec 2022 19:04:33 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     "Bart Groeneveld | GPX Solutions B.V" <bart@...bv.nl>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] acpi: allow usage of acpi_tad without PRW

On Fri, Dec 2, 2022 at 4:36 PM Bart Groeneveld | GPX Solutions B.V
<bart@...bv.nl> wrote:
>
> From: "Bart Groeneveld | GPX Solutions B.V." <bart@...bv.nl>
>
> Not all tads have the PRW capability, which is totally OK,
> according to the ACPI spec [1]:
>
> > _PRW is only required for devices that have the ability to wake
> > the system from a system sleeping state.

No, the ACPI TAD definition in Section 9.17 (ACPI 6.5) specifically
requires _PRW to be present unless the system is hardware-reduced.

Anyway, the RTC part can still be supported without _PRW, but then the
wakeup-related attributes should not be present in such cases.

> This partially solves [2] and [3].
>
> [1]: https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf
> [2]: https://bugzilla.kernel.org/show_bug.cgi?id=212313
> [3]: https://github.com/linux-surface/linux-surface/issues/415
>
> Signed-off-by: Bart Groeneveld | GPX Solutions B.V. <bart@...bv.nl>
> ---
>  drivers/acpi/acpi_tad.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c
> index e9b8e8305e23..67f71fa4362f 100644
> --- a/drivers/acpi/acpi_tad.c
> +++ b/drivers/acpi/acpi_tad.c
> @@ -604,11 +604,6 @@ static int acpi_tad_probe(struct platform_device *pdev)
>                 return -ENODEV;
>         }
>
> -       if (!acpi_has_method(handle, "_PRW")) {
> -               dev_info(dev, "Missing _PRW\n");
> -               return -ENODEV;
> -       }
> -

This may be sufficient for the RTC part alone to work, but making the
wakeup-related attributes available doesn't really make sense in the
_PRW absent case, so they all should be made optional.

>         dd = devm_kzalloc(dev, sizeof(*dd), GFP_KERNEL);
>         if (!dd)
>                 return -ENOMEM;
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ