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: <3299662.WAS8YLIUlv@vostro.rjw.lan>
Date:	Fri, 02 Aug 2013 15:03:56 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Tang Chen <tangchen@...fujitsu.com>
Cc:	robert.moore@...el.com, lv.zheng@...el.com, lenb@...nel.org,
	tglx@...utronix.de, mingo@...e.hu, hpa@...or.com,
	akpm@...ux-foundation.org, tj@...nel.org, trenn@...e.de,
	yinghai@...nel.org, jiang.liu@...wei.com, wency@...fujitsu.com,
	laijs@...fujitsu.com, isimatu.yasuaki@...fujitsu.com,
	izumi.taku@...fujitsu.com, mgorman@...e.de, minchan@...nel.org,
	mina86@...a86.com, gong.chen@...ux.intel.com,
	vasilis.liaskovitis@...fitbricks.com, lwoodman@...hat.com,
	riel@...hat.com, jweiner@...hat.com, prarit@...hat.com,
	zhangyanfei@...fujitsu.com, yanghy@...fujitsu.com, x86@...nel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH v2 RESEND 07/18] x86, ACPI: Also initialize signature and length when parsing root table.

On Friday, August 02, 2013 05:14:26 PM Tang Chen wrote:
> Besides the phys addr of the acpi tables, it will be very convenient if
> we also have the signature of each table in acpi_gbl_root_table_list at
> early time. We can find SRAT easily by comparing the signature.
> 
> This patch alse record signature and some other info in
> acpi_gbl_root_table_list at early time.
> 
> Signed-off-by: Tang Chen <tangchen@...fujitsu.com>
> Reviewed-by: Zhang Yanfei <zhangyanfei@...fujitsu.com>

The subject is misleading, as the change is in ACPICA and therefore affects not
only x86.

Also I think the same comments as for the other ACPICA patch is this series
applies: You shouldn't modify acpi_tbl_parse_root_table() in ways that would
require the other OSes using ACPICA to be modified.

> ---
>  drivers/acpi/acpica/tbutils.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
> index e3621cf..af942fe 100644
> --- a/drivers/acpi/acpica/tbutils.c
> +++ b/drivers/acpi/acpica/tbutils.c
> @@ -438,6 +438,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
>  	u32 i;
>  	u32 table_count;
>  	struct acpi_table_header *table;
> +	struct acpi_table_desc *table_desc;
>  	acpi_physical_address address;
>  	acpi_physical_address uninitialized_var(rsdt_address);
>  	u32 length;
> @@ -577,6 +578,27 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
>  	 */
>  	acpi_os_unmap_memory(table, length);
>  
> +	/*
> +	 * Also initialize the table entries here, so that later we can use them
> +	 * to find SRAT at very eraly time to reserve hotpluggable memory.
> +	 */
> +	for (i = 2; i < acpi_gbl_root_table_list.current_table_count; i++) {
> +		table = acpi_os_map_memory(
> +				acpi_gbl_root_table_list.tables[i].address,
> +				sizeof(struct acpi_table_header));
> +		if (!table)
> +			return_ACPI_STATUS(AE_NO_MEMORY);
> +
> +		table_desc = &acpi_gbl_root_table_list.tables[i];
> +
> +		table_desc->pointer = NULL;
> +		table_desc->length = table->length;
> +		table_desc->flags = ACPI_TABLE_ORIGIN_MAPPED;
> +		ACPI_MOVE_32_TO_32(table_desc->signature.ascii, table->signature);
> +
> +		acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
> +	}
> +
>  	return_ACPI_STATUS(AE_OK);
>  }

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ