Commit c2cdb13a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull arm64 fixes from Catalin Marinas:

 - Fix the arm64 __get_mem_asm() to use the _ASM_EXTABLE_##type##ACCESS()
   macro instead of the *_ERR() one in order to avoid writing -EFAULT to
   the value register in case of a fault

 - Initialise all elements of the acpi_early_node_map[] to NUMA_NO_NODE.
   Prior to this fix, only the first element was initialised

 - Move the KASAN random tag seed initialisation after the per-CPU areas
   have been initialised (prng_state is __percpu)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Fix KASAN random tag seed initialization
  arm64: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE
  arm64: uaccess: correct thinko in __get_mem_asm()
parents 216595b7 f75c2355
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ static inline void __user *__uaccess_mask_ptr(const void __user *ptr)
#define __get_mem_asm(load, reg, x, addr, label, type)			\
	asm_goto_output(						\
	"1:	" load "	" reg "0, [%1]\n"			\
	_ASM_EXTABLE_##type##ACCESS_ERR(1b, %l2, %w0)			\
	_ASM_EXTABLE_##type##ACCESS(1b, %l2)				\
	: "=r" (x)							\
	: "r" (addr) : : label)
#else
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@

#include <asm/numa.h>

static int acpi_early_node_map[NR_CPUS] __initdata = { NUMA_NO_NODE };
static int acpi_early_node_map[NR_CPUS] __initdata = { [0 ... NR_CPUS - 1] = NUMA_NO_NODE };

int __init acpi_numa_get_nid(unsigned int cpu)
{
+0 −3
Original line number Diff line number Diff line
@@ -355,9 +355,6 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p)
	smp_init_cpus();
	smp_build_mpidr_hash();

	/* Init percpu seeds for random tags after cpus are set up. */
	kasan_init_sw_tags();

#ifdef CONFIG_ARM64_SW_TTBR0_PAN
	/*
	 * Make sure init_thread_info.ttbr0 always generates translation
+2 −0
Original line number Diff line number Diff line
@@ -467,6 +467,8 @@ void __init smp_prepare_boot_cpu(void)
		init_gic_priority_masking();

	kasan_init_hw_tags();
	/* Init percpu seeds for random tags after cpus are set up. */
	kasan_init_sw_tags();
}

/*