Commit 84bc1993 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull arm64 fixes from Will Deacon:
 "Unfortunately, we still have a number of outstanding issues so there
  will be more fixes to come, but this lot are a good start.

   - Fix handling of watchpoints triggered by uaccess routines

   - Fix initialisation of gigantic pages for CMA buffers

   - Raise minimum clang version for BTI to avoid miscompilation

   - Fix data race in SVE vector length configuration code

   - Ensure address tags are ignored in kern_addr_valid()

   - Dump register state on fatal BTI exception

   - kexec_file() cleanup to use struct_size() macro"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints
  arm64: kexec_file: Use struct_size() in kmalloc()
  arm64: mm: reserve hugetlb CMA after numa_init
  arm64: bti: Require clang >= 10.0.1 for in-kernel BTI support
  arm64: sve: Fix build failure when ARM64_SVE=y and SYSCTL=n
  arm64: pgtable: Clear the GP bit for non-executable kernel pages
  arm64: mm: reset address tag set by kasan sw tagging
  arm64: traps: Dump registers prior to panic() in bad_mode()
  arm64/sve: Eliminate data races on sve_default_vl
  docs/arm64: Fix typo'd #define in sve.rst
  arm64: remove TEXT_OFFSET randomization
parents 98b76994 24ebec25
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ prctl(PR_SVE_SET_VL, unsigned long arg)

    flags:

	PR_SVE_SET_VL_INHERIT
	PR_SVE_VL_INHERIT

	    Inherit the current vector length across execve().  Otherwise, the
	    vector length is reset to the system default at execve().  (See
@@ -247,7 +247,7 @@ prctl(PR_SVE_GET_VL)

    The following flag may be OR-ed into the result:

	PR_SVE_SET_VL_INHERIT
	PR_SVE_VL_INHERIT

	    Vector length will be inherited across execve().

@@ -393,7 +393,7 @@ The regset data starts with struct user_sve_header, containing:
* At every execve() call, the new vector length of the new process is set to
  the system default vector length, unless

    * PR_SVE_SET_VL_INHERIT (or equivalently SVE_PT_VL_INHERIT) is set for the
    * PR_SVE_VL_INHERIT (or equivalently SVE_PT_VL_INHERIT) is set for the
      calling thread, or

    * a deferred vector length change is pending, established via the
+2 −0
Original line number Diff line number Diff line
@@ -1630,6 +1630,8 @@ config ARM64_BTI_KERNEL
	depends on CC_HAS_BRANCH_PROT_PAC_RET_BTI
	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697
	depends on !CC_IS_GCC || GCC_VERSION >= 100100
	# https://reviews.llvm.org/rGb8ae3fdfa579dbf366b1bb1cbfdbf8c51db7fa55
	depends on !CC_IS_CLANG || CLANG_VERSION >= 100001
	depends on !(CC_IS_CLANG && GCOV_KERNEL)
	depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS)
	help
+0 −15
Original line number Diff line number Diff line
@@ -8,21 +8,6 @@ config PID_IN_CONTEXTIDR
	  instructions during context switch. Say Y here only if you are
	  planning to use hardware trace tools with this kernel.

config ARM64_RANDOMIZE_TEXT_OFFSET
	bool "Randomize TEXT_OFFSET at build time"
	help
	  Say Y here if you want the image load offset (AKA TEXT_OFFSET)
	  of the kernel to be randomized at build-time. When selected,
	  this option will cause TEXT_OFFSET to be randomized upon any
	  build of the kernel, and the offset will be reflected in the
	  text_offset field of the resulting Image. This can be used to
	  fuzz-test bootloaders which respect text_offset.

	  This option is intended for bootloader and/or kernel testing
	  only. Bootloaders must make no assumptions regarding the value
	  of TEXT_OFFSET and platforms must not require a specific
	  value.

config DEBUG_EFI
	depends on EFI && DEBUG_INFO
	bool "UEFI debugging"
+0 −6
Original line number Diff line number Diff line
@@ -121,13 +121,7 @@ endif
head-y		:= arch/arm64/kernel/head.o

# The byte offset of the kernel image in RAM from the start of RAM.
ifeq ($(CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET), y)
TEXT_OFFSET := $(shell awk "BEGIN {srand(); printf \"0x%06x\n\", \
		 int(2 * 1024 * 1024 / (2 ^ $(CONFIG_ARM64_PAGE_SHIFT)) * \
		 rand()) * (2 ^ $(CONFIG_ARM64_PAGE_SHIFT))}")
else
TEXT_OFFSET := 0x0
endif

ifeq ($(CONFIG_KASAN_SW_TAGS), y)
KASAN_SHADOW_SCALE_SHIFT := 4
+1 −1
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd)
	__pgprot((pgprot_val(prot) & ~(mask)) | (bits))

#define pgprot_nx(prot) \
	__pgprot_modify(prot, 0, PTE_PXN)
	__pgprot_modify(prot, PTE_MAYBE_GP, PTE_PXN)

/*
 * Mark the prot value as uncacheable and unbufferable.
Loading