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:   Mon, 15 Apr 2019 22:23:28 -0500
From:   Kees Cook <keescook@...omium.org>
To:     Sami Tolvanen <samitolvanen@...gle.com>,
        Ingo Molnar <mingo@...hat.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Nicholas Piggin <npiggin@...il.com>, X86 ML <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] x86: fix .bss with -fdata-sections

On Mon, Apr 15, 2019 at 11:50 AM Sami Tolvanen <samitolvanen@...gle.com> wrote:
>
> With LD_DEAD_CODE_DATA_ELIMINATION, we compile the kernel with
> -fdata-sections, which also splits the .bss section. Use the
> common BSS_MAIN macro in the linker script to properly merge all
> the generated sections.
>
> Signed-off-by: Sami Tolvanen <samitolvanen@...gle.com>

Nice work tracking this down! :)

Reviewed-by: Kees Cook <keescook@...omium.org>

Nit/tweak/clarification for commit title:
    x86/build: Fix truncated .bss with -fdata-sections

-Kees

> ---
>  arch/x86/kernel/vmlinux.lds.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
> index bad8c51fee6e..a5127b2c195f 100644
> --- a/arch/x86/kernel/vmlinux.lds.S
> +++ b/arch/x86/kernel/vmlinux.lds.S
> @@ -362,7 +362,7 @@ SECTIONS
>         .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
>                 __bss_start = .;
>                 *(.bss..page_aligned)
> -               *(.bss)
> +               *(BSS_MAIN)
>                 BSS_DECRYPTED
>                 . = ALIGN(PAGE_SIZE);
>                 __bss_stop = .;
> --
> 2.21.0.392.gf8f6787159e-goog
>


-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ