Linux 4.9.139
Greg KH
maintainerI'm announcing the release of the 4.9.139 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
.gitignore | 1 Kbuild | 25 ---- Makefile | 27 +++- arch/arm/include/asm/assembler.h | 12 ++ arch/arm/include/asm/barrier.h | 32 +++++ arch/arm/include/asm/bugs.h | 6 - arch/arm/include/asm/cp15.h | 3 arch/arm/include/asm/cputype.h | 8 + arch/arm/include/asm/kvm_asm.h | 2 arch/arm/include/asm/kvm_host.h | 14 ++ arch/arm/include/asm/kvm_mmu.h | 23 +++ arch/arm/include/asm/proc-fns.h | 4 arch/arm/include/asm/system_misc.h | 15 ++ arch/arm/include/asm/thread_info.h | 4 arch/arm/include/asm/uaccess.h | 26 +++- arch/arm/kernel/Makefile | 1 arch/arm/kernel/bugs.c | 18 +++ arch/arm/kernel/entry-common.S | 18 +-- arch/arm/kernel/entry-header.S | 25 ++++ arch/arm/kernel/signal.c | 55 +++++---- arch/arm/kernel/smp.c | 4 arch/arm/kernel/suspend.c | 2 arch/arm/kernel/sys_oabi-compat.c | 8 - arch/arm/kvm/hyp/hyp-entry.S | 112 ++++++++++++++++++- arch/arm/lib/copy_from_user.S | 9 + arch/arm/mm/Kconfig | 23 +++ arch/arm/mm/Makefile | 2 arch/arm/mm/fault.c | 3 arch/arm/mm/proc-macros.S | 3 arch/arm/mm/proc-v7-2level.S | 6 - arch/arm/mm/proc-v7-bugs.c | 174 ++++++++++++++++++++++++++++++ arch/arm/mm/proc-v7.S | 154 +++++++++++++++++++++----- arch/arm/vfp/vfpmodule.c | 17 +- arch/arm64/crypto/sha1-ce-core.S | 6 - arch/arm64/crypto/sha1-ce-glue.c | 11 - arch/arm64/crypto/sha2-ce-core.S | 6 - arch/arm64/crypto/sha2-ce-glue.c | 13 -- arch/arm64/include/asm/efi.h | 3 arch/arm64/include/asm/uaccess.h | 4 arch/ia64/kernel/Makefile | 26 ---- arch/x86/Makefile | 39 +++++- arch/x86/boot/string.c | 9 + arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 7 - drivers/firmware/efi/libstub/Makefile | 26 ++-- drivers/firmware/efi/libstub/arm64-stub.c | 10 + drivers/net/ethernet/broadcom/tg3.c | 18 ++- drivers/net/usb/smsc95xx.c | 7 + drivers/xen/Makefile | 3 include/linux/kbuild.h | 6 - include/linux/module.h | 4 net/core/dev.c | 4 net/core/flow_dissector.c | 4 net/ipv4/inet_fragment.c | 28 ++-- net/ipv4/ip_tunnel_core.c | 2 net/ipv6/route.c | 7 - net/sctp/socket.c | 26 ---- scripts/Kbuild.include | 18 ++- scripts/Makefile.build | 8 + scripts/Makefile.extrawarn | 1 scripts/Makefile.host | 6 - scripts/Makefile.lib | 31 +++++ scripts/mod/Makefile | 28 ---- 62 files changed, 901 insertions(+), 296 deletions(-)
Ard Biesheuvel (5):
crypto: arm64/sha - avoid non-standard inline asm tricks efi/libstub/arm64: Use hidden attribute for struct screen_info reference efi/libstub/arm64: Force 'hidden' visibility for section markers efi/libstub: Preserve .debug sections after absolute relocation check efi/libstub/arm64: Set -fpie when building the EFI stub
Arnd Bergmann (2):
modules: mark __inittest/__exittest as __maybe_unused
Kbuild: use -fshort-wchar globally
Behan Webster (2):
kbuild: Add better clang cross build support
kbuild: use -Oz instead of -Os when using clang
David Ahern (1):
ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF
Eric Dumazet (2):
net-gro: reset skb->pkt_type in napi_reuse_skb()
inet: frags: better deal with smp races
Frieder Schrempf (1):
usbnet: smsc95xx: disable carrier check while suspending
Greg Kroah-Hartman (1):
Linux 4.9.139
Jeroen Hofstee (1):
kbuild: fix asm-offset generation to work with clang
Marc Zyngier (2):
ARM: KVM: invalidate BTB on guest exit for Cortex-A12/A17
ARM: KVM: invalidate icache on guest exit for Cortex-A15
Mark Charlebois (1):
kbuild, LLVMLinux: Add -Werror to cc-option to support clang
Mark Rutland (1):
arm64: uaccess: suppress spurious clang warning
Masahiro Yamada (2):
kbuild: consolidate redundant sed script ASM offset generation
kbuild: drop -Wno-unknown-warning-option from clang options
Matthias Kaehlcke (8):
kbuild: Consolidate header generation from ASM offset information x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
kbuild: Add __cc-option macro
x86/build: Use __cc-option for boot code compiler options x86/build: Specify stack alignment for clang
kbuild: clang: Disable 'address-of-packed-member' warning x86/build: Fix stack alignment for CLang
x86/build: Use cc-option to validate stack alignment parameter
Michael Davidson (3):
kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS crypto, x86: aesni - fix token pasting for clang x86/boot: #undef memcpy() et al in string.c
Russell King (22):
ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs
ARM: bugs: prepare processor bug infrastructure
ARM: bugs: hook processor bug checking into SMP and suspend paths
ARM: bugs: add support for per-processor bug checking
ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre
ARM: spectre-v2: harden branch predictor on context switches
ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
ARM: spectre-v2: harden user aborts in kernel space
ARM: spectre-v2: add firmware based hardening
ARM: spectre-v2: warn about incorrect context switching functions
ARM: spectre-v2: KVM: invalidate icache on guest exit for Brahma B15
ARM: KVM: Add SMCCC_ARCH_WORKAROUND_1 fast handling
ARM: KVM: report support for SMCCC_ARCH_WORKAROUND_1
ARM: spectre-v1: add speculation barrier (csdb) macros
ARM: spectre-v1: add array_index_mask_nospec() implementation
ARM: spectre-v1: fix syscall entry
ARM: signal: copy registers using __copy_from_user()
ARM: vfp: use __copy_from_user() when restoring VFP state
ARM: oabi-compat: copy semops using __copy_from_user()
ARM: use __inttype() in get_user()
ARM: spectre-v1: use get_user() for __get_user()
ARM: spectre-v1: mitigate user accesses
Sabrina Dubroca (1):
ip_tunnel: don't force DF when MTU is locked
Siva Reddy Kallam (1):
tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths
Vinícius Tinti (1):
kbuild: Add support to generate LLVM assembly files
Xin Long (1):
sctp: not allow to set asoc prsctp_enable by sockopt
배석진 (1):
flow_dissector: do not dissect l4 ports for fragments
Greg KH
maintainer.gitignore +1 -0
@@ -33,6 +33,7 @@ *.lzo *.patch *.gcno +*.ll modules.builtin Module.symvers *.dwo
Kbuild +0 -25
@@ -7,31 +7,6 @@ # 4) Check for missing system calls # 5) Generate constants.py (may need bounds.h) -# Default sed regexp - multiline due to syntax constraints -define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" -endef - -# Use filechk to avoid rebuilds when a header changes, but the resulting file -# does not -define filechk_offsets - (set -e; \ - echo "#ifndef $2"; \ - echo "#define $2"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by Kbuild"; \ - echo " */"; \ - echo ""; \ - sed -ne $(sed-y); \ - echo ""; \ - echo "#endif" ) -endef - ##### # 1) Generate bounds.h
Makefile +22 -5
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 138 +SUBLEVEL = 139 EXTRAVERSION = NAME = Roaring Lionus
@@ -303,7 +303,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ HOSTCC = gcc HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 +HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 HOSTCXXFLAGS = -O2 ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
@@ -394,7 +394,7 @@ LINUXINCLUDE += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE)) KBUILD_AFLAGS := -D__ASSEMBLY__ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ + -fno-strict-aliasing -fno-common -fshort-wchar \ -Werror-implicit-function-declaration \ -Wno-format-security \ -std=gnu89
@@ -644,7 +644,8 @@ KBUILD_CFLAGS += $(call cc-option,-fdata-sections,) endif ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) +KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) +KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) else ifdef CONFIG_PROFILE_ALL_BRANCHES KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
@@ -704,11 +705,20 @@ endif KBUILD_CFLAGS += $(stackp-flag) ifeq ($(cc-name),clang) +ifneq ($(CROSS_COMPILE),) +CLANG_TARGET := -target $(notdir $(CROSS_COMPILE:%-=%)) +GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) +endif +ifneq ($(GCC_TOOLCHAIN),) +CLANG_GCC_TC := -gcc-toolchain $(GCC_TOOLCHAIN) +endif +KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) +KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) -KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,) KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) KBUILD_CFLAGS += $(call cc-disable-warning, gnu) +KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) # Quiet clang warning: comparison of unsigned expression < 0 is always false KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
@@ -716,6 +726,8 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) # See modpost pattern 2 KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) +KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) +KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) else # These warnings generated too much noise in a regular build.
@@ -1379,6 +1391,8 @@ help: @echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)' @echo ' dir/ - Build all files in dir and below' @echo ' dir/file.[ois] - Build specified target only' + @echo ' dir/file.ll - Build the LLVM assembly file' + @echo ' (requires compiler support for LLVM assembly generation)' @echo ' dir/file.lst - Build specified mixed source/assembly target only' @echo ' (requires a recent binutils and recent build (System.map))' @echo ' dir/file.ko - Build module including final link'
@@ -1563,6 +1577,7 @@ clean: $(clean-dirs) -o -name '*.symtypes' -o -name 'modules.order' \ -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name '*.c.[012]*.*' \ + -o -name '*.ll' \ -o -name '*.gcno' \) -type f -print | xargs rm -f # Generate tags for editors
@@ -1666,6 +1681,8 @@ endif $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.symtypes: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) +%.ll: %.c prepare scripts FORCE + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) # Modules /: prepare scripts FORCE
arch/arm/include/asm/assembler.h +12 -0
@@ -445,11 +445,23 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) .size \name , . - \name .endm + .macro csdb +#ifdef CONFIG_THUMB2_KERNEL + .inst.w 0xf3af8014 +#else + .inst 0xe320f014 +#endif + .endm + .macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req#ifndef CONFIG_CPU_USE_DOMAINS adds \tmp, \addr, #\size - 1 sbcccs \tmp, \tmp, \limit bcs \bad +#ifdef CONFIG_CPU_SPECTRE + movcs \addr, #0 + csdb +#endif #endif .endm
arch/arm/include/asm/barrier.h +32 -0
@@ -16,6 +16,12 @@#define isb (option) __asm__ __volatile__ ("isb " #option : : : "memory")#define dsb (option) __asm__ __volatile__ ("dsb " #option : : : "memory")#define dmb (option) __asm__ __volatile__ ("dmb " #option : : : "memory") +#ifdef CONFIG_THUMB2_KERNEL +#define CSDB ".inst.w 0xf3af8014" +#else +#define CSDB ".inst 0xe320f014" +#endif +#define csdb () __asm__ __volatile__(CSDB : : : "memory")#elif defined(CONFIG_CPU_XSC3 ) || __LINUX_ARM_ARCH__ ==6 #define isb (x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ : : "r" (0) : "memory")
@@ -36,6 +42,13 @@#define dmb (x) __asm__ __volatile__ ("" : : : "memory")#endif +#ifndef CSDB +#define CSDB +#endif +#ifndef csdb +#define csdb () +#endif +#ifdef CONFIG_ARM_HEAVY_MB extern void (*soc_mb)(void );extern void arm_heavy_mb (void );
@@ -62,6 +75,25 @@ extern void arm_heavy_mb(void);#define __smp_rmb () __smp_mb()#define __smp_wmb () dmb(ishst) +#ifdef CONFIG_CPU_SPECTRE +static inline unsigned long array_index_mask_nospec (unsigned long idx, +unsigned long sz) +{ +unsigned long mask; + + asmvolatile ( +"cmp %1, %2\n" +" sbc %0, %1, %1\n" +CSDB + :"=r" (mask) + :"r" (idx),"Ir" (sz) + :"cc" ); + +return mask; +} +#define array_index_mask_nospec array_index_mask_nospec +#endif +#include <asm-generic/barrier.h> #endif /* !__ASSEMBLY__ */
arch/arm/include/asm/bugs.h +4 -2
@@ -10,12 +10,14 @@#ifndef __ASM_BUGS_H#define __ASM_BUGS_H -#ifdef CONFIG_MMU extern void check_writebuffer_bugs (void ); -#define check_bugs () check_writebuffer_bugs() +#ifdef CONFIG_MMU +extern void check_bugs (void ); +extern void check_other_bugs (void );#else #define check_bugs () do { } while (0) +#define check_other_bugs () do { } while (0)#endif #endif
arch/arm/include/asm/cp15.h +3 -0
@@ -64,6 +64,9 @@#define __write_sysreg (v, r, w, c, t) asm volatile(w " " c : : "r" ((t)(v)))#define write_sysreg (v, ...) __write_sysreg(v, __VA_ARGS__) +#define BPIALL __ACCESS_CP15(c7, 0, c5, 6) +#define ICIALLU __ACCESS_CP15(c7, 0, c5, 0) +extern unsigned long cr_alignment;/* defined in entry-armv.S */ static inline unsigned long get_cr (void )
arch/arm/include/asm/cputype.h +8 -0
@@ -76,8 +76,16 @@#define ARM_CPU_PART_CORTEX_A12 0x4100c0d0#define ARM_CPU_PART_CORTEX_A17 0x4100c0e0#define ARM_CPU_PART_CORTEX_A15 0x4100c0f0 +#define ARM_CPU_PART_CORTEX_A53 0x4100d030 +#define ARM_CPU_PART_CORTEX_A57 0x4100d070 +#define ARM_CPU_PART_CORTEX_A72 0x4100d080 +#define ARM_CPU_PART_CORTEX_A73 0x4100d090 +#define ARM_CPU_PART_CORTEX_A75 0x4100d0a0#define ARM_CPU_PART_MASK 0xff00fff0 +/* Broadcom cores */ +#define ARM_CPU_PART_BRAHMA_B15 0x420000f0 +/* DEC implemented cores */ #define ARM_CPU_PART_SA1100 0x4400a110
arch/arm/include/asm/kvm_asm.h +0 -2
@@ -61,8 +61,6 @@ struct kvm_vcpu;extern char __kvm_hyp_init[];extern char __kvm_hyp_init_end[]; -extern char __kvm_hyp_vector[]; -extern void __kvm_flush_vm_context (void );extern void __kvm_tlb_flush_vmid_ipa (struct kvm *kvm,phys_addr_t ipa);extern void __kvm_tlb_flush_vmid (struct kvm *kvm);
arch/arm/include/asm/kvm_host.h +12 -2
@@ -21,6 +21,7 @@#include <linux/types.h> #include <linux/kvm_types.h> +#include <asm/cputype.h> #include <asm/kvm.h> #include <asm/kvm_asm.h> #include <asm/kvm_mmio.h>
@@ -323,8 +324,17 @@ static inline int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu,static inline bool kvm_arm_harden_branch_predictor (void ) { -/* No way to detect it yet, pretend it is not there. */ -return false; +switch (read_cpuid_part ()) { +#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR +case ARM_CPU_PART_BRAHMA_B15 : +case ARM_CPU_PART_CORTEX_A12 : +case ARM_CPU_PART_CORTEX_A15 : +case ARM_CPU_PART_CORTEX_A17 : +return true; +#endif +default : +return false; + } }#define KVM_SSBD_UNKNOWN -1
arch/arm/include/asm/kvm_mmu.h +22 -1
@@ -248,7 +248,28 @@ static inline int kvm_read_guest_lock(struct kvm *kvm,static inline void *kvm_get_hyp_vector (void ) { -return kvm_ksym_ref (__kvm_hyp_vector); +switch (read_cpuid_part ()) { +#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR +case ARM_CPU_PART_CORTEX_A12 : +case ARM_CPU_PART_CORTEX_A17 : + { +extern char __kvm_hyp_vector_bp_inv[]; +return kvm_ksym_ref (__kvm_hyp_vector_bp_inv); + } + +case ARM_CPU_PART_BRAHMA_B15 : +case ARM_CPU_PART_CORTEX_A15 : + { +extern char __kvm_hyp_vector_ic_inv[]; +return kvm_ksym_ref (__kvm_hyp_vector_ic_inv); + } +#endif +default : + { +extern char __kvm_hyp_vector[]; +return kvm_ksym_ref (__kvm_hyp_vector); + } + } }static inline int kvm_map_vectors (void )
arch/arm/include/asm/proc-fns.h +4 -0
@@ -36,6 +36,10 @@ extern struct processor {* Set up any processor specifics */ void (*_proc_init)(void ); +/* +* Check for processor bugs +*/ +void (*check_bugs)(void );/* * Disable any processor specifics */
arch/arm/include/asm/system_misc.h +15 -0
@@ -7,6 +7,7 @@#include <linux/linkage.h> #include <linux/irqflags.h> #include <linux/reboot.h> +#include <linux/percpu.h> extern void cpu_init (void );
@@ -14,6 +15,20 @@ void soft_restart(unsigned long);extern void (*arm_pm_restart)(enum reboot_mode reboot_mode,const char *cmd);extern void (*arm_pm_idle)(void ); +#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR +typedef void (*harden_branch_predictor_fn_t )(void ); +DECLARE_PER_CPU (harden_branch_predictor_fn_t, harden_branch_predictor_fn); +static inline void harden_branch_predictor (void ) +{ +harden_branch_predictor_fn_t fn =per_cpu (harden_branch_predictor_fn, +smp_processor_id ()); +if (fn) +fn (); +} +#else +#define harden_branch_predictor () do { } while (0) +#endif +#define UDBG_UNDEFINED (1 << 0)#define UDBG_SYSCALL (1 << 1)#define UDBG_BADABORT (1 << 2)
arch/arm/include/asm/thread_info.h +2 -2
@@ -126,8 +126,8 @@ struct user_vfp_exc;extern int vfp_preserve_user_clear_hwstate (struct user_vfp __user *,struct user_vfp_exc __user *); -extern int vfp_restore_user_hwstate (struct user_vfp __user *, -struct user_vfp_exc __user *); +extern int vfp_restore_user_hwstate (struct user_vfp *, +struct user_vfp_exc *);#endif /*
arch/arm/include/asm/uaccess.h +19 -7
@@ -114,6 +114,13 @@ static inline void set_fs(mm_segment_t fs) : "cc"); \ flag; }) +/* +* This is a type: either unsigned long, if the argument fits into +* that type, or otherwise unsigned long long. +*/ +#define __inttype (x) \ + __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) +/* * Single-value transfer routines. They automatically use the right * size if we just have the right pointer type. Note that the functions
@@ -183,7 +190,7 @@ extern int __get_user_64t_4(void *); ({ \ unsigned long __limit = current_thread_info()->addr_limit - 1; \ register const typeof(*(p)) __user *__p asm("r0") = (p);\ - register typeof(x) __r2 asm("r2"); \ + register __inttype(x) __r2 asm("r2"); \ register unsigned long __l asm("r1") = __limit; \ register int __e asm("r0"); \ unsigned int __ua_flags = uaccess_save_and_enable(); \
@@ -273,6 +280,16 @@ static inline void set_fs(mm_segment_t fs)#define user_addr_max () \ (segment_eq(get_fs(), KERNEL_DS) ? ~0UL : get_fs()) +#ifdef CONFIG_CPU_SPECTRE +/* +* When mitigating Spectre variant 1, it is not worth fixing the non- +* verifying accessors, because we need to add verification of the +* address space there. Force these to use the standard get_user() +* version instead. +*/ +#define __get_user (x, ptr) get_user(x, ptr) +#else +/* * The "__xxx" versions of the user access functions do not verify the * address space - it must have been done previously with a separate
@@ -289,12 +306,6 @@ static inline void set_fs(mm_segment_t fs) __gu_err; \ }) -#define __get_user_error (x, ptr, err) \ -({ \ - __get_user_err((x), (ptr), err); \ - (void) 0; \ -}) -#define __get_user_err (x, ptr, err) \ do { \ unsigned long __gu_addr = (unsigned long)(ptr); \
@@ -354,6 +365,7 @@ do { \#define __get_user_asm_word (x, addr, err) \ __get_user_asm(x, addr, err, ldr) +#endif #define __put_user_switch (x, ptr, __err, __fn) \
arch/arm/kernel/Makefile +1 -0
@@ -30,6 +30,7 @@ else obj-y += entry-armv.o endif +obj-$(CONFIG_MMU) += bugs.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ISA_DMA_API) += dma.o obj-$(CONFIG_FIQ) += fiq.o fiqasm.o
arch/arm/kernel/bugs.c new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-Identifier: GPL-2.0 +#include <linux/init.h> +#include <asm/bugs.h> +#include <asm/proc-fns.h> + +void check_other_bugs (void ) +{ +#ifdef MULTI_CPU +if (processor.check_bugs) + processor.check_bugs (); +#endif +} + +void __init check_bugs (void ) +{ +check_writebuffer_bugs (); +check_other_bugs (); +}
arch/arm/kernel/entry-common.S +7 -11
@@ -223,9 +223,7 @@ local_restart: tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls? bne __sys_trace - cmp scno, #NR_syscalls @ check upper syscall limit - badr lr, ret_fast_syscall @ return address - ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine + invoke_syscall tbl, scno, r10, ret_fast_syscall add r1, sp, #S_OFF 2: cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
@@ -258,14 +256,8 @@ __sys_trace: mov r1, scno add r0, sp, #S_OFF bl syscall_trace_enter - - badr lr, __sys_trace_return @ return address - mov scno, r0 @ syscall number (possibly new) - add r1, sp, #S_R0 + S_OFF @ pointer to regs - cmp scno, #NR_syscalls @ check upper syscall limit - ldmccia r1, {r0 - r6} @ have to reload r0 - r6 - stmccia sp, {r4, r5} @ and update the stack args - ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine + mov scno, r0 + invoke_syscall tbl, scno, r10, __sys_trace_return, reload=1 cmp scno, #-1 @ skip the syscall? bne 2b add sp, sp, #S_OFF @ restore stack
@@ -317,6 +309,10 @@ sys_syscall: bic scno, r0, #__NR_OABI_SYSCALL_BASE cmp scno, #__NR_syscall - __NR_SYSCALL_BASE cmpne scno, #NR_syscalls @ check range +#ifdef CONFIG_CPU_SPECTRE + movhs scno, #0 + csdb +#endif stmloia sp, {r5, r6} @ shuffle args movlo r0, r1 movlo r1, r2
arch/arm/kernel/entry-header.S +25 -0
@@ -377,6 +377,31 @@ #endif .endm + .macro invoke_syscall, table, nr, tmp, ret, reload=0 +#ifdef CONFIG_CPU_SPECTRE + mov \tmp, \nr + cmp \tmp, #NR_syscalls @ check upper syscall limit + movcs \tmp, #0 + csdb + badr lr, \ret @ return address + .if \reload + add r1, sp, #S_R0 + S_OFF @ pointer to regs + ldmccia r1, {r0 - r6} @ reload r0-r6 + stmccia sp, {r4, r5} @ update stack arguments + .endif + ldrcc pc, [\table, \tmp, lsl #2] @ call sys_* routine +#else + cmp \nr, #NR_syscalls @ check upper syscall limit + badr lr, \ret @ return address + .if \reload + add r1, sp, #S_R0 + S_OFF @ pointer to regs + ldmccia r1, {r0 - r6} @ reload r0-r6 + stmccia sp, {r4, r5} @ update stack arguments + .endif + ldrcc pc, [\table, \nr, lsl #2] @ call sys_* routine +#endif + .endm + /* * These are the registers used in the syscall handler, and allow us to * have in theory up to 7 arguments to a function - r0 to r6.
arch/arm/kernel/signal.c +29 -26
79 lines not on this page · raw message
arch/arm/kernel/smp.c +4 -0
@@ -29,6 +29,7 @@#include <linux/irq_work.h> #include <linux/atomic.h> +#include <asm/bugs.h> #include <asm/smp.h> #include <asm/cacheflush.h> #include <asm/cpu.h>
@@ -400,6 +401,9 @@ asmlinkage void secondary_start_kernel(void)* before we continue - which happens after __cpu_up returns. */ set_cpu_online (cpu, true); + +check_other_bugs (); +complete (&cpu_running);local_irq_enable ();
arch/arm/kernel/suspend.c +2 -0
@@ -1,6 +1,7 @@#include <linux/init.h> #include <linux/slab.h> +#include <asm/bugs.h> #include <asm/cacheflush.h> #include <asm/idmap.h> #include <asm/pgalloc.h>
@@ -34,6 +35,7 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))cpu_switch_mm (mm->pgd, mm);local_flush_bp_all ();local_flush_tlb_all (); +check_other_bugs (); }return ret;
arch/arm/kernel/sys_oabi-compat.c +5 -3
@@ -328,9 +328,11 @@ asmlinkage long sys_oabi_semtimedop(int semid,return -ENOMEM ; err =0 ;for (i =0 ; i < nsops; i++) { -__get_user_error (sops[i].sem_num, &tsops->sem_num, err); -__get_user_error (sops[i].sem_op, &tsops->sem_op, err); -__get_user_error (sops[i].sem_flg, &tsops->sem_flg, err); +struct oabi_sembuf osb; + err |=__copy_from_user (&osb, tsops,sizeof (osb)); + sops[i].sem_num = osb.sem_num; + sops[i].sem_op = osb.sem_op; + sops[i].sem_flg = osb.sem_flg; tsops++; }if (timeout) {
arch/arm/kvm/hyp/hyp-entry.S +109 -3
144 lines not on this page · raw message
arch/arm/lib/copy_from_user.S +9 -0
@@ -90,6 +90,15 @@ .text ENTRY(arm_copy_from_user) +#ifdef CONFIG_CPU_SPECTRE + get_thread_info r3 + ldr r3, [r3, #TI_ADDR_LIMIT] + adds ip, r1, r2 @ ip=addr+size + sub r3, r3, #1 @ addr_limit - 1 + cmpcc ip, r3 @ if (addr+size > addr_limit - 1) + movcs r1, #0 @ addr = NULL + csdb +#endif #include "copy_template.S"
arch/arm/mm/Kconfig +23 -0
@@ -396,6 +396,7 @@ config CPU_V7 select CPU_CP15_MPU if !MMU select CPU_HAS_ASID if MMU select CPU_PABRT_V7 + select CPU_SPECTRE if MMU select CPU_TLB_V7 if MMU # ARMv7M
@@ -800,6 +801,28 @@ config CPU_BPREDICT_DISABLE help Say Y here to disable branch prediction. If unsure, say N. +config CPU_SPECTRE + bool + +config HARDEN_BRANCH_PREDICTOR + bool "Harden the branch predictor against aliasing attacks" if EXPERT + depends on CPU_SPECTRE + default y + help + Speculation attacks against some high-performance processors rely + on being able to manipulate the branch predictor for a victim + context by executing aliasing branches in the attacker context. + Such attacks can be partially mitigated against by clearing + internal branch predictor state and limiting the prediction + logic in some situations. + + This config option will take CPU-specific actions to harden + the branch predictor against aliasing attacks and may rely on + specific instruction sequences or control bits being set by + the system firmware. + + If unsure, say Y. + config TLS_REG_EMUL bool select NEED_KUSER_HELPERS
arch/arm/mm/Makefile +1 -1
@@ -94,7 +94,7 @@ obj-$(CONFIG_CPU_MOHAWK) += proc-mohawk.o obj-$(CONFIG_CPU_FEROCEON) += proc-feroceon.o obj-$(CONFIG_CPU_V6) += proc-v6.o obj-$(CONFIG_CPU_V6K) += proc-v6.o -obj-$(CONFIG_CPU_V7) += proc-v7.o +obj-$(CONFIG_CPU_V7) += proc-v7.o proc-v7-bugs.o obj-$(CONFIG_CPU_V7M) += proc-v7m.o AFLAGS_proc-v6.o :=-Wa,-march=armv6
arch/arm/mm/fault.c +3 -0
@@ -163,6 +163,9 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr, {struct siginfo si; +if (addr >TASK_SIZE ) +harden_branch_predictor (); +#ifdef CONFIG_DEBUG_USER if (((user_debug &UDBG_SEGV ) && (sig ==SIGSEGV )) || ((user_debug &UDBG_BUS ) && (sig ==SIGBUS ))) {
arch/arm/mm/proc-macros.S +2 -1
@@ -274,13 +274,14 @@ mcr p15, 0, ip, c7, c10, 4 @ data write barrier .endm -.macro define_processor_functions name:req, dabort:req, pabort:req, nommu=0, suspend=0 +.macro define_processor_functions name:req, dabort:req, pabort:req, nommu=0, suspend=0, bugs=0 .type \name\()_processor_functions, #object .align 2 ENTRY(\name\()_processor_functions) .word \dabort .word \pabort .word cpu_\name\()_proc_init + .word \bugs .word cpu_\name\()_proc_fin .word cpu_\name\()_reset .word cpu_\name\()_do_idle
arch/arm/mm/proc-v7-2level.S +0 -6
@@ -41,11 +41,6 @@ * even on Cortex-A8 revisions not affected by 430973. * If IBE is not set, the flush BTAC/BTB won't do anything. */ -ENTRY(cpu_ca8_switch_mm) -#ifdef CONFIG_MMU - mov r2, #0 - mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB -#endif ENTRY(cpu_v7_switch_mm) #ifdef CONFIG_MMU mmid r1, r1 @ get mm->context.id
@@ -66,7 +61,6 @@ ENTRY(cpu_v7_switch_mm) #endif bx lr ENDPROC(cpu_v7_switch_mm) -ENDPROC(cpu_ca8_switch_mm) /* * cpu_v7_set_pte_ext(ptep, pte)
arch/arm/mm/proc-v7-bugs.c new file +174 -0
174 lines not on this page · raw message
arch/arm/mm/proc-v7.S +122 -32
207 lines not on this page · raw message
arch/arm/vfp/vfpmodule.c +7 -10
@@ -597,13 +597,11 @@ int vfp_preserve_user_clear_hwstate(struct user_vfp __user *ufp, }/* Sanitise and restore the current VFP state from the provided structures. */ -int vfp_restore_user_hwstate (struct user_vfp __user *ufp, -struct user_vfp_exc __user *ufp_exc) +int vfp_restore_user_hwstate (struct user_vfp *ufp,struct user_vfp_exc *ufp_exc) {struct thread_info *thread =current_thread_info ();struct vfp_hard_struct *hwstate = &thread->vfpstate.hard;unsigned long fpexc; -int err =0 ;/* Disable VFP to avoid corrupting the new thread state. */ vfp_flush_hwstate (thread);
@@ -612,17 +610,16 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp,* Copy the floating point registers. There can be unused * registers see asm/hwcap.h for details. */ - err |=__copy_from_user (&hwstate->fpregs, &ufp->fpregs, -sizeof (hwstate->fpregs)); +memcpy (&hwstate->fpregs, &ufp->fpregs,sizeof (hwstate->fpregs));/* * Copy the status and control register. */ -__get_user_error (hwstate->fpscr, &ufp->fpscr, err); + hwstate->fpscr = ufp->fpscr;/* * Sanitise and restore the exception registers. */ -__get_user_error (fpexc, &ufp_exc->fpexc, err); + fpexc = ufp_exc->fpexc;/* Ensure the VFP is enabled. */ fpexc |=FPEXC_EN ;
@@ -631,10 +628,10 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, fpexc &= ~(FPEXC_EX |FPEXC_FP2V ); hwstate->fpexc = fpexc; -__get_user_error (hwstate->fpinst, &ufp_exc->fpinst, err); -__get_user_error (hwstate->fpinst2, &ufp_exc->fpinst2, err); + hwstate->fpinst = ufp_exc->fpinst; + hwstate->fpinst2 = ufp_exc->fpinst2; -return err ? -EFAULT :0 ; +return 0 ; }/*
arch/arm64/crypto/sha1-ce-core.S +4 -2
@@ -82,7 +82,8 @@ ENTRY(sha1_ce_transform) ldr dgb, [x0, #16] /* load sha1_ce_state::finalize */ - ldr w4, [x0, #:lo12:sha1_ce_offsetof_finalize] + ldr_l w4, sha1_ce_offsetof_finalize, x4 + ldr w4, [x0, x4] /* load input */ 0: ld1 {v8.4s-v11.4s}, [x1], #64
@@ -132,7 +133,8 @@ CPU_LE( rev32 v11.16b, v11.16b ) * the padding is handled by the C code in that case. */ cbz x4, 3f - ldr x4, [x0, #:lo12:sha1_ce_offsetof_count] + ldr_l w4, sha1_ce_offsetof_count, x4 + ldr x4, [x0, x4] movi v9.2d, #0 mov x8, #0x80000000 movi v10.2d, #0
arch/arm64/crypto/sha1-ce-glue.c +3 -8
@@ -17,9 +17,6 @@#include <linux/crypto.h> #include <linux/module.h> -#define ASM_EXPORT (sym, val) \ - asm(".globl " #sym "; .set " #sym ", %0" :: "I"(val)); -MODULE_DESCRIPTION ("SHA1 secure hash using ARMv8 Crypto Extensions" );MODULE_AUTHOR ("Ard Biesheuvel <[email protected]>" );MODULE_LICENSE ("GPL v2" );
@@ -32,6 +29,9 @@ struct sha1_ce_state { asmlinkage void sha1_ce_transform(struct sha1_ce_state *sst, u8 const *src,int blocks); +const u32 sha1_ce_offsetof_count = offsetof(struct sha1_ce_state, sst.count); +const u32 sha1_ce_offsetof_finalize = offsetof(struct sha1_ce_state , finalize); +static int sha1_ce_update (struct shash_desc *desc,const u8 *data,unsigned int len) {
@@ -52,11 +52,6 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,struct sha1_ce_state *sctx =shash_desc_ctx (desc);bool finalize = !sctx->sst.count && !(len %SHA1_BLOCK_SIZE ); -ASM_EXPORT (sha1_ce_offsetof_count, - offsetof(struct sha1_ce_state, sst.count)); -ASM_EXPORT (sha1_ce_offsetof_finalize, - offsetof(struct sha1_ce_state , finalize)); -/* * Allow the asm code to perform the finalization if there is no * partial data and the input is a round multiple of the block size.
arch/arm64/crypto/sha2-ce-core.S +4 -2
@@ -88,7 +88,8 @@ ENTRY(sha2_ce_transform) ld1 {dgav.4s, dgbv.4s}, [x0] /* load sha256_ce_state::finalize */ - ldr w4, [x0, #:lo12:sha256_ce_offsetof_finalize] + ldr_l w4, sha256_ce_offsetof_finalize, x4 + ldr w4, [x0, x4] /* load input */ 0: ld1 {v16.4s-v19.4s}, [x1], #64
@@ -136,7 +137,8 @@ CPU_LE( rev32 v19.16b, v19.16b ) * the padding is handled by the C code in that case. */ cbz x4, 3f - ldr x4, [x0, #:lo12:sha256_ce_offsetof_count] + ldr_l w4, sha256_ce_offsetof_count, x4 + ldr x4, [x0, x4] movi v17.2d, #0 mov x8, #0x80000000 movi v18.2d, #0
arch/arm64/crypto/sha2-ce-glue.c +5 -8
@@ -17,9 +17,6 @@#include <linux/crypto.h> #include <linux/module.h> -#define ASM_EXPORT (sym, val) \ - asm(".globl " #sym "; .set " #sym ", %0" :: "I"(val)); -MODULE_DESCRIPTION ("SHA-224/SHA-256 secure hash using ARMv8 Crypto Extensions" );MODULE_AUTHOR ("Ard Biesheuvel <[email protected]>" );MODULE_LICENSE ("GPL v2" );
@@ -32,6 +29,11 @@ struct sha256_ce_state { asmlinkage void sha2_ce_transform(struct sha256_ce_state *sst, u8 const *src,int blocks); +const u32 sha256_ce_offsetof_count = offsetof(struct sha256_ce_state , + sst.count); +const u32 sha256_ce_offsetof_finalize = offsetof(struct sha256_ce_state , + finalize); +static int sha256_ce_update (struct shash_desc *desc,const u8 *data,unsigned int len) {
@@ -52,11 +54,6 @@ static int sha256_ce_finup(struct shash_desc *desc, const u8 *data,struct sha256_ce_state *sctx =shash_desc_ctx (desc);bool finalize = !sctx->sst.count && !(len %SHA256_BLOCK_SIZE ); -ASM_EXPORT (sha256_ce_offsetof_count, - offsetof(struct sha256_ce_state, sst.count)); -ASM_EXPORT (sha256_ce_offsetof_finalize, - offsetof(struct sha256_ce_state , finalize)); -/* * Allow the asm code to perform the finalization if there is no * partial data and the input is a round multiple of the block size.
arch/arm64/include/asm/efi.h +3 -0
@@ -54,6 +54,9 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md); #define alloc_screen_info(x...) &screen_info #define free_screen_info(x...) +/* redeclare as 'hidden' so the compiler will generate relative references */ +extern struct screen_info screen_info __attribute__((__visibility__("hidden"))); +static inline void efifb_setup_from_dmi (struct screen_info *si,const char *opt) { }
arch/arm64/include/asm/uaccess.h +2 -2
@@ -198,7 +198,7 @@ do { \ (err), ARM64_HAS_UAO); \break ; \case 8 : \ -__get_user_asm ("ldr" ,"ldtr" ,"%" , __gu_val, (ptr), \ +__get_user_asm ("ldr" ,"ldtr" ,"%x" , __gu_val, (ptr), \ (err),ARM64_HAS_UAO ); \break ; \default : \
@@ -272,7 +272,7 @@ do { \ (err), ARM64_HAS_UAO); \break ; \case 8 : \ -__put_user_asm ("str" ,"sttr" ,"%" , __pu_val, (ptr), \ +__put_user_asm ("str" ,"sttr" ,"%x" , __pu_val, (ptr), \ (err),ARM64_HAS_UAO ); \break ; \default : \
arch/ia64/kernel/Makefile +2 -24
@@ -50,32 +50,10 @@ CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31 # The gate DSO image is built using a special linker script. include $(src)/Makefile.gate -# Calculate NR_IRQ = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...) based on config -define sed-y - "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" -endef -quiet_cmd_nr_irqs = GEN $@ -define cmd_nr_irqs - (set -e; \ - echo "#ifndef __ASM_NR_IRQS_H__"; \ - echo "#define __ASM_NR_IRQS_H__"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by Kbuild"; \ - echo " *"; \ - echo " */"; \ - echo ""; \ - sed -ne $(sed-y) $<; \ - echo ""; \ - echo "#endif" ) > $@ -endef - # We use internal kbuild rules to avoid the "is up to date" message from make arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c $(Q)mkdir -p $(dir $@) $(call if_changed_dep,cc_s_c) -include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s - $(Q)mkdir -p $(dir $@) - $(call cmd,nr_irqs) +include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE + $(call filechk,offsets,__ASM_NR_IRQS_H__)
arch/x86/Makefile +29 -10
@@ -11,6 +11,16 @@ else KBUILD_DEFCONFIG := $(ARCH)_defconfig endif +# For gcc stack alignment is specified with -mpreferred-stack-boundary, +# clang has the option -mstack-alignment for that purpose. +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) + cc_stack_align4 := -mpreferred-stack-boundary=2 + cc_stack_align8 := -mpreferred-stack-boundary=3 +else ifneq ($(call cc-option, -mstack-alignment=16),) + cc_stack_align4 := -mstack-alignment=4 + cc_stack_align8 := -mstack-alignment=8 +endif + # How to compile the 16-bit code. Note we always compile for -march=i386; # that way we can complain to the user if the CPU is insufficient. #
@@ -24,10 +34,11 @@ REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -D__KERNEL__ \ -DDISABLE_BRANCH_PROFILING \ -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ - -mno-mmx -mno-sse \ - $(call cc-option, -ffreestanding) \ - $(call cc-option, -fno-stack-protector) \ - $(call cc-option, -mpreferred-stack-boundary=2) + -mno-mmx -mno-sse + +REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding) +REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector) +REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4)) export REALMODE_CFLAGS # BITS is used as extension for files which are available in a 32 bit
@@ -64,8 +75,10 @@ ifeq ($(CONFIG_X86_32),y) # with nonstandard options KBUILD_CFLAGS += -fno-pic - # prevent gcc from keeping the stack 16 byte aligned - KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) + # Align the stack to the register width instead of using the default + # alignment of 16 bytes. This reduces stack usage and the number of + # alignment instructions. + KBUILD_CFLAGS += $(call cc-option,$(cc_stack_align4)) # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use # a lot more stack due to the lack of sharing of stacklots:
@@ -88,17 +101,23 @@ else KBUILD_CFLAGS += -m64 # Align jump targets to 1 byte, not the default 16 bytes: - KBUILD_CFLAGS += -falign-jumps=1 + KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1) # Pack loops tightly as well: - KBUILD_CFLAGS += -falign-loops=1 + KBUILD_CFLAGS += $(call cc-option,-falign-loops=1) # Don't autogenerate traditional x87 instructions KBUILD_CFLAGS += $(call cc-option,-mno-80387) KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387) - # Use -mpreferred-stack-boundary=3 if supported. - KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) + # By default gcc and clang use a stack alignment of 16 bytes for x86. + # However the standard kernel entry on x86-64 leaves the stack on an + # 8-byte boundary. If the compiler isn't informed about the actual + # alignment it will generate extra alignment instructions for the + # default alignment which keep the stack *mis*aligned. + # Furthermore an alignment to the register width reduces stack usage + # and the number of alignment instructions. + KBUILD_CFLAGS += $(call cc-option,$(cc_stack_align8)) # Use -mskip-rax-setup if supported. KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
arch/x86/boot/string.c +9 -0
@@ -16,6 +16,15 @@#include "ctype.h" #include "string.h" +/* +* Undef these macros so that the functions that we provide +* here will have the correct names regardless of how string.h +* may have chosen to #define them. +*/ +#undef memcpy +#undef memset +#undef memcmp +int memcmp (const void *s1,const void *s2,size_t len) {bool diff;
arch/x86/crypto/aes_ctrby8_avx-x86_64.S +2 -5
@@ -65,7 +65,6 @@ #include <linux/linkage.h> #include <asm/inst.h> -#define CONCAT(a,b) a##b #define VMOVDQ vmovdqu #define xdata0 %xmm0
@@ -92,8 +91,6 @@ #define num_bytes %r8 #define tmp %r10 -#define DDQ(i) CONCAT(ddq_add_,i) -#define XMM(i) CONCAT(%xmm, i) #define DDQ_DATA 0 #define XDATA 1 #define KEY_128 1
@@ -131,12 +128,12 @@ ddq_add_8: /* generate a unique variable for ddq_add_x */ .macro setddq n - var_ddq_add = DDQ(\n) + var_ddq_add = ddq_add_\n .endm /* generate a unique variable for xmm register */ .macro setxdata n - var_xdata = XMM(\n) + var_xdata = %xmm\n .endm /* club the numeric 'id' to the symbol 'name' */
drivers/firmware/efi/libstub/Makefile +17 -9
@@ -10,8 +10,8 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) -g0 \ +cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie +cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ -fno-builtin -fpic -mno-single-pic-base cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt
@@ -60,7 +60,7 @@ CFLAGS_arm64-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET) extra-$(CONFIG_EFI_ARMSTUB) := $(lib-y) lib-$(CONFIG_EFI_ARMSTUB) := $(patsubst %.o,%.stub.o,$(lib-y)) -STUBCOPY_FLAGS-y := -R .debug* -R *ksymtab* -R *kcrctab* +STUBCOPY_RM-y := -R *ksymtab* -R *kcrctab* STUBCOPY_FLAGS-$(CONFIG_ARM64) += --prefix-alloc-sections=.init \ --prefix-symbols=__efistub_ STUBCOPY_RELOC-$(CONFIG_ARM64) := R_AARCH64_ABS
@@ -68,17 +68,25 @@ STUBCOPY_RELOC-$(CONFIG_ARM64) := R_AARCH64_ABS $(obj)/%.stub.o: $(obj)/%.o FORCE $(call if_changed,stubcopy) +# +# Strip debug sections and some other sections that may legally contain +# absolute relocations, so that we can inspect the remaining sections for +# such relocations. If none are found, regenerate the output object, but +# this time, use objcopy and leave all sections in place. +# quiet_cmd_stubcopy = STUBCPY $@ - cmd_stubcopy = if $(OBJCOPY) $(STUBCOPY_FLAGS-y) $< $@; then \ - $(OBJDUMP) -r $@ | grep $(STUBCOPY_RELOC-y) \ - && (echo >&2 "$@: absolute symbol references not allowed in the EFI stub"; \ - rm -f $@; /bin/false); else /bin/false; fi + cmd_stubcopy = if $(STRIP) --strip-debug $(STUBCOPY_RM-y) -o $@ $<; \ + then if $(OBJDUMP) -r $@ | grep $(STUBCOPY_RELOC-y); \ + then (echo >&2 "$@: absolute symbol references not allowed in the EFI stub"; \ + rm -f $@; /bin/false); \ + else $(OBJCOPY) $(STUBCOPY_FLAGS-y) $< $@; fi \ + else /bin/false; fi # # ARM discards the .data section because it disallows r/w data in the # decompressor. So move our .data to .data.efistub, which is preserved # explicitly by the decompressor linker script. # -STUBCOPY_FLAGS-$(CONFIG_ARM) += --rename-section .data=.data.efistub \ - -R ___ksymtab+sort -R ___kcrctab+sort +STUBCOPY_FLAGS-$(CONFIG_ARM) += --rename-section .data=.data.efistub +STUBCOPY_RM-$(CONFIG_ARM) += -R ___ksymtab+sort -R ___kcrctab+sort STUBCOPY_RELOC-$(CONFIG_ARM) := R_ARM_ABS
drivers/firmware/efi/libstub/arm64-stub.c +9 -1
@@ -9,9 +9,17 @@* published by the Free Software Foundation. * */ + +/* +* To prevent the compiler from emitting GOT-indirected (and thus absolute) +* references to the section markers, override their visibility as 'hidden' +*/ +#pragma GCC visibility push(hidden) +#include <asm/sections.h> +#pragma GCC visibility pop +#include <linux/efi.h> #include <asm/efi.h> -#include <asm/sections.h> #include <asm/sysreg.h> #include "efistub.h"
drivers/net/ethernet/broadcom/tg3.c +16 -2
@@ -12389,6 +12389,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e {struct tg3 *tp =netdev_priv (dev);int i, irq_sync =0 , err =0 ; +bool reset_phy = false; if ((ering->rx_pending > tp->rx_std_ring_mask) || (ering->rx_jumbo_pending > tp->rx_jmb_ring_mask) ||
@@ -12420,7 +12421,13 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *eif (netif_running (dev)) {tg3_halt (tp,RESET_KIND_SHUTDOWN ,1 ); - err =tg3_restart_hw (tp, false); +/* Reset PHY to avoid PHY lock up */ +if (tg3_asic_rev (tp) ==ASIC_REV_5717 || +tg3_asic_rev (tp) ==ASIC_REV_5719 || +tg3_asic_rev (tp) ==ASIC_REV_5720 ) + reset_phy = true; + + err =tg3_restart_hw (tp, reset_phy);if (!err)tg3_netif_start (tp); }
@@ -12454,6 +12461,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam {struct tg3 *tp =netdev_priv (dev);int err =0 ; +bool reset_phy = false;if (tp->link_config.autoneg ==AUTONEG_ENABLE )tg3_warn_mgmt_link_flap (tp);
@@ -12544,7 +12552,13 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparamif (netif_running (dev)) {tg3_halt (tp,RESET_KIND_SHUTDOWN ,1 ); - err =tg3_restart_hw (tp, false); +/* Reset PHY to avoid PHY lock up */ +if (tg3_asic_rev (tp) ==ASIC_REV_5717 || +tg3_asic_rev (tp) ==ASIC_REV_5719 || +tg3_asic_rev (tp) ==ASIC_REV_5720 ) + reset_phy = true; + + err =tg3_restart_hw (tp, reset_phy);if (!err)tg3_netif_start (tp); }
drivers/net/usb/smsc95xx.c +7 -0
@@ -1590,6 +1590,8 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)return ret; } +cancel_delayed_work_sync (&pdata->carrier_check); +if (pdata->suspend_flags) {netdev_warn (dev->net,"error during last resume\n" ); pdata->suspend_flags =0 ;
@@ -1832,6 +1834,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)*/ if (ret &&PMSG_IS_AUTO (message))usbnet_resume (intf); + +if (ret) +schedule_delayed_work (&pdata->carrier_check, +CARRIER_CHECK_DELAY ); +return ret; }
drivers/xen/Makefile +0 -3
@@ -7,9 +7,6 @@ obj-y += xenbus/ nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_features.o := $(nostackp) -CFLAGS_efi.o += -fshort-wchar -LDFLAGS += $(call ld-option, --no-wchar-size-warning) - dom0-$(CONFIG_ARM64) += arm-device.o dom0-$(CONFIG_PCI) += pci.o dom0-$(CONFIG_USB_SUPPORT) += dbgp.o
include/linux/kbuild.h +3 -3
@@ -2,14 +2,14 @@#define __LINUX_KBUILD_H#define DEFINE (sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) -#define BLANK () asm volatile("\n->" : : ) +#define BLANK () asm volatile("\n.ascii \"->\"" : : )#define OFFSET (sym, str, mem) \ DEFINE(sym, offsetof(struct str, mem))#define COMMENT (x) \ - asm volatile("\n->#" x) + asm volatile("\n.ascii \"->#" x "\"")#endif
include/linux/module.h +2 -2
@@ -127,13 +127,13 @@ extern void cleanup_module(void);/* Each module must use one module_init(). */ #define module_init (initfn) \ - static inline initcall_t __inittest(void) \ + static inline initcall_t __maybe_unused __inittest(void) \ { return initfn; } \ int init_module(void) __attribute__((alias(#initfn)));/* This is only required if you want to be unloadable. */ #define module_exit (exitfn) \ - static inline exitcall_t __exittest(void) \ + static inline exitcall_t __maybe_unused __exittest(void) \ { return exitfn; } \ void cleanup_module(void) __attribute__((alias(#exitfn)));
net/core/dev.c +4 -0
@@ -4756,6 +4756,10 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) skb->vlan_tci =0 ; skb->dev = napi->dev; skb->skb_iif =0 ; + +/* eth_type_trans() assumes pkt_type is PACKET_HOST */ + skb->pkt_type =PACKET_HOST ; + skb->encapsulation =0 ;skb_shinfo (skb)->gso_type =0 ; skb->truesize =SKB_TRUESIZE (skb_end_offset (skb));
net/core/flow_dissector.c +2 -2
@@ -538,8 +538,8 @@ bool __skb_flow_dissect(const struct sk_buff *skb,break ; } -if (dissector_uses_key (flow_dissector, -FLOW_DISSECTOR_KEY_PORTS )) { +if (dissector_uses_key (flow_dissector,FLOW_DISSECTOR_KEY_PORTS ) && + !(key_control->flags &FLOW_DIS_IS_FRAGMENT )) { key_ports =skb_flow_dissector_target (flow_dissector,FLOW_DISSECTOR_KEY_PORTS , target_container);
net/ipv4/inet_fragment.c +15 -13
@@ -180,21 +180,22 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf, }static struct inet_frag_queue *inet_frag_create (struct netns_frags *nf, -void *arg) +void *arg, +struct inet_frag_queue **prev) {struct inet_frags *f = nf->f;struct inet_frag_queue *q; -int err; q =inet_frag_alloc (nf, f, arg); -if (!q) +if (!q) { + *prev =ERR_PTR (-ENOMEM );return NULL ; - + }mod_timer (&q->timer, jiffies + nf->timeout); - err =rhashtable_insert_fast (&nf->rhashtable, &q->node, - f->rhash_params); -if (err <0 ) { + *prev =rhashtable_lookup_get_insert_key (&nf->rhashtable, &q->key, + &q->node, f->rhash_params); +if (*prev) { q->flags |=INET_FRAG_COMPLETE ;inet_frag_kill (q);inet_frag_destroy (q);
@@ -207,17 +208,18 @@ EXPORT_SYMBOL(inet_frag_create);/* TODO : call from rcu_read_lock() and no longer use refcount_inc_not_zero() */ struct inet_frag_queue *inet_frag_find (struct netns_frags *nf,void *key) { -struct inet_frag_queue *fq; +struct inet_frag_queue *fq =NULL , *prev;rcu_read_lock (); - fq =rhashtable_lookup (&nf->rhashtable, key, nf->f->rhash_params); -if (fq) { + prev =rhashtable_lookup (&nf->rhashtable, key, nf->f->rhash_params); +if (!prev) + fq =inet_frag_create (nf, key, &prev); +if (prev && !IS_ERR (prev)) { + fq = prev;if (!atomic_inc_not_zero (&fq->refcnt)) fq =NULL ; -rcu_read_unlock (); -return fq; }rcu_read_unlock (); -return inet_frag_create (nf, key); +return fq; }EXPORT_SYMBOL (inet_frag_find);
net/ipv4/ip_tunnel_core.c +1 -1
@@ -80,7 +80,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, iph->version =4 ; iph->ihl =sizeof (struct iphdr ) >>2 ; - iph->frag_off = df; + iph->frag_off =ip_mtu_locked (&rt->dst) ?0 : df; iph->protocol = proto; iph->tos = tos; iph->daddr = dst;
net/ipv6/route.c +5 -2
@@ -1439,10 +1439,13 @@ EXPORT_SYMBOL_GPL(ip6_update_pmtu);void ip6_sk_update_pmtu (struct sk_buff *skb,struct sock *sk,__be32 mtu) { +int oif = sk->sk_bound_dev_if;struct dst_entry *dst; -ip6_update_pmtu (skb,sock_net (sk), mtu, - sk->sk_bound_dev_if, sk->sk_mark); +if (!oif && skb->dev) + oif =l3mdev_master_ifindex (skb->dev); + +ip6_update_pmtu (skb,sock_net (sk), mtu, oif, sk->sk_mark); dst =__sk_dst_get (sk); if (!dst || !dst->obsolete ||
net/sctp/socket.c +5 -21
@@ -3732,32 +3732,16 @@ static int sctp_setsockopt_pr_supported(struct sock *sk, unsigned int optlen) {struct sctp_assoc_value params; -struct sctp_association *asoc; -int retval = -EINVAL ;if (optlen !=sizeof (params)) - goto out; - -if (copy_from_user (¶ms, optval, optlen)) { - retval = -EFAULT ; - goto out; - } - - asoc =sctp_id2assoc (sk, params.assoc_id); -if (asoc) { - asoc->prsctp_enable = !!params.assoc_value; - }else if (!params.assoc_id) { -struct sctp_sock *sp =sctp_sk (sk); +return -EINVAL ; - sp->ep->prsctp_enable = !!params.assoc_value; - }else { - goto out; - } +if (copy_from_user (¶ms, optval, optlen)) +return -EFAULT ; - retval =0 ; +sctp_sk (sk)->ep->prsctp_enable = !!params.assoc_value; -out: -return retval; +return 0 ; } static int sctp_setsockopt_default_prinfo(struct sock *sk,
scripts/Kbuild.include +14 -4
@@ -109,6 +109,11 @@ as-option = $(call try-run,\ as-instr = $(call try-run,\ printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) +# __cc-option +# Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586) +__cc-option = $(call try-run,\ + $(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4)) + # Do not attempt to build with gcc plugins during cc-option tests. # (And this uses delayed resolution so the flags will be up to date.) CC_OPTION_CFLAGS = $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS))
@@ -116,13 +121,18 @@ CC_OPTION_CFLAGS = $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS)) # cc-option # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) -cc-option = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) +cc-option = $(call __cc-option, $(CC),\ + $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS),$(1),$(2)) + +# hostcc-option +# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586) +hostcc-option = $(call __cc-option, $(HOSTCC),\ + $(HOSTCFLAGS) $(HOST_EXTRACFLAGS),$(1),$(2)) # cc-option-yn # Usage: flag := $(call cc-option-yn,-march=winchip-c6) cc-option-yn = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) # cc-option-align # Prefix align with either -falign or -malign
@@ -132,7 +142,7 @@ cc-option-align = $(subst -functions=0,,\ # cc-disable-warning # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) cc-disable-warning = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) # cc-name # Expands to either gcc or clang
scripts/Makefile.build +8 -0
@@ -176,6 +176,14 @@ cmd_cc_symtypes_c = \ $(obj)/%.symtypes : $(src)/%.c FORCE $(call cmd,cc_symtypes_c) +# LLVM assembly +# Generate .ll files from .c +quiet_cmd_cc_ll_c = CC $(quiet_modtag) $@ + cmd_cc_ll_c = $(CC) $(c_flags) -emit-llvm -S -o $@ $< + +$(obj)/%.ll: $(src)/%.c FORCE + $(call if_changed_dep,cc_ll_c) + # C (.c) files # The C file is compiled and updated dependency information is generated. # (See cmd_cc_o_c + relevant part of rule_cc_o_c)
scripts/Makefile.extrawarn +0 -1
@@ -64,7 +64,6 @@ ifeq ($(cc-name),clang) KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides) KBUILD_CFLAGS += $(call cc-disable-warning, unused-value) KBUILD_CFLAGS += $(call cc-disable-warning, format) -KBUILD_CFLAGS += $(call cc-disable-warning, unknown-warning-option) KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
scripts/Makefile.host +0 -6
@@ -20,12 +20,6 @@ # Will compile qconf as a C++ program, and menu as a C program. # They are linked as C++ code to the executable qconf -# hostcc-option -# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586) - -hostcc-option = $(call try-run,\ - $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) - __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) host-cshlib := $(sort $(hostlibs-y) $(hostlibs-m)) host-cxxshlib := $(sort $(hostcxxlibs-y) $(hostcxxlibs-m))
scripts/Makefile.lib +31 -0
@@ -408,3 +408,34 @@ quiet_cmd_xzmisc = XZMISC $@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ xz --check=crc32 --lzma2=dict=1MiB) > $@ || \ (rm -f $@ ; false) + +# ASM offsets +# --------------------------------------------------------------------------- + +# Default sed regexp - multiline due to syntax constraints +# +# Use [:space:] because LLVM's integrated assembler inserts <tab> around +# the .ascii directive whereas GCC keeps the <space> as-is. +define sed-offsets + 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \ + /^->/{s:->#\(.*\):/* \1 */:; \ + s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:->::; p;}' +endef + +# Use filechk to avoid rebuilds when a header changes, but the resulting file +# does not +define filechk_offsets + (set -e; \ + echo "#ifndef $2"; \ + echo "#define $2"; \ + echo "/*"; \ + echo " * DO NOT MODIFY."; \ + echo " *"; \ + echo " * This file was generated by Kbuild"; \ + echo " */"; \ + echo ""; \ + sed -ne $(sed-offsets); \ + echo ""; \ + echo "#endif" ) +endef
scripts/mod/Makefile +2 -26
@@ -7,32 +7,8 @@ modpost-objs := modpost.o file2alias.o sumversion.o devicetable-offsets-file := devicetable-offsets.h -define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" -endef - -quiet_cmd_offsets = GEN $@ -define cmd_offsets - (set -e; \ - echo "#ifndef __DEVICETABLE_OFFSETS_H__"; \ - echo "#define __DEVICETABLE_OFFSETS_H__"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by Kbuild"; \ - echo " *"; \ - echo " */"; \ - echo ""; \ - sed -ne $(sed-y) $<; \ - echo ""; \ - echo "#endif" ) > $@ -endef - -$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s - $(call if_changed,offsets) +$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE + $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__) targets += $(devicetable-offsets-file) devicetable-offsets.s
Am Freitag, 23. November 2018, 08:47:31 schrieb Greg KH:
Quoted 4 lines
I'm announcing the release of the 4.9.139 kernel.
All users of the 4.9 kernel series must upgrade.
Quoted 9 lines
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
linux-4.9.y and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summarythanks,
greg k-h
Just *in case* this was an oversight: STIBP is still active in 4.9.139.
Not that I would mind because for my modest Core i3 that I mainly use for office-work I don't see *any* difference in performance compared to 4.9.136 (no STIBP).
So long!
Rainer Fiebig
Quoted 166 lines
------------
.gitignore | 1 Kbuild | 25 ---- Makefile | 27 +++- arch/arm/include/asm/assembler.h | 12 ++ arch/arm/include/asm/barrier.h | 32 +++++ arch/arm/include/asm/bugs.h | 6 - arch/arm/include/asm/cp15.h | 3 arch/arm/include/asm/cputype.h | 8 + arch/arm/include/asm/kvm_asm.h | 2 arch/arm/include/asm/kvm_host.h | 14 ++ arch/arm/include/asm/kvm_mmu.h | 23 +++ arch/arm/include/asm/proc-fns.h | 4 arch/arm/include/asm/system_misc.h | 15 ++ arch/arm/include/asm/thread_info.h | 4 arch/arm/include/asm/uaccess.h | 26 +++- arch/arm/kernel/Makefile | 1 arch/arm/kernel/bugs.c | 18 +++ arch/arm/kernel/entry-common.S | 18 +-- arch/arm/kernel/entry-header.S | 25 ++++ arch/arm/kernel/signal.c | 55 +++++---- arch/arm/kernel/smp.c | 4 arch/arm/kernel/suspend.c | 2 arch/arm/kernel/sys_oabi-compat.c | 8 - arch/arm/kvm/hyp/hyp-entry.S | 112 ++++++++++++++++++- arch/arm/lib/copy_from_user.S | 9 + arch/arm/mm/Kconfig | 23 +++ arch/arm/mm/Makefile | 2 arch/arm/mm/fault.c | 3 arch/arm/mm/proc-macros.S | 3 arch/arm/mm/proc-v7-2level.S | 6 - arch/arm/mm/proc-v7-bugs.c | 174 ++++++++++++++++++++++++++++++ arch/arm/mm/proc-v7.S | 154 +++++++++++++++++++++----- arch/arm/vfp/vfpmodule.c | 17 +- arch/arm64/crypto/sha1-ce-core.S | 6 - arch/arm64/crypto/sha1-ce-glue.c | 11 - arch/arm64/crypto/sha2-ce-core.S | 6 - arch/arm64/crypto/sha2-ce-glue.c | 13 -- arch/arm64/include/asm/efi.h | 3 arch/arm64/include/asm/uaccess.h | 4 arch/ia64/kernel/Makefile | 26 ---- arch/x86/Makefile | 39 +++++- arch/x86/boot/string.c | 9 + arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 7 - drivers/firmware/efi/libstub/Makefile | 26 ++-- drivers/firmware/efi/libstub/arm64-stub.c | 10 + drivers/net/ethernet/broadcom/tg3.c | 18 ++- drivers/net/usb/smsc95xx.c | 7 + drivers/xen/Makefile | 3 include/linux/kbuild.h | 6 - include/linux/module.h | 4 net/core/dev.c | 4 net/core/flow_dissector.c | 4 net/ipv4/inet_fragment.c | 28 ++-- net/ipv4/ip_tunnel_core.c | 2 net/ipv6/route.c | 7 - net/sctp/socket.c | 26 ---- scripts/Kbuild.include | 18 ++- scripts/Makefile.build | 8 + scripts/Makefile.extrawarn | 1 scripts/Makefile.host | 6 - scripts/Makefile.lib | 31 +++++ scripts/mod/Makefile | 28 ---- 62 files changed, 901 insertions(+), 296 deletions(-)Ard Biesheuvel (5):
crypto: arm64/sha - avoid non-standard inline asm tricks efi/libstub/arm64: Use hidden attribute for structscreen_info
reference efi/libstub/arm64: Force 'hidden' visibility for section markers efi/libstub: Preserve .debug sections after absolute relocation check efi/libstub/arm64: Set -fpie when building the EFI stubArnd Bergmann (2):
modules: mark __inittest/__exittest as__maybe_unused
Kbuild: use -fshort-wchar globallyBehan Webster (2):
kbuild: Add better clang cross build support
kbuild: use -Oz instead of -Os when using clangDavid Ahern (1):
ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRFEric Dumazet (2):
net-gro: resetskb->pkt_typeinnapi_reuse_skb()
inet: frags: better deal with smp racesFrieder Schrempf (1):
usbnet: smsc95xx: disable carrier check while suspendingGreg Kroah-Hartman (1):
Linux 4.9.139Jeroen Hofstee (1):
kbuild: fix asm-offset generation to work with clangMarc Zyngier (2):
ARM: KVM: invalidate BTB on guest exit for Cortex-A12/A17
ARM: KVM: invalidate icache on guest exit for Cortex-A15Mark Charlebois (1):
kbuild, LLVMLinux: Add -Werror to cc-option to support clangMark Rutland (1):
arm64: uaccess: suppress spurious clang warningMasahiro Yamada (2):
kbuild: consolidate redundant sed script ASM offset generation
kbuild: drop -Wno-unkanown-warning-option from clang optionsMatthias Kaehlcke (8):
kbuild: Consolidate header generation from ASM offset information x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
kbuild: Add __cc-option macro
x86/build: Use __cc-option for boot code compiler options x86/build: Specify stack alignment for clang
kbuild: clang: Disable 'address-of-packed-member' warning x86/build: Fix stack alignment for CLang
x86/build: Use cc-option to validate stack alignment parameterMichael Davidson (3):
kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS crypto, x86: aesni - fix token pasting for clang x86/boot: #undefmemcpy()et al instring.cRussell King (22):
ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs
ARM: bugs: prepare processor bug infrastructure
ARM: bugs: hook processor bug checking into SMP and suspend paths
ARM: bugs: add support for per-processor bug checking
ARM: spectre: addKconfigsymbol for CPUs vulnerable to Spectre
ARM: spectre-v2: harden branch predictor on context switches
ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
ARM: spectre-v2: harden user aborts in kernel space
ARM: spectre-v2: add firmware based hardening
ARM: spectre-v2: warn about incorrect context switching functions
ARM: spectre-v2: KVM: invalidate icache on guest exit for Brahma B15
ARM: KVM: AddSMCCC_ARCH_WORKAROUND_1fast handling
ARM: KVM: report support forSMCCC_ARCH_WORKAROUND_1
ARM: spectre-v1: add speculation barrier (csdb) macros
ARM: spectre-v1: addarray_index_mask_nospec()implementation
ARM: spectre-v1: fix syscall entry
ARM: signal: copy registers using__copy_from_user()
ARM: vfp: use__copy_from_user()when restoring VFP state
ARM: oabi-compat: copy semops using__copy_from_user()
ARM: use__inttype()inget_user()
ARM: spectre-v1: useget_user()for__get_user()
ARM: spectre-v1: mitigate user accessesSabrina Dubroca (1):
ip_tunnel: don't force DF when MTU is lockedSiva Reddy Kallam (1):
tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control
pathsVinícius Tinti (1):
kbuild: Add support to generate LLVM assembly filesXin Long (1):
sctp: not allow to set asocprsctp_enableby sockopt배석진 (1):
flow_dissector: do not dissect l4 ports for fragments
Signature · 2 lines
The truth always turns out to be simpler than you thought. Richard Feynman
Greg KH
maintainerQuoted 14 lines · Rainer Fiebig
Am Freitag, 23. November 2018, 08:47:31 schrieb Greg KH:
Quoted 4 lines
I'm announcing the release of the 4.9.139 kernel.
All users of the 4.9 kernel series must upgrade.
Quoted 9 lines
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
linux-4.9.y and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summarythanks,
greg k-h
Quoted 7 lines
Just *in case* this was an oversight: STIBP is still active in 4.9.139.
Not that I would mind because for my modest Core i3 that I mainly use for office-work I don't see *any* difference in performance compared to 4.9.136 (no STIBP).
So long!
Wait, really? I thought I reverted the patch. Oh crap, I only did it for 4.14.y and 4.19.y, my fault :(
I'll go queue up the revert now, so sorry about that.
greg k-h