Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit af80150d authored by derfelot's avatar derfelot
Browse files

Merge Linux 4.4.245 kernel

Changes in 4.4.245: (16 commits)
        powerpc/64s: Define MASKABLE_RELON_EXCEPTION_PSERIES_OOL
        powerpc/64s: move some exception handlers out of line
        powerpc/64s: flush L1D on kernel entry
        powerpc: Add a framework for user access tracking
        powerpc: Implement user_access_begin and friends
        powerpc: Fix __clear_user() with KUAP enabled
        powerpc/uaccess: Evaluate macro arguments once, before user access is allowed
        powerpc/64s: flush L1D after user accesses
        i2c: imx: Fix external abort on interrupt in exit paths
        xfs: catch inode allocation state mismatch corruption
        xfs: validate cached inodes are free when allocated
        powerpc/8xx: Always fault when _PAGE_ACCESSED is not set
        Input: sunkbd - avoid use-after-free in teardown paths
        mac80211: always wind down STA state
        KVM: x86: clflushopt should be treated as a no-op by emulation
        Linux 4.4.245

Conflicts:
	arch/powerpc/include/asm/uaccess.h
parents 72cc920b 899c5873
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2247,6 +2247,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
					       spec_store_bypass_disable=off [X86]
					       mds=off [X86]
					       tsx_async_abort=off [X86]
					       no_entry_flush [PPC]
					       no_uaccess_flush [PPC]

			auto (default)
				Mitigate all CPU vulnerabilities, but leave SMT
@@ -2527,6 +2529,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.

	noefi		Disable EFI runtime services support.

	no_entry_flush	[PPC] Don't flush the L1-D cache when entering the kernel.

	noexec		[IA-64]

	noexec		[X86]
@@ -2588,6 +2592,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
	nospec_store_bypass_disable
			[HW] Disable all mitigations for the Speculative Store Bypass vulnerability

	no_uaccess_flush
			[PPC] Don't flush the L1-D cache after accessing user data.

	noxsave		[BUGS=X86] Disables x86 extended register state save
			and restore using xsave. The kernel will fallback to
			enabling legacy floating-point and sse state.
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 244
SUBLEVEL = 245
EXTRAVERSION =
NAME = Blurry Fish Butt

+23 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H
#define _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H
#include <linux/jump_label.h>

DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);

/* Prototype for function defined in exceptions-64s.S */
void do_uaccess_flush(void);

static __always_inline void allow_user_access(void __user *to, const void __user *from,
					      unsigned long size)
{
}

static inline void prevent_user_access(void __user *to, const void __user *from,
				       unsigned long size)
{
	if (static_branch_unlikely(&uaccess_flush_key))
		do_uaccess_flush();
}

#endif /* _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H */
+14 −1
Original line number Diff line number Diff line
@@ -65,11 +65,18 @@
	nop;								\
	nop

#define ENTRY_FLUSH_SLOT						\
	ENTRY_FLUSH_FIXUP_SECTION;					\
	nop;								\
	nop;								\
	nop;

/*
 * r10 must be free to use, r13 must be paca
 */
#define INTERRUPT_TO_KERNEL						\
	STF_ENTRY_BARRIER_SLOT
	STF_ENTRY_BARRIER_SLOT;						\
	ENTRY_FLUSH_SLOT

/*
 * Macros for annotating the expected destination of (h)rfid
@@ -597,6 +604,12 @@ label##_relon_hv: \
	EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_NOTEST_HV, vec);		\
	EXCEPTION_PROLOG_PSERIES_1(label##_common, EXC_HV);

#define MASKABLE_RELON_EXCEPTION_PSERIES_OOL(vec, label)               \
       .globl label##_relon_pSeries;                                   \
label##_relon_pSeries:                                                 \
       EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_NOTEST_PR, vec);          \
       EXCEPTION_PROLOG_PSERIES_1(label##_common, EXC_STD)

/*
 * Our exception common code can be passed various "additions"
 * to specify the behaviour of interrupts, whether to kick the
+19 −0
Original line number Diff line number Diff line
@@ -200,6 +200,22 @@ label##3: \
	FTR_ENTRY_OFFSET 955b-956b;			\
	.popsection;

#define UACCESS_FLUSH_FIXUP_SECTION			\
959:							\
	.pushsection __uaccess_flush_fixup,"a";		\
	.align 2;					\
960:							\
	FTR_ENTRY_OFFSET 959b-960b;			\
	.popsection;

#define ENTRY_FLUSH_FIXUP_SECTION			\
957:							\
	.pushsection __entry_flush_fixup,"a";		\
	.align 2;					\
958:							\
	FTR_ENTRY_OFFSET 957b-958b;			\
	.popsection;

#define RFI_FLUSH_FIXUP_SECTION				\
951:							\
	.pushsection __rfi_flush_fixup,"a";		\
@@ -231,8 +247,11 @@ label##3: \
#ifndef __ASSEMBLY__

extern long stf_barrier_fallback;
extern long entry_flush_fallback;
extern long __start___stf_entry_barrier_fixup, __stop___stf_entry_barrier_fixup;
extern long __start___stf_exit_barrier_fixup, __stop___stf_exit_barrier_fixup;
extern long __start___uaccess_flush_fixup, __stop___uaccess_flush_fixup;
extern long __start___entry_flush_fixup, __stop___entry_flush_fixup;
extern long __start___rfi_flush_fixup, __stop___rfi_flush_fixup;
extern long __start___barrier_nospec_fixup, __stop___barrier_nospec_fixup;
extern long __start__btb_flush_fixup, __stop__btb_flush_fixup;
Loading