]> Git Repo - linux.git/commitdiff
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
authorLinus Torvalds <[email protected]>
Thu, 9 Apr 2020 18:04:16 +0000 (11:04 -0700)
committerLinus Torvalds <[email protected]>
Thu, 9 Apr 2020 18:04:16 +0000 (11:04 -0700)
Pull arm64 fixes from Catalin Marinas:

 - Ensure that the compiler and linker versions are aligned so that ld
   doesn't complain about not understanding a .note.gnu.property section
   (emitted when pointer authentication is enabled).

 - Force -mbranch-protection=none when the feature is not enabled, in
   case a compiler may choose a different default value.

 - Remove CONFIG_DEBUG_ALIGN_RODATA. It was never in defconfig and
   rarely enabled.

 - Fix checking 16-bit Thumb-2 instructions checking mask in the
   emulation of the SETEND instruction (it could match the bottom half
   of a 32-bit Thumb-2 instruction).

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: armv8_deprecated: Fix undef_hook mask for thumb setend
  arm64: remove CONFIG_DEBUG_ALIGN_RODATA feature
  arm64: Always force a branch protection mode when the compiler has one
  arm64: Kconfig: ptrauth: Add binutils version check to fix mismatch
  init/kconfig: Add LD_VERSION Kconfig

1  2 
arch/arm64/Kconfig
drivers/firmware/efi/libstub/arm64-stub.c
init/Kconfig

diff --combined arch/arm64/Kconfig
index 6e41c4b6260772753422f0fc186a0c32ddf8f960,9ba3287bb29dae4a346d6d287ffb4f41374b4488..40fb05d96c6072c9357cf69965ca006c0a5fdb27
@@@ -9,6 -9,7 +9,6 @@@ config ARM6
        select ACPI_MCFG if (ACPI && PCI)
        select ACPI_SPCR_TABLE if ACPI
        select ACPI_PPTT if ACPI
 -      select ARCH_CLOCKSOURCE_DATA
        select ARCH_HAS_DEBUG_VIRTUAL
        select ARCH_HAS_DEVMEM_IS_ALLOWED
        select ARCH_HAS_DMA_PREP_COHERENT
@@@ -1502,7 -1503,10 +1502,10 @@@ config ARM64_PTR_AUT
        default y
        depends on !KVM || ARM64_VHE
        depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC
-       depends on CC_IS_GCC || (CC_IS_CLANG && AS_HAS_CFI_NEGATE_RA_STATE)
+       # GCC 9.1 and later inserts a .note.gnu.property section note for PAC
+       # which is only understood by binutils starting with version 2.33.1.
+       depends on !CC_IS_GCC || GCC_VERSION < 90100 || LD_VERSION >= 233010000
+       depends on !CC_IS_CLANG || AS_HAS_CFI_NEGATE_RA_STATE
        depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS)
        help
          Pointer authentication (part of the ARMv8.3 Extensions) provides
index db0c1a9c1699a7b5ee6ca45ee8c4e1036e2ad3ad,2bba0c9c366458a1cfa76b193b335e0c53b52640..fc9f8ab533a7eb5cd50f69de47c4444245c2e86a
@@@ -6,11 -6,17 +6,11 @@@
   * Adapted from ARM version by Mark Salter <[email protected]>
   */
  
 -/*
 - * To prevent the compiler from emitting GOT-indirected (and thus absolute)
 - * references to the section markers, override their visibility as 'hidden'
 - */
 -#pragma GCC visibility push(hidden)
 -#include <asm/sections.h>
 -#pragma GCC visibility pop
  
  #include <linux/efi.h>
  #include <asm/efi.h>
  #include <asm/memory.h>
 +#include <asm/sections.h>
  #include <asm/sysreg.h>
  
  #include "efistub.h"
@@@ -43,6 -49,7 +43,6 @@@ efi_status_t handle_kernel_image(unsign
  {
        efi_status_t status;
        unsigned long kernel_size, kernel_memsize = 0;
 -      void *old_image_addr = (void *)*image_addr;
        unsigned long preferred_offset;
        u64 phys_seed = 0;
  
  
        if (IS_ENABLED(CONFIG_RANDOMIZE_BASE) && phys_seed != 0) {
                /*
-                * If CONFIG_DEBUG_ALIGN_RODATA is not set, produce a
-                * displacement in the interval [0, MIN_KIMG_ALIGN) that
-                * doesn't violate this kernel's de-facto alignment
+                * Produce a displacement in the interval [0, MIN_KIMG_ALIGN)
+                * that doesn't violate this kernel's de-facto alignment
                 * constraints.
                 */
                u32 mask = (MIN_KIMG_ALIGN - 1) & ~(EFI_KIMG_ALIGN - 1);
-               u32 offset = !IS_ENABLED(CONFIG_DEBUG_ALIGN_RODATA) ?
-                            (phys_seed >> 32) & mask : TEXT_OFFSET;
+               u32 offset = (phys_seed >> 32) & mask;
  
                /*
                 * With CONFIG_RANDOMIZE_TEXT_OFFSET=y, TEXT_OFFSET may not
                 * Mustang), we can still place the kernel at the address
                 * 'dram_base + TEXT_OFFSET'.
                 */
 +              *image_addr = (unsigned long)_text;
                if (*image_addr == preferred_offset)
                        return EFI_SUCCESS;
  
                }
                *image_addr = *reserve_addr + TEXT_OFFSET;
        }
 -      memcpy((void *)*image_addr, old_image_addr, kernel_size);
 +
 +      if (image->image_base != _text)
 +              pr_efi_err("FIRMWARE BUG: efi_loaded_image_t::image_base has bogus value\n");
 +
 +      memcpy((void *)*image_addr, _text, kernel_size);
  
        return EFI_SUCCESS;
  }
diff --combined init/Kconfig
index 574b7215aa6af37532c14aac1572c782cd76e0cc,68ddbcd974c7c3bdb567de0754558011247a0b0a..9e22ee8fbd75e2dbe2d80fa0952e0393e4ee01dd
@@@ -6,7 -6,8 +6,7 @@@ config DEFCONFIG_LIS
        default "/lib/modules/$(shell,uname -r)/.config"
        default "/etc/kernel-config"
        default "/boot/config-$(shell,uname -r)"
 -      default ARCH_DEFCONFIG
 -      default "arch/$(ARCH)/defconfig"
 +      default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)"
  
  config CC_IS_GCC
        def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
@@@ -16,6 -17,10 +16,10 @@@ config GCC_VERSIO
        default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC
        default 0
  
+ config LD_VERSION
+       int
+       default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh)
  config CC_IS_CLANG
        def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
  
@@@ -450,10 -455,6 +454,10 @@@ config HAVE_SCHED_AVG_IR
        depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
        depends on SMP
  
 +config SCHED_THERMAL_PRESSURE
 +      bool "Enable periodic averaging of thermal pressure"
 +      depends on SMP
 +
  config BSD_PROCESS_ACCT
        bool "BSD Process Accounting"
        depends on MULTIUSER
@@@ -770,7 -771,8 +774,7 @@@ config ARCH_WANT_BATCHED_UNMAP_TLB_FLUS
        bool
  
  config CC_HAS_INT128
 -      def_bool y
 -      depends on !$(cc-option,-D__SIZEOF_INT128__=0)
 +      def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
  
  #
  # For architectures that know their GCC __int128 support is sound
@@@ -872,7 -874,7 +876,7 @@@ config BLK_CGROU
        This option only enables generic Block IO controller infrastructure.
        One needs to also enable actual IO controlling logic/policy. For
        enabling proportional weight division of disk bandwidth in CFQ, set
 -      CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
 +      CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
        CONFIG_BLK_DEV_THROTTLING=y.
  
        See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
@@@ -1029,8 -1031,7 +1033,8 @@@ config CGROUP_PER
        help
          This option extends the perf per-cpu mode to restrict monitoring
          to threads which belong to the cgroup specified and run on the
 -        designated cpu.
 +        designated cpu.  Or this can be used to have cgroup ID in samples
 +        so that it can monitor performance events among cgroups.
  
          Say N if unsure.
  
@@@ -1229,12 -1230,13 +1233,12 @@@ endi
  
  config BOOT_CONFIG
        bool "Boot config support"
 -      depends on BLK_DEV_INITRD
 -      default y
 +      select BLK_DEV_INITRD
        help
          Extra boot config allows system admin to pass a config file as
          complemental extension of kernel cmdline when booting.
          The boot config file must be attached at the end of initramfs
 -        with checksum and size.
 +        with checksum, size and magic word.
          See <file:Documentation/admin-guide/bootconfig.rst> for details.
  
          If unsure, say Y.
@@@ -1538,6 -1540,7 +1542,6 @@@ config AI
  
  config IO_URING
        bool "Enable IO uring support" if EXPERT
 -      select ANON_INODES
        select IO_WQ
        default y
        help
@@@ -1555,11 -1558,6 +1559,11 @@@ config ADVISE_SYSCALL
          applications use these syscalls, you can disable this option to save
          space.
  
 +config HAVE_ARCH_USERFAULTFD_WP
 +      bool
 +      help
 +        Arch has userfaultfd write protection support
 +
  config MEMBARRIER
        bool "Enable membarrier() system call" if EXPERT
        default y
@@@ -1623,19 -1621,6 +1627,19 @@@ config KALLSYMS_BASE_RELATIV
  # end of the "standard kernel features (expert users)" menu
  
  # syscall, maps, verifier
 +
 +config BPF_LSM
 +      bool "LSM Instrumentation with BPF"
 +      depends on BPF_EVENTS
 +      depends on BPF_SYSCALL
 +      depends on SECURITY
 +      depends on BPF_JIT
 +      help
 +        Enables instrumentation of the security hooks with eBPF programs for
 +        implementing dynamic MAC and Audit Policies.
 +
 +        If you are unsure how to answer this question, answer N.
 +
  config BPF_SYSCALL
        bool "Enable bpf() system call"
        select BPF
@@@ -2228,19 -2213,6 +2232,19 @@@ config TRIM_UNUSED_KSYM
  
          If unsure, or if you need to build out-of-tree modules, say N.
  
 +config UNUSED_KSYMS_WHITELIST
 +      string "Whitelist of symbols to keep in ksymtab"
 +      depends on TRIM_UNUSED_KSYMS
 +      help
 +        By default, all unused exported symbols will be un-exported from the
 +        build when TRIM_UNUSED_KSYMS is selected.
 +
 +        UNUSED_KSYMS_WHITELIST allows to whitelist symbols that must be kept
 +        exported at all times, even in absence of in-tree users. The value to
 +        set here is the path to a text file containing the list of symbols,
 +        one per line. The path can be absolute, or relative to the kernel
 +        source tree.
 +
  endif # MODULES
  
  config MODULES_TREE_LOOKUP
This page took 0.088488 seconds and 4 git commands to generate.