[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdmHe-bkt34E5yf81GoiFRHR8EPnu8wqk2aD2u8P_4Q5jQ@mail.gmail.com>
Date: Wed, 6 Mar 2019 10:44:01 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: x86@...nel.org, LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Dmitry Golovin <dima@...ovin.in>,
Sedat Dilek <sedat.dilek@...il.com>
Subject: Re: [PATCH] x86/unwind/orc: Fix ORC unwind table alignment
On Wed, Mar 6, 2019 at 9:08 AM Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>
> The .orc_unwind section is a packed array of 6-byte structs. It's
> currently aligned to 6 bytes, which is causing warnings in the LLD
> linker.
>
> Six isn't a power of two, so it's not a valid alignment value. The
> actual alignment doesn't matter much because it's an array of packed
> structs. An alignment of two is sufficient. In reality it always gets
> aligned to four bytes because it comes immediately after the
> 4-byte-aligned .orc_unwind_ip section.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/218
> Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder")
Thanks for the patch Josh, we appreciate it. It looks like
ee9f8fce9964 landed in v4.14-rc1. Should we CC stable?
> Reported-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Reported-by: Dmitry Golovin <dima@...ovin.in>
> Reported-by: Sedat Dilek <sedat.dilek@...il.com>
> Tested-by: Sedat Dilek <sedat.dilek@...il.com>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
> ---
> include/asm-generic/vmlinux.lds.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 3d7a6a9c2370..f8f6f04c4453 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -733,7 +733,7 @@
> KEEP(*(.orc_unwind_ip)) \
> __stop_orc_unwind_ip = .; \
> } \
> - . = ALIGN(6); \
> + . = ALIGN(2); \
> .orc_unwind : AT(ADDR(.orc_unwind) - LOAD_OFFSET) { \
> __start_orc_unwind = .; \
> KEEP(*(.orc_unwind)) \
> --
> 2.17.2
>
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists