Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon: "The usual summary below, but the main fix is for the fast GUP lockless page-table walk when we have a combination of compile-time and run-time folding of the p4d and the pud respectively. - Remove some redundant Kconfig conditionals - Fix string output in ptrace selftest - Fix fast GUP crashes in some page-table configurations - Remove obsolete linker option when building the vDSO - Fix some sysreg field definitions for the GIC" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: Fix lockless walks with static and dynamic page-table folding arm64/sysreg: Correct the values for GICv4.1 arm64/vdso: Remove --hash-style=sysv kselftest: missing arg in ptrace.c arm64/Kconfig: Remove redundant 'if HAVE_FUNCTION_GRAPH_TRACER' arm64: remove redundant 'if HAVE_ARCH_KASAN' in Kconfig
This commit is contained in:
@ -168,9 +168,9 @@ config ARM64
|
|||||||
select HAVE_ARCH_JUMP_LABEL
|
select HAVE_ARCH_JUMP_LABEL
|
||||||
select HAVE_ARCH_JUMP_LABEL_RELATIVE
|
select HAVE_ARCH_JUMP_LABEL_RELATIVE
|
||||||
select HAVE_ARCH_KASAN
|
select HAVE_ARCH_KASAN
|
||||||
select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
|
select HAVE_ARCH_KASAN_VMALLOC
|
||||||
select HAVE_ARCH_KASAN_SW_TAGS if HAVE_ARCH_KASAN
|
select HAVE_ARCH_KASAN_SW_TAGS
|
||||||
select HAVE_ARCH_KASAN_HW_TAGS if (HAVE_ARCH_KASAN && ARM64_MTE)
|
select HAVE_ARCH_KASAN_HW_TAGS if ARM64_MTE
|
||||||
# Some instrumentation may be unsound, hence EXPERT
|
# Some instrumentation may be unsound, hence EXPERT
|
||||||
select HAVE_ARCH_KCSAN if EXPERT
|
select HAVE_ARCH_KCSAN if EXPERT
|
||||||
select HAVE_ARCH_KFENCE
|
select HAVE_ARCH_KFENCE
|
||||||
@ -211,8 +211,8 @@ config ARM64
|
|||||||
select HAVE_FTRACE_MCOUNT_RECORD
|
select HAVE_FTRACE_MCOUNT_RECORD
|
||||||
select HAVE_FUNCTION_TRACER
|
select HAVE_FUNCTION_TRACER
|
||||||
select HAVE_FUNCTION_ERROR_INJECTION
|
select HAVE_FUNCTION_ERROR_INJECTION
|
||||||
select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
|
|
||||||
select HAVE_FUNCTION_GRAPH_TRACER
|
select HAVE_FUNCTION_GRAPH_TRACER
|
||||||
|
select HAVE_FUNCTION_GRAPH_RETVAL
|
||||||
select HAVE_GCC_PLUGINS
|
select HAVE_GCC_PLUGINS
|
||||||
select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && \
|
select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && \
|
||||||
HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
|
HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
|
||||||
|
@ -1065,6 +1065,28 @@ static inline bool pgtable_l5_enabled(void) { return false; }
|
|||||||
|
|
||||||
#define p4d_offset_kimg(dir,addr) ((p4d_t *)dir)
|
#define p4d_offset_kimg(dir,addr) ((p4d_t *)dir)
|
||||||
|
|
||||||
|
static inline
|
||||||
|
p4d_t *p4d_offset_lockless_folded(pgd_t *pgdp, pgd_t pgd, unsigned long addr)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* With runtime folding of the pud, pud_offset_lockless() passes
|
||||||
|
* the 'pgd_t *' we return here to p4d_to_folded_pud(), which
|
||||||
|
* will offset the pointer assuming that it points into
|
||||||
|
* a page-table page. However, the fast GUP path passes us a
|
||||||
|
* pgd_t allocated on the stack and so we must use the original
|
||||||
|
* pointer in 'pgdp' to construct the p4d pointer instead of
|
||||||
|
* using the generic p4d_offset_lockless() implementation.
|
||||||
|
*
|
||||||
|
* Note: reusing the original pointer means that we may
|
||||||
|
* dereference the same (live) page-table entry multiple times.
|
||||||
|
* This is safe because it is still only loaded once in the
|
||||||
|
* context of each level and the CPU guarantees same-address
|
||||||
|
* read-after-read ordering.
|
||||||
|
*/
|
||||||
|
return p4d_offset(pgdp, addr);
|
||||||
|
}
|
||||||
|
#define p4d_offset_lockless p4d_offset_lockless_folded
|
||||||
|
|
||||||
#endif /* CONFIG_PGTABLE_LEVELS > 4 */
|
#endif /* CONFIG_PGTABLE_LEVELS > 4 */
|
||||||
|
|
||||||
#define pgd_ERROR(e) \
|
#define pgd_ERROR(e) \
|
||||||
|
@ -21,7 +21,7 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti
|
|||||||
# potential future proofing if we end up with internal calls to the exported
|
# potential future proofing if we end up with internal calls to the exported
|
||||||
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
|
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
|
||||||
# preparation in build-time C")).
|
# preparation in build-time C")).
|
||||||
ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv \
|
ldflags-y := -shared -soname=linux-vdso.so.1 \
|
||||||
-Bsymbolic --build-id=sha1 -n $(btildflags-y)
|
-Bsymbolic --build-id=sha1 -n $(btildflags-y)
|
||||||
|
|
||||||
ifdef CONFIG_LD_ORPHAN_WARN
|
ifdef CONFIG_LD_ORPHAN_WARN
|
||||||
|
@ -98,7 +98,7 @@ VDSO_AFLAGS += -D__ASSEMBLY__
|
|||||||
# From arm vDSO Makefile
|
# From arm vDSO Makefile
|
||||||
VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
|
VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
|
||||||
VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
|
VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
|
||||||
VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1
|
VDSO_LDFLAGS += -shared --build-id=sha1
|
||||||
VDSO_LDFLAGS += --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL)
|
VDSO_LDFLAGS += --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL)
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ Res0 63:32
|
|||||||
UnsignedEnum 31:28 GIC
|
UnsignedEnum 31:28 GIC
|
||||||
0b0000 NI
|
0b0000 NI
|
||||||
0b0001 GICv3
|
0b0001 GICv3
|
||||||
0b0010 GICv4p1
|
0b0011 GICv4p1
|
||||||
EndEnum
|
EndEnum
|
||||||
UnsignedEnum 27:24 Virt_frac
|
UnsignedEnum 27:24 Virt_frac
|
||||||
0b0000 NI
|
0b0000 NI
|
||||||
@ -903,7 +903,7 @@ EndEnum
|
|||||||
UnsignedEnum 27:24 GIC
|
UnsignedEnum 27:24 GIC
|
||||||
0b0000 NI
|
0b0000 NI
|
||||||
0b0001 IMP
|
0b0001 IMP
|
||||||
0b0010 V4P1
|
0b0011 V4P1
|
||||||
EndEnum
|
EndEnum
|
||||||
SignedEnum 23:20 AdvSIMD
|
SignedEnum 23:20 AdvSIMD
|
||||||
0b0000 IMP
|
0b0000 IMP
|
||||||
|
@ -156,7 +156,7 @@ static void test_hw_debug(pid_t child, int type, const char *type_name)
|
|||||||
/* Zero is not currently architecturally valid */
|
/* Zero is not currently architecturally valid */
|
||||||
ksft_test_result(arch, "%s_arch_set\n", type_name);
|
ksft_test_result(arch, "%s_arch_set\n", type_name);
|
||||||
} else {
|
} else {
|
||||||
ksft_test_result_skip("%s_arch_set\n");
|
ksft_test_result_skip("%s_arch_set\n", type_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user