From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Kees Cook <keescook@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>, Baoquan He <bhe@redhat.com>,
Chao Fan <fanc.fnst@cn.fujitsu.com>
Subject: Re: [PATCH] x86/boot: minor improvement in kaslr
Date: Wed, 13 Feb 2019 11:10:10 +0800 [thread overview]
Message-ID: <f2278379-07cf-6ad4-aff8-2473b7545e80@cn.fujitsu.com> (raw)
In-Reply-To: <CAGXu5jJ+1==nCOCOwL=-UPfZ8rBA_u_Y82dpD75gxzdBOTK+Gw@mail.gmail.com>
On 2/1/19 4:20 PM, Kees Cook wrote:
> On Fri, Feb 1, 2019 at 6:51 PM Cao jin <caoj.fnst@cn.fujitsu.com> wrote:
>>
>> comments fix: input_size is ZO image size which just don't count .bss
>> in, but has .text, .data, etc;
>> drop unecessary alignment: minimum is either 512M or output, both are
>> CONFIG_PHYSICAL_ALIGN aligned(output is aligned in head_32/64.S). But
>> mention it in earlier comments.
>>
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>> arch/x86/boot/compressed/kaslr.c | 9 +++------
>> 1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
>> index 9ed9709d9947..a947c5aba34e 100644
>> --- a/arch/x86/boot/compressed/kaslr.c
>> +++ b/arch/x86/boot/compressed/kaslr.c
>> @@ -360,7 +360,7 @@ static void handle_mem_options(void)
>> * (i.e. it does not include its run size). This range must be avoided
>> * because it contains the data used for decompression.
>> *
>> - * [input+input_size, output+init_size) is [_text, _end) for ZO. This
>> + * [input+input_size, output+init_size) is [_bss, _end) for ZO. This
>
> This isn't right. The comment was correct before. See
> arch/x86/boot/compressed/vmlinux.lds.S for the layout of the ZO image:
> after the compressed image is _text, _rodata, _got, _data, _bss,
> _pgtable, and _end. "[_text, _end)" correctly identifies the span
> used.
>
Finally see why I am wrong here, I mixed up with the input_size & ZO
image file size. Sorry for the noise, and thanks very much for your
hint, Kees!
--
Sincerely,
Cao jin
prev parent reply other threads:[~2019-02-13 3:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 5:48 [PATCH] x86/boot: minor improvement in kaslr Cao jin
2019-02-01 8:20 ` Kees Cook
2019-02-01 9:41 ` Cao jin
2019-02-13 3:10 ` Cao jin [this message]
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=f2278379-07cf-6ad4-aff8-2473b7545e80@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=fanc.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).