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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gGjfomEJAJ8c6HwQz9oOqZk+gYfJM4q9XTWy5vHLzoSA@mail.gmail.com>
Date: Mon, 7 Apr 2025 20:25:57 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Jean-Marc Eurin <jmeurin@...gle.com>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Sudeep Holla <sudeep.holla@....com>, 
	Pierre Gondois <pierre.gondois@....com>
Subject: Re: [PATCH] ACPI PPTT: Fix typos in a couple of sizeof() calls.

On Wed, Apr 2, 2025 at 2:15 AM Jean-Marc Eurin <jmeurin@...gle.com> wrote:
>
> The end of table checks should be done with the structure size,
> but 2 of the 3 similar calls use the pointer size.
>
> Signed-off-by: Jean-Marc Eurin <jmeurin@...gle.com>
> ---
>  drivers/acpi/pptt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
> index a35dd0e41c27..f73ce6e13065 100644
> --- a/drivers/acpi/pptt.c
> +++ b/drivers/acpi/pptt.c
> @@ -229,7 +229,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
>         node_entry = ACPI_PTR_DIFF(node, table_hdr);
>         entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
>                              sizeof(struct acpi_table_pptt));
> -       proc_sz = sizeof(struct acpi_pptt_processor *);
> +       proc_sz = sizeof(struct acpi_pptt_processor);
>
>         while ((unsigned long)entry + proc_sz < table_end) {
>                 cpu_node = (struct acpi_pptt_processor *)entry;
> @@ -270,7 +270,7 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he
>         table_end = (unsigned long)table_hdr + table_hdr->length;
>         entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
>                              sizeof(struct acpi_table_pptt));
> -       proc_sz = sizeof(struct acpi_pptt_processor *);
> +       proc_sz = sizeof(struct acpi_pptt_processor);
>
>         /* find the processor structure associated with this cpuid */
>         while ((unsigned long)entry + proc_sz < table_end) {
> --

Applied as 6.15-rc material with a couple of edits in the subject.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ