Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alignment must be power of 2 #218

Closed
nickdesaulniers opened this issue Oct 15, 2018 · 44 comments
Closed

alignment must be power of 2 #218

nickdesaulniers opened this issue Oct 15, 2018 · 44 comments

Comments

@nickdesaulniers
Copy link
Member

@nickdesaulniers nickdesaulniers commented Oct 15, 2018

ld.lld: error: ./arch/x86/kernel/vmlinux.lds:185: alignment must be power of 2

after applying every workaround for every known issue we have with LLD, this is the final error I hit (may not be reproducible once we fix the rest). Not sure about the source line, since it looks the C preprocessor gets run on this linker script (hence the .lds suffix).

@nickdesaulniers

This comment has been minimized.

Copy link
Member Author

@nickdesaulniers nickdesaulniers commented Oct 15, 2018

Might be orc unwinder related, the preprocessed source L185 looks like:

. = ALIGN(4); .orc_unwind_ip : AT(ADDR(.orc_unwind_ip) - 0xffffffff80000000) { __start_orc_u    nwind_ip = .; KEEP(*(.orc_unwind_ip)) __stop_orc_unwind_ip = .; } . = ALIGN(6); .orc_unwind :     AT(ADDR(.orc_unwind) - 0xffffffff80000000) { __start_orc_unwind = .; KEEP(*(.orc_unwind)) __    stop_orc_unwind = .; } . = ALIGN(4); .orc_lookup : AT(ADDR(.orc_lookup) - 0xffffffff80000000)     { orc_lookup = .; . += (((SIZEOF(.text) + (1 << 8) - 1) / (1 << 8)) + 1) * 4; orc_lookup_end     = .; }
@tpimh

This comment has been minimized.

Copy link

@tpimh tpimh commented Nov 15, 2018

I was able to link the kernel with the following fix:

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3d7a6a9c2370..f687c834810c 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(8);							\
 	.orc_unwind : AT(ADDR(.orc_unwind) - LOAD_OFFSET) {		\
 		__start_orc_unwind = .;					\
 		KEEP(*(.orc_unwind))					\
-- 
2.19.1

I'm sure this is not how it should be done and LLVM side should be fixed instead, but at least I was able to compile the kernel and link it with LLD.

@E5ten

This comment has been minimized.

Copy link

@E5ten E5ten commented Jan 23, 2019

I get the same error even when I apply that patch

@E5ten

This comment has been minimized.

Copy link

@E5ten E5ten commented Feb 12, 2019

Actually it's not quite the same error, I get

ld.lld: error: <internal>: section sh_addralign is not a power of 2
@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 25, 2019

Workaround this by:

scripts/config -d CRYPTO_SHA512_SSSE3

CRYPTO_SHA512_SSSE3 m -> n
@E5ten

This comment has been minimized.

Copy link

@E5ten E5ten commented Feb 25, 2019

Any idea what in the sha512_ssse3 module is causing problems?

@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 25, 2019

No.
When building with make V=1 CC=clang-9 HOSTCC=clang-9 LD=ld.lld -j1 I saw something similiar like here.
Currently, my focus is to get the beast built with ld.lld (and boot on bare metal).
I am still building (maybe I hit this one later).

@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 25, 2019

Hurrying on to the train (compile/link tested only):

$ readelf --string-dump .comment vmlinux

String dump of section '.comment':
  [     0]  Linker: LLD 9.0.0 (https://github.com/llvm-mirror/lld.git 7013b9a9ac88072094243c15349dffa910b85cfd)
  [    64]  clang version 9.0.0 (https://github.com/llvm-mirror/clang.git 6a9d9dddc230e461a95921b306558553c955f010) (https://github.com/llvm-mirror/llvm.git c08de5fe639302cec42bd72d2a30b0ce22797e66)
@nickdesaulniers

This comment has been minimized.

Copy link
Member Author

@nickdesaulniers nickdesaulniers commented Feb 25, 2019

Re: #218 (comment), I'd be curious to know if git blame of that line points to a commit that explains why alignment is not a power of 2? I'm curious if there's a good reason for it; then LLD should not error on NPOT (non-power-of-two) ALIGN statements, or if the kernel is wrong here?

@nathanchance

This comment has been minimized.

Copy link
Member

@nathanchance nathanchance commented Feb 25, 2019

Introduced in ee9f8fc by @jpoimboe.

@jpoimboe

This comment has been minimized.

Copy link

@jpoimboe jpoimboe commented Feb 25, 2019

Hm, speaking as the author of that code, that 6-byte alignment shouldn't be necessary and we can change it to 8. Let me do some testing and then I'll post the patch upstream soon-ish.

@jpoimboe

This comment has been minimized.

Copy link

@jpoimboe jpoimboe commented Feb 25, 2019

The reason it's aligned at 6 bytes, is because there's a packed array of 6-byte structs immediately after. So maybe 6-byte alignment should be allowed for this type of purpose? I don't really care much anyway, though it will waste up to two bytes for me to change it :-)

@nickdesaulniers

This comment has been minimized.

Copy link
Member Author

@nickdesaulniers nickdesaulniers commented Feb 25, 2019

@GeorgiiR @rui314 I assume lld just errors as a precaution when the ALIGNment is a NPOT, but the underlying machinery would handle the case just fine without the warning?

@GeorgiiR

This comment has been minimized.

Copy link

@GeorgiiR GeorgiiR commented Feb 26, 2019

@GeorgiiR @rui314 I assume lld just errors as a precaution when the ALIGNment is a NPOT, but the underlying machinery would handle the case just fine without the warning?

If you ignore the error somehow, LLD would align to a dummy POT value then, which is 1 currently:

    if (!isPowerOf2_64(Alignment)) {
      error(Loc + ": alignment must be power of 2");
      return (uint64_t)1; // Return a dummy value.
    }

See #1
See #2

@nickdesaulniers

This comment has been minimized.

Copy link
Member Author

@nickdesaulniers nickdesaulniers commented Feb 26, 2019

right, so if that condition was removed (ex. number 2), then would LLD proceed correctly? I think it's being too strict, but maybe there's a good reason like something not being implemented that's not immediately obvious?

@GeorgiiR

This comment has been minimized.

Copy link

@GeorgiiR GeorgiiR commented Feb 26, 2019

right, so if that condition was removed (ex. number 2), then would LLD proceed correctly?

This was never tested, but I know/see no obvious reasons for failure atm. Perhaps it will just work.

@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 26, 2019

With the patch of @tpimh from here and "x86/build: Mark per-CPU symbols as absolute explicitly for LLD" from @nickdesaulniers I could build with LLD but cannot boot in QEMU (see attached log-file).

[ run_qemu.sh ]
KPATH=$(pwd)

qemu-system-x86_64 -enable-kvm -M pc -kernel $KPATH/bzImage -initrd $KPATH/initrd.img -m 512 -net none -serial stdio -append "root=/dev/ram0 console=ttyS0 hung_task_panic=1 earlyprintk=ttyS0,115200"

I tried to turn off acpi / pci / pti etc. None really helped.

qemu-log.txt

@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 26, 2019

@E5ten Building/Linking looks good (no alignment must be power of 2 breakage):

$ ./scripts/diffconfig /boot/config-5.0.0-rc8-2-amd64-cbl-asmgoto .config
 BUILD_SALT "5.0.0-rc8-2-amd64-cbl-asmgoto" -> "5.0.0-rc8-3-amd64-cbl-asmgoto"
 CRYPTO_SHA512 m -> y
 CRYPTO_SHA512_SSSE3 n -> y
@E5ten

This comment has been minimized.

Copy link

@E5ten E5ten commented Feb 26, 2019

@dileks ld.lld: error: <internal>: section sh_addralign is not a power of 2 I still get this when I enable CRYPTO_SHA512_SSSE3.
EDIT: and when I disable it and successfully link the kernel it fails to boot for me as well.

@GeorgiiR

This comment has been minimized.

Copy link

@GeorgiiR GeorgiiR commented Feb 26, 2019

It is illegal for sh_addralign to be NPOT I think.
(https://docs.oracle.com/cd/E19455-01/806-3773/elf-2/index.html):

If a section has an address alignment constraint, the value in this field is the modulus, in byte units, by which the value of sh_addr must be congruent to 0; i.e., sh_addr = 0 (mod sh_addralign). For example, if a section contains a long (32 bits), the entire section must be ensured long alignment, so sh_addralign has the value 4. Only 0 and positive integral powers of 2 are currently allowed as values for this field. A value of 0 or 1 indicates no address alignment constraints.

@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 26, 2019

@E5ten can you join #clangbuiltlinux @ freenode?

@GeorgiiR

This comment has been minimized.

Copy link

@GeorgiiR GeorgiiR commented Feb 26, 2019

This should make an LLD error message to be a bit more meaningful:
https://reviews.llvm.org/D58670

@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 26, 2019

@GeorgiiR How can I run a single test like test/ELF/invalid/section-alignment2.s to check (with) the new generated lld binary?

@GeorgiiR

This comment has been minimized.

Copy link

@GeorgiiR GeorgiiR commented Feb 26, 2019

@dileks
llvm-lit <patch_to_test>
e.g.
~/LLVM/build_lldb/bin/llvm-lit /home/umb/LLVM/llvm/tools/lldb/lit/Breakpoint/case-sensitive.test

@dileks

This comment has been minimized.

Copy link

@dileks dileks commented Feb 26, 2019

@GeorgiiR

$ cd $BUILD_DIR
$ ./bin/llvm-lit ../llvm/tools/lld/test/ELF/invalid/section-alignment2.s
llvm-lit: /home/sdi/src/llvm-toolchain/llvm/utils/lit/lit/llvm/config.py:337: note: using ld.lld: /home/sdi/src/llvm-toolchain/build/bin/ld.lld
llvm-lit: /home/sdi/src/llvm-toolchain/llvm/utils/lit/lit/llvm/config.py:337: note: using lld-link: /home/sdi/src/llvm-toolchain/build/bin/lld-link
llvm-lit: /home/sdi/src/llvm-toolchain/llvm/utils/lit/lit/llvm/config.py:337: note: using ld64.lld: /home/sdi/src/llvm-toolchain/build/bin/ld64.lld
llvm-lit: /home/sdi/src/llvm-toolchain/llvm/utils/lit/lit/llvm/config.py:337: note: using wasm-ld: /home/sdi/src/llvm-toolchain/build/bin/wasm-ld
-- Testing: 1 tests, single process --
PASS: lld :: ELF/invalid/section-alignment2.s (1 of 1)
Testing Time: 0.02s
  Expected Passes    : 1
@nickdesaulniers

This comment has been minimized.

@tpimh tpimh removed the low priority label Mar 10, 2019
avagin pushed a commit to avagin/linux that referenced this issue Mar 10, 2019
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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
hohoxu added a commit to hohoxu/n5kernel that referenced this issue Mar 11, 2019
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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
@nathanchance

This comment has been minimized.

Copy link
Member

@nathanchance nathanchance commented Mar 11, 2019

Whissi pushed a commit to Whissi/linux-stable that referenced this issue Mar 23, 2019
commit f76a16a upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Mar 23, 2019
commit f76a16a upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Mar 23, 2019
commit f76a16a upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jpuhlman added a commit to MontaVista-OpenSourceTechnology/linux-mvista-2.4 that referenced this issue Apr 11, 2019
Source: linux-mvista-2.4
MR: 96956
Type: Integration
Disposition: Merged from linux-mvista-2.4
ChangeID: f51b6322ff023358d81a41a1718d7d6c95f9c87c
Description:

commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
isjerryxiao added a commit to isjerryxiao/Amlogic_s905-kernel that referenced this issue Apr 12, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
randomblame added a commit to randomblame/android_kernel_xiaomi_sm8150 that referenced this issue Apr 20, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dsd pushed a commit to endlessm/linux that referenced this issue Apr 23, 2019
BugLink: https://bugs.launchpad.net/bugs/1821607

commit f76a16a upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista-2.4 that referenced this issue Apr 25, 2019
Source: kernel.org
MR: 96956
Type: Integration
Disposition: Merged from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-4.14.y
ChangeID: f51b6322ff023358d81a41a1718d7d6c95f9c87c
Description:

commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
randomblame added a commit to randomblame/android_kernel_xiaomi_sm8150 that referenced this issue Apr 28, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staars added a commit to Staars/linux-stable that referenced this issue May 11, 2019
commit f76a16a upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mseaster-wr pushed a commit to WindRiver-Labs/linux-yocto-4.18 that referenced this issue Jun 5, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
mdeejay added a commit to BeastRoms-Devices/kernel_xiaomi_raphael that referenced this issue Aug 17, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mdeejay added a commit to BeastRoms-Devices/kernel_xiaomi_cepheus that referenced this issue Aug 22, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mdeejay added a commit to BeastRoms-Devices/kernel_xiaomi_laurel_sprout that referenced this issue Aug 30, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fc ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Flatty11 added a commit to Flatty11/Kernel_9750 that referenced this issue Oct 13, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
freeza-inc added a commit to freeza-inc/bm-galaxy-note10-sd855-pie that referenced this issue Dec 26, 2019
commit f76a16adc485699f95bb71fce114f97c832fe664 upstream.

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.

Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Dmitry Golovin <dima@golovin.in>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: ClangBuiltLinux/linux#218
Link: https://lkml.kernel.org/r/d55027ee95fe73e952dcd8be90aebd31b0095c45.1551892041.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.