public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Kees Cook <keescook@chromium.org>
Subject: [GIT PULL] core/build changes for v5.10: Add orphan section checking for x86, ARM and ARM64
Date: Mon, 12 Oct 2020 17:34:30 +0200	[thread overview]
Message-ID: <20201012153430.GA3491427@gmail.com> (raw)

Linus,

Please pull the latest core/build git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-build-2020-10-12

   # HEAD: 6e0bf0e0e55000742a53c5f3b58f8669e0091a11 x86/boot/compressed: Warn on orphan section placement

Orphan link sections were a long-standing source of obscure bugs,
because the heuristics that various linkers & compilers use to handle them
(include these bits into the output image vs discarding them silently)
are both highly idiosyncratic and also version dependent.

Instead of this historically problematic mess, this tree by Kees Cook (et al)
adds build time asserts and build time warnings if there's any orphan section
in the kernel or if a section is not sized as expected.

And because we relied on so many silent assumptions in this area, fix a metric
ton of dependencies and some outright bugs related to this, before we can
finally enable the checks on the x86, ARM and ARM64 platforms.

 Thanks,

	Ingo

------------------>
Ard Biesheuvel (3):
      x86/boot/compressed: Move .got.plt entries out of the .got section
      x86/boot/compressed: Force hidden visibility for all symbol references
      x86/boot/compressed: Get rid of GOT fixup code

Arvind Sankar (4):
      x86/boot: Add .text.* to setup.ld
      x86/boot: Remove run-time relocations from .head.text code
      x86/boot: Remove run-time relocations from head_{32,64}.S
      x86/boot: Check that there are no run-time relocations

Kees Cook (28):
      vmlinux.lds.h: Create COMMON_DISCARDS
      vmlinux.lds.h: Add .gnu.version* to COMMON_DISCARDS
      vmlinux.lds.h: Avoid KASAN and KCSAN's unwanted sections
      vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG
      vmlinux.lds.h: Add .symtab, .strtab, and .shstrtab to ELF_DETAILS
      efi/libstub: Disable -mbranch-protection
      arm64/mm: Remove needless section quotes
      arm64/kernel: Remove needless Call Frame Information annotations
      arm64/build: Remove .eh_frame* sections due to unwind tables
      arm64/build: Use common DISCARDS in linker script
      arm64/build: Add missing DWARF sections
      arm64/build: Assert for unwanted sections
      arm/build: Refactor linker script headers
      arm/build: Explicitly keep .ARM.attributes sections
      arm/build: Add missing sections
      arm/build: Assert for unwanted sections
      arm/boot: Handle all sections explicitly
      x86/asm: Avoid generating unused kprobe sections
      x86/build: Enforce an empty .got.plt section
      x86/build: Add asserts for unwanted sections
      x86/boot/compressed: Reorganize zero-size section asserts
      x86/boot/compressed: Remove, discard, or assert for unwanted sections
      x86/boot/compressed: Add missing debugging sections to output
      arm64/build: Warn on orphan section placement
      arm/build: Warn on orphan section placement
      arm/boot: Warn on orphan section placement
      x86/build: Warn on orphan section placement
      x86/boot/compressed: Warn on orphan section placement

Nick Desaulniers (1):
      vmlinux.lds.h: Add PGO and AutoFDO input sections


 arch/alpha/kernel/vmlinux.lds.S                |   1 +
 arch/arc/kernel/vmlinux.lds.S                  |   1 +
 arch/arm/Makefile                              |   4 +
 arch/arm/boot/compressed/Makefile              |   2 +
 arch/arm/boot/compressed/vmlinux.lds.S         |  20 +--
 arch/arm/{kernel => include/asm}/vmlinux.lds.h |  30 ++++-
 arch/arm/kernel/vmlinux-xip.lds.S              |   8 +-
 arch/arm/kernel/vmlinux.lds.S                  |   8 +-
 arch/arm64/Makefile                            |   9 +-
 arch/arm64/kernel/smccc-call.S                 |   2 -
 arch/arm64/kernel/vmlinux.lds.S                |  28 ++++-
 arch/arm64/mm/mmu.c                            |   2 +-
 arch/csky/kernel/vmlinux.lds.S                 |   1 +
 arch/hexagon/kernel/vmlinux.lds.S              |   1 +
 arch/ia64/kernel/vmlinux.lds.S                 |   1 +
 arch/mips/kernel/vmlinux.lds.S                 |   1 +
 arch/nds32/kernel/vmlinux.lds.S                |   1 +
 arch/nios2/kernel/vmlinux.lds.S                |   1 +
 arch/openrisc/kernel/vmlinux.lds.S             |   1 +
 arch/parisc/boot/compressed/vmlinux.lds.S      |   1 +
 arch/parisc/kernel/vmlinux.lds.S               |   1 +
 arch/powerpc/kernel/vmlinux.lds.S              |   2 +-
 arch/riscv/kernel/vmlinux.lds.S                |   1 +
 arch/s390/kernel/vmlinux.lds.S                 |   1 +
 arch/sh/kernel/vmlinux.lds.S                   |   1 +
 arch/sparc/kernel/vmlinux.lds.S                |   1 +
 arch/um/kernel/dyn.lds.S                       |   2 +-
 arch/um/kernel/uml.lds.S                       |   2 +-
 arch/x86/Makefile                              |   4 +
 arch/x86/boot/compressed/Makefile              |  41 ++----
 arch/x86/boot/compressed/head_32.S             |  99 +++++----------
 arch/x86/boot/compressed/head_64.S             | 165 ++++++++++---------------
 arch/x86/boot/compressed/mkpiggy.c             |   6 +
 arch/x86/boot/compressed/vmlinux.lds.S         |  50 +++++++-
 arch/x86/boot/setup.ld                         |   2 +-
 arch/x86/include/asm/asm.h                     |   6 +-
 arch/x86/kernel/vmlinux.lds.S                  |  39 +++++-
 drivers/firmware/efi/libstub/Makefile          |  11 +-
 drivers/firmware/efi/libstub/hidden.h          |   6 -
 include/asm-generic/vmlinux.lds.h              |  49 ++++++--
 include/linux/hidden.h                         |  19 +++
 41 files changed, 378 insertions(+), 253 deletions(-)
 rename arch/arm/{kernel => include/asm}/vmlinux.lds.h (84%)
 delete mode 100644 drivers/firmware/efi/libstub/hidden.h
 create mode 100644 include/linux/hidden.h

             reply	other threads:[~2020-10-12 15:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 15:34 Ingo Molnar [this message]
2020-10-12 21:25 ` [GIT PULL] core/build changes for v5.10: Add orphan section checking for x86, ARM and ARM64 pr-tracker-bot

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=20201012153430.GA3491427@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will@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