Commit 57f13e3d authored by Will Deacon's avatar Will Deacon
Browse files

Merge branch 'for-next/fixes' into for-next/core

* for-next/fixes:
  arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE
  ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()
  arm64: uapi: Provide correct __BITS_PER_LONG for the compat vDSO
  kselftest/arm64: Don't open code SVE_PT_SIZE() in fp-ptrace
  arm64: mm: Fix CFI failure due to kpti_ng_pgd_alloc function signature
parents 8f5ae30d a7ed7b9d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,13 @@
#include <linux/refcount.h>
#include <asm/cpufeature.h>

enum pgtable_type {
	TABLE_PTE,
	TABLE_PMD,
	TABLE_PUD,
	TABLE_P4D,
};

typedef struct {
	atomic64_t	id;
#ifdef CONFIG_COMPAT
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ struct mod_arch_specific {

	/* for CONFIG_DYNAMIC_FTRACE */
	struct plt_entry	*ftrace_trampolines;
	struct plt_entry	*init_ftrace_trampolines;
};

u64 module_emit_plt_entry(struct module *mod, Elf64_Shdr *sechdrs,
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ SECTIONS {
	.plt 0 : { BYTE(0) }
	.init.plt 0 : { BYTE(0) }
	.text.ftrace_trampoline 0 : { BYTE(0) }
	.init.text.ftrace_trampoline 0 : { BYTE(0) }

#ifdef CONFIG_KASAN_SW_TAGS
	/*
+5 −0
Original line number Diff line number Diff line
@@ -17,7 +17,12 @@
#ifndef __ASM_BITSPERLONG_H
#define __ASM_BITSPERLONG_H

#if defined(__KERNEL__) && !defined(__aarch64__)
/* Used by the compat vDSO */
#define __BITS_PER_LONG 32
#else
#define __BITS_PER_LONG 64
#endif

#include <asm-generic/bitsperlong.h>

+3 −2
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@
#include <asm/hwcap.h>
#include <asm/insn.h>
#include <asm/kvm_host.h>
#include <asm/mmu.h>
#include <asm/mmu_context.h>
#include <asm/mte.h>
#include <asm/hypervisor.h>
@@ -1945,11 +1946,11 @@ static bool has_pmuv3(const struct arm64_cpu_capabilities *entry, int scope)
extern
void create_kpti_ng_temp_pgd(pgd_t *pgdir, phys_addr_t phys, unsigned long virt,
			     phys_addr_t size, pgprot_t prot,
			     phys_addr_t (*pgtable_alloc)(int), int flags);
			     phys_addr_t (*pgtable_alloc)(enum pgtable_type), int flags);

static phys_addr_t __initdata kpti_ng_temp_alloc;

static phys_addr_t __init kpti_ng_pgd_alloc(int shift)
static phys_addr_t __init kpti_ng_pgd_alloc(enum pgtable_type type)
{
	kpti_ng_temp_alloc -= PAGE_SIZE;
	return kpti_ng_temp_alloc;
Loading