From: Chao Fan <fanc.fnst@cn.fujitsu.com>
To: Dou Liyang <douly.fnst@cn.fujitsu.com>
Cc: <linux-kernel@vger.kernel.org>, <x86@kernel.org>, <hpa@zytor.com>,
<tglx@linutronix.de>, <mingo@redhat.com>, <bhe@redhat.com>,
<keescook@chromium.org>, <yasu.isimatu@gmail.com>,
<indou.takao@jp.fujitsu.com>, <caoj.fnst@cn.fujitsu.com>,
<fanc.fnst@cn.fujitsu.com>
Subject: Re: [PATCH v4 2/4] x86/boot: Add acpitb.c to parse acpi tables
Date: Fri, 3 Aug 2018 10:08:45 +0800 [thread overview]
Message-ID: <20180803020844.GF6723@localhost.localdomain> (raw)
In-Reply-To: <694e364b-f94d-662e-f30f-ac65fb920548@cn.fujitsu.com>
On Fri, Aug 03, 2018 at 10:00:48AM +0800, Dou Liyang wrote:
>
>
>At 07/23/2018 05:29 PM, Chao Fan wrote:
>> Imitate the ACPI code to parse ACPI tables. Functions are simplified
>> cause some operations are not needed here.
>> And also, this method won't influence the initialization of ACPI.
>>
>> Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
>
>Hi Fan,
>
>I know you got the code from acpica subsystem and EFI code... and do
>many adaptation work for KASLR. It's awesome!
>
>I think you can add some other simple comments.
>
> - what differences between your function and the function you based on
> and why did you do that?
>
>... to make this more credible and easy to remember the details as time
>goes on.
That's a good idea, will add more comments.
>
>Also some concerns below.
>> ---
>[...]
>> + else if (!strncmp(sig, EFI32_LOADER_SIGNATURE, 4))
>> + efi_64 = false;
>> + else {
>> + debug_putstr("Wrong efi loader signature.\n");
>
>s/efi/EFI/, also need fix in the comments below.
>
>> + return false;
>> + }
>> +
>[...]
>> + /*
>> + * Get rsdp from efi tables.
>> + * If we find acpi table, go on searching for acpi20 table.
>> + * If we didn't get acpi20 table then use acpi table.
>> + * If neither acpi table nor acpi20 table found,
>> + * return false.
>> + */
>> + if (!(efi_guidcmp(guid, ACPI_TABLE_GUID)) && !acpi_20) {
>> + *rsdp_addr = (acpi_physical_address)table;
>> + acpi_20 = false;
>> + find_rsdp = true;
>> + } else if (!(efi_guidcmp(guid, ACPI_20_TABLE_GUID))) {
>> + *rsdp_addr = (acpi_physical_address)table;
>> + acpi_20 = true;
>> + return true;
>
>If we find the ACPI 2.0, we will return immediately, so the variable and
>logic of _acpi_20_ is redundant.
I will check the logical and fix the mistake.
Thanks,
Chao Fan
>
>Thanks,
> dou
next prev parent reply other threads:[~2018-08-03 2:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 9:29 [PATCH v4 0/4] x86/boot/KASLR: Parse ACPI table and limit kaslr in immovable memory Chao Fan
2018-07-23 9:29 ` [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables Chao Fan
2018-07-24 6:02 ` Baoquan He
2018-07-24 6:13 ` Chao Fan
2018-07-24 8:36 ` Chao Fan
2018-07-25 7:10 ` Baoquan He
2018-07-23 9:29 ` [PATCH v4 2/4] x86/boot: Add acpitb.c to " Chao Fan
2018-08-03 2:00 ` Dou Liyang
2018-08-03 2:08 ` Chao Fan [this message]
2018-07-23 9:29 ` [PATCH v4 3/4] x86/boot/KASLR: Walk srat tables to filter immovable memory Chao Fan
2018-08-02 3:47 ` Dou Liyang
2018-08-02 3:54 ` Chao Fan
2018-08-02 7:05 ` Thomas Gleixner
2018-08-02 7:20 ` Dou Liyang
2018-07-23 9:29 ` [PATCH v4 4/4] x86/boot/KASLR: Limit kaslr to choosing the " Chao Fan
2018-08-02 5:46 ` Dou Liyang
2018-08-02 6:00 ` Chao Fan
2018-08-02 6:05 ` Dou Liyang
2018-08-02 1:17 ` [PATCH v4 0/4] x86/boot/KASLR: Parse ACPI table and limit kaslr in " Chao Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180803020844.GF6723@localhost.localdomain \
--to=fanc.fnst@cn.fujitsu.com \
--cc=bhe@redhat.com \
--cc=caoj.fnst@cn.fujitsu.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=indou.takao@jp.fujitsu.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yasu.isimatu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.