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]
Date:   Wed, 13 Feb 2019 11:10:10 +0800
From:   Cao jin <caoj.fnst@...fujitsu.com>
To:     Kees Cook <keescook@...omium.org>
CC:     LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, Baoquan He <bhe@...hat.com>,
        Chao Fan <fanc.fnst@...fujitsu.com>
Subject: Re: [PATCH] x86/boot: minor improvement in kaslr

On 2/1/19 4:20 PM, Kees Cook wrote:
> On Fri, Feb 1, 2019 at 6:51 PM Cao jin <caoj.fnst@...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@...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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ