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:   Tue, 18 Dec 2018 10:28:51 +0800
From:   Chao Fan <fanc.fnst@...fujitsu.com>
To:     Ingo Molnar <mingo@...nel.org>
CC:     <linux-kernel@...r.kernel.org>, <x86@...nel.org>, <bp@...en8.de>,
        <tglx@...utronix.de>, <mingo@...hat.com>, <hpa@...or.com>,
        <keescook@...omium.org>, <bhe@...hat.com>, <msys.mizuma@...il.com>,
        <indou.takao@...fujitsu.com>, <caoj.fnst@...fujitsu.com>
Subject: Re: [PATCH v14 3/5] x86/boot: Introduce bios_get_rsdp_addr() to
 search RSDP in memory

On Mon, Dec 17, 2018 at 06:38:37PM +0100, Ingo Molnar wrote:
>
>* Chao Fan <fanc.fnst@...fujitsu.com> wrote:
>
>> +		/* Check the standard checksum */
>> +		if (compute_checksum((u8 *) rsdp, ACPI_RSDP_CHECKSUM_LENGTH))
>> +			continue;
>
>Could you please run your patches through checkpatch, does it not 
>complain about this line?

I did,  0 errors, 0 warnings.
If you mean the useless space, I can drop it.
But it's from acpi_tb_validate_rsdp() of drivers/acpi/acpica/tbxfroot.c.
>
>> +/* Search RSDP address, based on acpi_find_root_pointer(). */
>> +static acpi_physical_address bios_get_rsdp_addr(void)
>> +{
>> +	u8 *table_ptr;
>> +	u32 address;
>> +	u8 *rsdp;
>> +
>> +	/* Get the location of the Extended BIOS Data Area (EBDA) */
>> +	table_ptr = (u8 *)ACPI_EBDA_PTR_LOCATION;
>> +	*(u32 *)(void *)&address = *(u16 *)(void *)table_ptr;
>
>what? So you take the address of 'u32 address', which turns it into an 
>u32 * - then you cast it to void *, then back to u32 * and then deference 
>it???

I will clean it, it's from
#define ACPI_MOVE_16_TO_32(d, s)        *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
in acpi_find_root_pointer().
I thought it is safe to use the code existing in kernel.

Thanks,
Chao Fan

>
>Thanks,
>
>	Ingo
>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ