Push to branch refs/heads/master: c50b74d886619bf0fe742a2c461530232a7dc60d --> 69847b97f21141c2d4f6e9c1b22d932b7add3182
Documentation/ABI/testing/sysfs-devices-system-cpu | 16 + Documentation/Makefile | 2 +- Documentation/arm64/tagged-pointers.txt | 62 +- Documentation/devicetree/bindings/clock/sunxi.txt | 2 + Documentation/devicetree/bindings/dma/snps-dma.txt | 2 +- .../devicetree/bindings/iio/adc/avia-hx711.txt | 18 + .../devicetree/bindings/pinctrl/pinctrl-palmas.txt | 9 + .../devicetree/bindings/vendor-prefixes.txt | 1 + Documentation/filesystems/ext4.txt | 2 +- Documentation/filesystems/proc.txt | 26 - Documentation/kernel-parameters.txt | 63 +- Documentation/mic/Makefile | 1 - Documentation/mic/mpssd/.gitignore | 1 - Documentation/mic/mpssd/Makefile | 21 - Documentation/mic/mpssd/micctrl | 173 -- Documentation/mic/mpssd/mpss | 200 --- Documentation/mic/mpssd/mpssd.c | 1826 -------------------- Documentation/mic/mpssd/mpssd.h | 103 -- Documentation/mic/mpssd/sysfs.c | 102 -- Documentation/networking/netlink_mmap.txt | 332 ---- Documentation/speculation.txt | 90 + Documentation/sysctl/fs.txt | 7 + Documentation/sysctl/kernel.txt | 15 +- Documentation/x86/pti.txt | 186 ++ Makefile | 35 +- arch/alpha/include/asm/mmu_context.h | 1 + arch/alpha/include/asm/types.h | 2 +- arch/alpha/include/uapi/asm/types.h | 12 +- arch/alpha/kernel/console.c | 1 + arch/alpha/kernel/osf_sys.c | 6 +- arch/alpha/kernel/pci_impl.h | 3 +- arch/alpha/kernel/process.c | 3 +- arch/arc/include/asm/cache.h | 2 + arch/arc/include/asm/entry-arcv2.h | 2 + arch/arc/include/asm/ptrace.h | 2 +- arch/arc/include/asm/uaccess.h | 5 +- arch/arc/kernel/entry.S | 6 + arch/arc/mm/cache.c | 13 +- arch/arc/mm/mmap.c | 2 +- arch/arc/mm/tlb.c | 3 - arch/arm/Kconfig-nommu | 3 +- arch/arm/boot/dts/am335x-evmsk.dts | 1 + arch/arm/boot/dts/am33xx.dtsi | 3 +- arch/arm/boot/dts/am4372.dtsi | 6 +- arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 + arch/arm/boot/dts/armada-375.dtsi | 4 +- arch/arm/boot/dts/armada-388-gp.dts | 4 +- arch/arm/boot/dts/armada-38x.dtsi | 4 +- arch/arm/boot/dts/armada-39x.dtsi | 4 +- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 2 + arch/arm/boot/dts/at91-sama5d3_xplained.dts | 5 +- arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 + arch/arm/boot/dts/at91sam9g25.dtsi | 2 +- arch/arm/boot/dts/bcm5301x.dtsi | 4 +- arch/arm/boot/dts/dm814x.dtsi | 9 +- arch/arm/boot/dts/dm816x.dtsi | 6 +- arch/arm/boot/dts/dra7-evm.dts | 2 + arch/arm/boot/dts/dra7.dtsi | 2 + arch/arm/boot/dts/exynos4412-trats2.dts | 2 +- arch/arm/boot/dts/imx53-qsrb.dts | 2 +- arch/arm/boot/dts/imx6dl.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 1 + arch/arm/boot/dts/kirkwood-openblocks_a7.dts | 10 +- arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | 2 +- arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 8 + arch/arm/boot/dts/ls1021a-qds.dts | 2 +- arch/arm/boot/dts/ls1021a-twr.dts | 2 +- arch/arm/boot/dts/ls1021a.dtsi | 2 +- arch/arm/boot/dts/moxart-uc7112lx.dts | 2 +- arch/arm/boot/dts/moxart.dtsi | 17 +- arch/arm/boot/dts/omap3-n900.dts | 2 + arch/arm/boot/dts/omap4.dtsi | 2 - arch/arm/boot/dts/pxa27x.dtsi | 1 + arch/arm/boot/dts/pxa3xx.dtsi | 1 + arch/arm/boot/dts/r8a7790.dtsi | 19 +- arch/arm/boot/dts/r8a7791-koelsch.dts | 2 +- arch/arm/boot/dts/r8a7791.dtsi | 7 +- arch/arm/boot/dts/s5pv210.dtsi | 1 + arch/arm/boot/dts/sama5d2.dtsi | 35 + arch/arm/boot/dts/sama5d4.dtsi | 2 +- arch/arm/boot/dts/spear1310-evb.dts | 2 +- arch/arm/boot/dts/spear1340.dtsi | 4 +- arch/arm/boot/dts/spear13xx.dtsi | 6 +- arch/arm/boot/dts/spear600.dtsi | 1 + arch/arm/boot/dts/stih407.dtsi | 3 +- arch/arm/boot/dts/stih410.dtsi | 3 +- arch/arm/boot/dts/tegra20-paz00.dts | 1 + arch/arm/configs/omap2plus_defconfig | 1 + arch/arm/configs/s3c2410_defconfig | 6 +- arch/arm/crypto/aesbs-glue.c | 6 +- arch/arm/include/asm/Kbuild | 1 - arch/arm/include/asm/assembler.h | 18 + arch/arm/include/asm/elf.h | 8 +- arch/arm/include/asm/ftrace.h | 18 + arch/arm/include/asm/kvm_arm.h | 4 +- arch/arm/include/asm/kvm_mmu.h | 9 +- arch/arm/include/asm/mmu_context.h | 2 + arch/arm/include/asm/unaligned.h | 27 + arch/arm/include/asm/xen/events.h | 2 +- arch/arm/kernel/Makefile | 1 - arch/arm/kernel/entry-header.S | 6 + arch/arm/kernel/ftrace.c | 11 +- arch/arm/kernel/pj4-cp0.c | 4 + arch/arm/kernel/traps.c | 28 +- arch/arm/kvm/handle_exit.c | 32 +- arch/arm/kvm/init.S | 5 +- arch/arm/kvm/mmio.c | 6 +- arch/arm/kvm/mmu.c | 53 +- arch/arm/kvm/psci.c | 8 +- arch/arm/lib/csumpartialcopyuser.S | 4 + arch/arm/lib/getuser.S | 2 +- arch/arm/mach-at91/pm.c | 20 +- arch/arm/mach-bcm/bcm_kona_smc.c | 2 +- arch/arm/mach-cns3xxx/core.c | 2 +- arch/arm/mach-davinci/devices-da8xx.c | 10 + arch/arm/mach-imx/cpu.c | 3 + arch/arm/mach-imx/mxc.h | 6 + arch/arm/mach-mvebu/Kconfig | 4 +- arch/arm/mach-omap1/dma.c | 16 +- arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- arch/arm/mach-omap2/gpmc-onenand.c | 10 +- arch/arm/mach-omap2/omap-headsmp.S | 3 +- arch/arm/mach-omap2/omap-secure.c | 21 + arch/arm/mach-omap2/omap-secure.h | 4 + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 25 +- arch/arm/mach-omap2/pdata-quirks.c | 1 - arch/arm/mach-omap2/pm.h | 4 - arch/arm/mach-omap2/pm34xx.c | 13 +- arch/arm/mach-omap2/prm33xx.c | 12 - arch/arm/mach-omap2/prm_common.c | 2 +- arch/arm/mach-omap2/sleep34xx.S | 26 +- arch/arm/mach-omap2/timer.c | 7 +- arch/arm/mach-omap2/vc.c | 2 +- arch/arm/mach-pxa/balloon3.c | 1 + arch/arm/mach-pxa/colibri-pxa270-income.c | 1 + arch/arm/mach-pxa/corgi.c | 1 + arch/arm/mach-pxa/devices.c | 4 +- arch/arm/mach-pxa/pxa25x.c | 2 +- arch/arm/mach-pxa/pxa27x.c | 2 +- arch/arm/mach-pxa/pxa3xx.c | 2 +- arch/arm/mach-pxa/tosa-bt.c | 4 + arch/arm/mach-pxa/trizeps4.c | 1 + arch/arm/mach-pxa/vpac270.c | 1 + arch/arm/mach-pxa/zeus.c | 1 + arch/arm/mach-pxa/zylonite.c | 1 + arch/arm/mach-spear/time.c | 2 +- arch/arm/mach-tegra/Kconfig | 2 - arch/arm/mm/dma-mapping.c | 20 +- arch/arm/mm/dump.c | 4 +- arch/arm/mm/fault.c | 5 +- arch/arm/mm/init.c | 4 +- arch/arm/mm/mmap.c | 4 +- arch/arm/mm/mmu.c | 8 +- arch/arm/plat-pxa/include/plat/dma.h | 2 +- arch/arm/probes/kprobes/core.c | 24 +- arch/arm/probes/kprobes/test-core.c | 11 +- arch/arm/xen/mm.c | 1 + arch/arm64/Kconfig | 3 +- arch/arm64/Kconfig.platforms | 2 - arch/arm64/boot/dts/broadcom/ns2.dtsi | 2 + arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 + arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 2 +- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 6 +- arch/arm64/include/asm/acpi.h | 6 +- arch/arm64/include/asm/asm-uaccess.h | 13 + arch/arm64/include/asm/barrier.h | 18 +- arch/arm64/include/asm/bug.h | 33 +- arch/arm64/include/asm/cmpxchg.h | 2 +- arch/arm64/include/asm/elf.h | 12 +- arch/arm64/include/asm/futex.h | 8 +- arch/arm64/include/asm/kvm_arm.h | 3 +- arch/arm64/include/asm/kvm_mmu.h | 3 +- arch/arm64/include/asm/memory.h | 6 +- arch/arm64/include/asm/uaccess.h | 11 +- arch/arm64/kernel/armv8_deprecated.c | 3 +- arch/arm64/kernel/entry.S | 6 +- arch/arm64/kernel/fpsimd.c | 2 + arch/arm64/kernel/head.S | 1 + arch/arm64/kernel/hw_breakpoint.c | 3 +- arch/arm64/kernel/process.c | 9 + arch/arm64/kernel/traps.c | 30 +- arch/arm64/kvm/handle_exit.c | 23 +- arch/arm64/kvm/sys_regs.c | 6 +- arch/arm64/mm/fault.c | 15 +- arch/arm64/mm/init.c | 2 +- arch/arm64/mm/mmu.c | 12 + arch/arm64/net/bpf_jit_comp.c | 8 +- arch/blackfin/Kconfig | 7 +- arch/blackfin/Kconfig.debug | 1 + arch/c6x/kernel/ptrace.c | 41 - arch/frv/include/asm/timex.h | 6 + arch/frv/mm/elf-fdpic.c | 2 +- arch/h8300/kernel/ptrace.c | 8 +- arch/ia64/kernel/module.c | 4 +- arch/metag/include/asm/uaccess.h | 64 +- arch/metag/kernel/ptrace.c | 19 +- arch/metag/lib/usercopy.c | 312 ++-- arch/mips/Kconfig | 3 +- arch/mips/ar7/platform.c | 5 + arch/mips/ar7/prom.c | 2 - arch/mips/ath25/board.c | 2 + arch/mips/ath79/common.c | 16 +- arch/mips/bcm47xx/buttons.c | 10 +- arch/mips/bcm47xx/leds.c | 2 +- arch/mips/cavium-octeon/octeon-irq.c | 2 + arch/mips/cavium-octeon/octeon-memcpy.S | 20 +- arch/mips/configs/ip22_defconfig | 4 +- arch/mips/configs/ip27_defconfig | 3 +- arch/mips/configs/lemote2f_defconfig | 2 +- arch/mips/configs/malta_defconfig | 4 +- arch/mips/configs/malta_kvm_defconfig | 4 +- arch/mips/configs/malta_kvm_guest_defconfig | 4 +- arch/mips/configs/maltaup_xpa_defconfig | 4 +- arch/mips/configs/nlm_xlp_defconfig | 2 +- arch/mips/configs/nlm_xlr_defconfig | 2 +- arch/mips/dec/int-handler.S | 40 +- arch/mips/include/asm/asm.h | 10 +- arch/mips/include/asm/branch.h | 5 +- arch/mips/include/asm/checksum.h | 2 + arch/mips/include/asm/irq.h | 27 + arch/mips/include/asm/kprobes.h | 3 +- arch/mips/include/asm/mips-cm.h | 4 +- arch/mips/include/asm/pgtable-32.h | 7 +- arch/mips/include/asm/spinlock.h | 8 +- arch/mips/include/asm/stackframe.h | 7 + arch/mips/include/asm/uaccess.h | 11 +- arch/mips/kernel/asm-offsets.c | 2 + arch/mips/kernel/branch.c | 42 +- arch/mips/kernel/crash.c | 16 +- arch/mips/kernel/elf.c | 2 +- arch/mips/kernel/entry.S | 3 + arch/mips/kernel/genex.S | 85 +- arch/mips/kernel/irq.c | 11 + arch/mips/kernel/kgdb.c | 48 +- arch/mips/kernel/mips-r2-to-r6-emul.c | 28 +- arch/mips/kernel/pm-cps.c | 9 +- arch/mips/kernel/proc.c | 2 +- arch/mips/kernel/process.c | 238 ++- arch/mips/kernel/ptrace.c | 165 +- arch/mips/kernel/scall32-o32.S | 2 +- arch/mips/kernel/scall64-64.S | 2 +- arch/mips/kernel/scall64-n32.S | 2 +- arch/mips/kernel/scall64-o32.S | 2 +- arch/mips/kernel/setup.c | 78 +- arch/mips/kernel/smp-bmips.c | 8 +- arch/mips/kernel/smp.c | 29 +- arch/mips/kernel/syscall.c | 15 +- arch/mips/kernel/traps.c | 2 + arch/mips/kernel/vmlinux.lds.S | 2 +- arch/mips/lantiq/xway/sysctrl.c | 14 +- arch/mips/lib/Makefile | 3 +- arch/mips/lib/libgcc.h | 17 + arch/mips/lib/memset.S | 11 +- arch/mips/lib/multi3.c | 54 + arch/mips/math-emu/cp1emu.c | 68 +- arch/mips/math-emu/dp_fmax.c | 84 +- arch/mips/math-emu/dp_fmin.c | 86 +- arch/mips/math-emu/sp_fmax.c | 84 +- arch/mips/math-emu/sp_fmin.c | 86 +- arch/mips/mm/mmap.c | 2 +- arch/mips/mm/pgtable-32.c | 6 +- arch/mips/mm/sc-ip22.c | 54 +- arch/mips/mm/tlbex.c | 25 +- arch/mips/mm/uasm-micromips.c | 2 +- arch/mips/net/bpf_jit.c | 16 +- arch/mips/net/bpf_jit_asm.S | 23 +- arch/mips/netlogic/common/irq.c | 4 +- arch/mips/netlogic/common/reset.S | 11 +- arch/mips/netlogic/common/smpboot.S | 4 +- arch/mips/ralink/mt7620.c | 88 +- arch/mips/ralink/prom.c | 9 +- arch/mips/ralink/reset.c | 7 - arch/mips/ralink/rt288x.c | 12 +- arch/mips/ralink/rt305x.c | 11 - arch/mips/ralink/rt3883.c | 16 +- arch/mips/sgi-ip22/Platform | 2 +- arch/mn10300/mm/misalignment.c | 2 +- arch/nios2/kernel/prom.c | 7 + arch/nios2/kernel/setup.c | 3 + arch/openrisc/include/asm/uaccess.h | 2 +- arch/openrisc/kernel/traps.c | 10 +- arch/openrisc/kernel/vmlinux.lds.S | 2 + arch/parisc/include/asm/dma-mapping.h | 11 +- arch/parisc/include/asm/ldcw.h | 2 + arch/parisc/include/asm/mmu_context.h | 15 +- arch/parisc/kernel/drivers.c | 4 + arch/parisc/kernel/entry.S | 13 +- arch/parisc/kernel/pacache.S | 9 +- arch/parisc/kernel/perf.c | 94 +- arch/parisc/kernel/sys_parisc.c | 15 +- arch/parisc/kernel/syscall.S | 61 +- arch/parisc/kernel/syscall_table.S | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/Kconfig | 8 +- arch/powerpc/boot/dts/fsl/kmcoge4.dts | 4 + arch/powerpc/boot/zImage.lds.S | 1 + arch/powerpc/include/asm/atomic.h | 4 +- arch/powerpc/include/asm/barrier.h | 3 +- arch/powerpc/include/asm/elf.h | 13 +- arch/powerpc/include/asm/exception-64e.h | 6 + arch/powerpc/include/asm/exception-64s.h | 55 +- arch/powerpc/include/asm/feature-fixups.h | 15 + arch/powerpc/include/asm/hvcall.h | 18 + arch/powerpc/include/asm/opal.h | 3 + arch/powerpc/include/asm/paca.h | 10 + arch/powerpc/include/asm/page.h | 12 + arch/powerpc/include/asm/plpar_wrappers.h | 14 + arch/powerpc/include/asm/ppc_asm.h | 12 + arch/powerpc/include/asm/reg.h | 2 +- arch/powerpc/include/asm/setup.h | 13 + arch/powerpc/include/asm/synch.h | 4 - arch/powerpc/kernel/align.c | 146 +- arch/powerpc/kernel/asm-offsets.c | 4 + arch/powerpc/kernel/eeh.c | 10 +- arch/powerpc/kernel/eeh_driver.c | 19 +- arch/powerpc/kernel/eeh_pe.c | 3 +- arch/powerpc/kernel/entry_64.S | 50 +- arch/powerpc/kernel/exceptions-64e.S | 12 + arch/powerpc/kernel/exceptions-64s.S | 126 +- arch/powerpc/kernel/hw_breakpoint.c | 4 +- arch/powerpc/kernel/kprobes.c | 11 + arch/powerpc/kernel/mce.c | 2 + arch/powerpc/kernel/misc_64.S | 32 +- arch/powerpc/kernel/module_64.c | 12 +- arch/powerpc/kernel/process.c | 5 +- arch/powerpc/kernel/setup_64.c | 148 ++ arch/powerpc/kernel/signal.c | 2 +- arch/powerpc/kernel/time.c | 14 +- arch/powerpc/kernel/traps.c | 4 +- arch/powerpc/kernel/vmlinux.lds.S | 9 + arch/powerpc/kvm/book3s_64_mmu_host.c | 5 +- arch/powerpc/kvm/book3s_64_vio.c | 46 +- arch/powerpc/kvm/book3s_hv.c | 60 + arch/powerpc/kvm/book3s_hv_rm_xics.c | 5 +- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 48 +- arch/powerpc/kvm/book3s_pr.c | 6 +- arch/powerpc/kvm/book3s_pr_papr.c | 34 +- arch/powerpc/kvm/book3s_rmhandlers.S | 7 +- arch/powerpc/kvm/book3s_segment.S | 4 +- arch/powerpc/kvm/emulate.c | 1 - arch/powerpc/lib/feature-fixups.c | 44 +- arch/powerpc/lib/sstep.c | 39 +- arch/powerpc/mm/fault.c | 2 +- arch/powerpc/mm/hash_native_64.c | 7 +- arch/powerpc/mm/slb_low.S | 10 + arch/powerpc/mm/slice.c | 2 +- arch/powerpc/perf/core-book3s.c | 12 +- arch/powerpc/perf/hv-24x7.c | 2 +- arch/powerpc/platforms/cell/spufs/coredump.c | 2 + arch/powerpc/platforms/powernv/opal-async.c | 6 +- arch/powerpc/platforms/powernv/opal-nvram.c | 11 +- arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +- arch/powerpc/platforms/powernv/pci-ioda.c | 3 + arch/powerpc/platforms/powernv/setup.c | 52 +- arch/powerpc/platforms/pseries/dlpar.c | 1 - arch/powerpc/platforms/pseries/hotplug-memory.c | 2 + arch/powerpc/platforms/pseries/mobility.c | 4 +- arch/powerpc/platforms/pseries/reconfig.c | 1 - arch/powerpc/platforms/pseries/setup.c | 37 +- arch/powerpc/sysdev/axonram.c | 5 +- arch/powerpc/sysdev/ipic.c | 4 +- arch/s390/Kconfig | 51 +- arch/s390/Makefile | 10 + arch/s390/boot/compressed/misc.c | 35 +- arch/s390/hypfs/inode.c | 2 +- arch/s390/include/asm/alternative.h | 149 ++ arch/s390/include/asm/barrier.h | 24 + arch/s390/include/asm/ctl_reg.h | 4 +- arch/s390/include/asm/elf.h | 15 +- arch/s390/include/asm/facility.h | 18 + arch/s390/include/asm/kvm_host.h | 3 +- arch/s390/include/asm/lowcore.h | 7 +- arch/s390/include/asm/nospec-branch.h | 17 + arch/s390/include/asm/pci_insn.h | 2 +- arch/s390/include/asm/pgtable.h | 2 + arch/s390/include/asm/processor.h | 7 +- arch/s390/include/asm/runtime_instr.h | 4 +- arch/s390/include/asm/switch_to.h | 21 +- arch/s390/include/asm/syscall.h | 6 + arch/s390/include/asm/thread_info.h | 4 + arch/s390/include/asm/uaccess.h | 2 +- arch/s390/include/uapi/asm/kvm.h | 3 + arch/s390/kernel/Makefile | 5 +- arch/s390/kernel/alternative.c | 112 ++ arch/s390/kernel/compat_linux.c | 9 +- arch/s390/kernel/crash_dump.c | 33 +- arch/s390/kernel/dis.c | 5 +- arch/s390/kernel/early.c | 9 +- arch/s390/kernel/entry.S | 290 +++- arch/s390/kernel/ipl.c | 2 + arch/s390/kernel/module.c | 65 +- arch/s390/kernel/nospec-branch.c | 169 ++ arch/s390/kernel/process.c | 3 +- arch/s390/kernel/processor.c | 18 + arch/s390/kernel/runtime_instr.c | 30 +- arch/s390/kernel/setup.c | 22 +- arch/s390/kernel/smp.c | 7 +- arch/s390/kernel/syscalls.S | 6 +- arch/s390/kernel/uprobes.c | 9 + arch/s390/kernel/vmlinux.lds.S | 45 +- arch/s390/kvm/kvm-s390.c | 19 +- arch/s390/mm/mmap.c | 4 +- arch/s390/mm/pgtable.c | 19 +- arch/s390/mm/vmem.c | 2 +- arch/s390/net/bpf_jit_comp.c | 3 +- arch/s390/pci/pci.c | 5 +- arch/s390/pci/pci_dma.c | 16 +- arch/s390/pci/pci_insn.c | 6 +- arch/sh/boards/mach-se/770x/setup.c | 10 +- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 1 - arch/sh/kernel/traps_32.c | 3 +- arch/sh/mm/mmap.c | 4 +- arch/sparc/Kconfig | 7 +- arch/sparc/include/asm/mmu_64.h | 2 +- arch/sparc/include/asm/mmu_context_64.h | 46 +- arch/sparc/include/asm/pgtable_32.h | 4 +- arch/sparc/include/asm/pgtable_64.h | 15 +- arch/sparc/include/asm/pil.h | 1 - arch/sparc/include/asm/setup.h | 7 +- arch/sparc/include/asm/trap_block.h | 1 + arch/sparc/include/asm/vio.h | 1 + arch/sparc/kernel/irq_64.c | 17 +- arch/sparc/kernel/kernel.h | 1 - arch/sparc/kernel/ldc.c | 7 +- arch/sparc/kernel/ptrace_64.c | 2 +- arch/sparc/kernel/smp_64.c | 222 +-- arch/sparc/kernel/sun4v_ivec.S | 15 + arch/sparc/kernel/sys_sparc_64.c | 4 +- arch/sparc/kernel/traps_64.c | 5 +- arch/sparc/kernel/tsb.S | 23 +- arch/sparc/kernel/ttable_64.S | 2 +- arch/sparc/kernel/vio.c | 68 +- arch/sparc/mm/hugetlbpage.c | 2 +- arch/sparc/mm/init_32.c | 2 +- arch/sparc/mm/init_64.c | 97 +- arch/sparc/mm/tsb.c | 7 +- arch/sparc/mm/ultra.S | 5 - arch/sparc/power/hibernate.c | 3 +- arch/tile/mm/hugetlbpage.c | 2 +- arch/um/Makefile | 2 +- arch/um/os-Linux/signal.c | 2 +- arch/x86/Kconfig | 28 +- arch/x86/Kconfig.debug | 1 + arch/x86/Makefile | 17 + arch/x86/boot/Makefile | 5 +- arch/x86/boot/boot.h | 2 +- arch/x86/boot/compressed/misc.c | 4 + arch/x86/boot/compressed/misc.h | 1 + arch/x86/boot/string.c | 1 + arch/x86/boot/string.h | 9 + arch/x86/crypto/aesni-intel_asm.S | 5 +- arch/x86/crypto/aesni-intel_glue.c | 2 +- arch/x86/crypto/camellia-aesni-avx-asm_64.S | 3 +- arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 3 +- arch/x86/crypto/cast5_avx_glue.c | 3 +- arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 3 +- arch/x86/crypto/ghash-clmulni-intel_glue.c | 26 + arch/x86/crypto/poly1305_glue.c | 1 - arch/x86/crypto/salsa20_glue.c | 7 - arch/x86/crypto/sha-mb/sha1_mb_mgr_flush_avx2.S | 12 +- arch/x86/crypto/sha1_avx2_x86_64_asm.S | 67 +- arch/x86/crypto/twofish-x86_64-asm_64-3way.S | 112 +- arch/x86/entry/common.c | 2 + arch/x86/entry/entry_32.S | 11 +- arch/x86/entry/entry_64.S | 200 ++- arch/x86/entry/entry_64_compat.S | 7 + arch/x86/entry/vdso/vclock_gettime.c | 99 +- arch/x86/entry/vdso/vdso-layout.lds.S | 3 +- arch/x86/entry/vdso/vdso2c.c | 3 + arch/x86/entry/vdso/vdso32-setup.c | 11 +- arch/x86/entry/vdso/vma.c | 14 + arch/x86/entry/vsyscall/vsyscall_64.c | 12 +- arch/x86/include/asm/alternative-asm.h | 4 +- arch/x86/include/asm/alternative.h | 14 +- arch/x86/include/asm/arch_hweight.h | 24 +- arch/x86/include/asm/asm-prototypes.h | 40 + arch/x86/include/asm/asm.h | 15 +- arch/x86/include/asm/barrier.h | 28 + arch/x86/include/asm/cmdline.h | 2 + arch/x86/include/asm/cpufeature.h | 12 + arch/x86/include/asm/desc.h | 2 +- arch/x86/include/asm/disabled-features.h | 4 +- arch/x86/include/asm/elf.h | 20 +- arch/x86/include/asm/hardirq.h | 6 +- arch/x86/include/asm/hw_irq.h | 2 +- arch/x86/include/asm/intel-family.h | 68 + arch/x86/include/asm/io.h | 4 +- arch/x86/include/asm/kaiser.h | 151 ++ arch/x86/include/asm/kvm_emulate.h | 5 +- arch/x86/include/asm/kvm_host.h | 3 +- arch/x86/include/asm/microcode_amd.h | 1 - arch/x86/include/asm/mmu.h | 6 - arch/x86/include/asm/mmu_context.h | 103 +- arch/x86/include/asm/msr-index.h | 5 + arch/x86/include/asm/msr.h | 3 +- arch/x86/include/asm/nospec-branch.h | 235 +++ arch/x86/include/asm/pat.h | 1 + arch/x86/include/asm/pgtable.h | 28 +- arch/x86/include/asm/pgtable_64.h | 25 +- arch/x86/include/asm/pgtable_types.h | 29 +- arch/x86/include/asm/pmem.h | 45 +- arch/x86/include/asm/processor.h | 10 +- arch/x86/include/asm/pvclock.h | 9 + arch/x86/include/asm/switch_to.h | 38 + arch/x86/include/asm/syscalls.h | 2 +- arch/x86/include/asm/thread_info.h | 11 - arch/x86/include/asm/tlbflush.h | 232 +-- arch/x86/include/asm/traps.h | 1 + arch/x86/include/asm/uaccess.h | 14 +- arch/x86/include/asm/vdso.h | 1 + arch/x86/include/asm/vmx.h | 6 +- arch/x86/include/asm/vsyscall.h | 3 + arch/x86/include/asm/xen/hypercall.h | 8 +- arch/x86/include/uapi/asm/msgbuf.h | 31 + arch/x86/include/uapi/asm/processor-flags.h | 3 +- arch/x86/include/uapi/asm/shmbuf.h | 42 + arch/x86/kernel/acpi/boot.c | 61 +- arch/x86/kernel/alternative.c | 21 +- arch/x86/kernel/apic/io_apic.c | 6 +- arch/x86/kernel/apic/vector.c | 19 +- arch/x86/kernel/cpu/Makefile | 4 +- arch/x86/kernel/cpu/amd.c | 28 +- arch/x86/kernel/cpu/bugs.c | 296 +++- arch/x86/kernel/cpu/bugs_64.c | 33 - arch/x86/kernel/cpu/common.c | 125 +- arch/x86/kernel/cpu/intel_cacheinfo.c | 2 + arch/x86/kernel/cpu/mcheck/mce-inject.c | 5 +- arch/x86/kernel/cpu/mcheck/mce.c | 27 +- arch/x86/kernel/cpu/mcheck/mce_amd.c | 5 +- arch/x86/kernel/cpu/microcode/amd.c | 21 +- arch/x86/kernel/cpu/microcode/core.c | 47 +- arch/x86/kernel/cpu/microcode/intel.c | 43 + arch/x86/kernel/cpu/mshyperv.c | 24 + arch/x86/kernel/cpu/perf_event.c | 16 +- arch/x86/kernel/cpu/perf_event_intel.c | 2 +- arch/x86/kernel/cpu/perf_event_intel_bts.c | 44 +- arch/x86/kernel/cpu/perf_event_intel_cstate.c | 2 + arch/x86/kernel/cpu/perf_event_intel_ds.c | 57 +- arch/x86/kernel/cpu/perf_event_intel_lbr.c | 11 +- arch/x86/kernel/cpu/perf_event_msr.c | 9 +- arch/x86/kernel/cpu/proc.c | 4 +- arch/x86/kernel/espfix_64.c | 10 + arch/x86/kernel/fpu/init.c | 1 + arch/x86/kernel/fpu/regset.c | 11 + arch/x86/kernel/fpu/signal.c | 4 +- arch/x86/kernel/ftrace.c | 12 + arch/x86/kernel/head64.c | 1 + arch/x86/kernel/head_32.S | 9 +- arch/x86/kernel/head_64.S | 35 +- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i386_ksyms_32.c | 2 + arch/x86/kernel/i8259.c | 1 + arch/x86/kernel/irq.c | 3 +- arch/x86/kernel/irq_32.c | 15 +- arch/x86/kernel/irqinit.c | 2 +- arch/x86/kernel/kprobes/common.h | 2 +- arch/x86/kernel/kprobes/core.c | 21 +- arch/x86/kernel/kprobes/ftrace.c | 23 +- arch/x86/kernel/kprobes/opt.c | 28 +- arch/x86/kernel/kvm.c | 6 +- arch/x86/kernel/kvmclock.c | 5 + arch/x86/kernel/ldt.c | 41 +- arch/x86/kernel/machine_kexec_64.c | 1 + arch/x86/kernel/mcount_64.S | 7 +- arch/x86/kernel/module.c | 14 + arch/x86/kernel/paravirt_patch_64.c | 2 - arch/x86/kernel/pci-calgary_64.c | 2 +- arch/x86/kernel/process.c | 2 +- arch/x86/kernel/reboot.c | 4 + arch/x86/kernel/setup.c | 14 + arch/x86/kernel/smpboot.c | 11 +- arch/x86/kernel/sys_x86_64.c | 4 +- arch/x86/kernel/tboot.c | 10 + arch/x86/kernel/tracepoint.c | 2 + arch/x86/kernel/traps.c | 26 +- arch/x86/kernel/tsc.c | 4 +- arch/x86/kernel/vm86_32.c | 5 +- arch/x86/kernel/vmlinux.lds.S | 7 + arch/x86/kernel/x8664_ksyms_64.c | 3 + arch/x86/kvm/Kconfig | 3 +- arch/x86/kvm/cpuid.c | 39 +- arch/x86/kvm/cpuid.h | 9 +- arch/x86/kvm/emulate.c | 65 +- arch/x86/kvm/ioapic.c | 20 +- arch/x86/kvm/mmu.c | 17 +- arch/x86/kvm/mmu.h | 1 + arch/x86/kvm/pmu_intel.c | 2 +- arch/x86/kvm/svm.c | 56 +- arch/x86/kvm/vmx.c | 339 ++-- arch/x86/kvm/x86.c | 182 +- arch/x86/lib/Makefile | 3 +- arch/x86/lib/checksum_32.S | 7 +- arch/x86/lib/cmdline.c | 105 ++ arch/x86/lib/copy_user_64.S | 7 +- arch/x86/lib/csum-copy_64.S | 12 +- arch/x86/lib/delay.c | 7 + arch/x86/lib/getuser.S | 10 + arch/x86/lib/hweight.S | 79 + arch/x86/lib/retpoline.S | 48 + arch/x86/lib/x86-opcode-map.txt | 2 +- arch/x86/math-emu/Makefile | 4 +- arch/x86/math-emu/reg_compare.c | 16 +- arch/x86/mm/Makefile | 4 +- arch/x86/mm/fault.c | 6 +- arch/x86/mm/hugetlbpage.c | 2 +- arch/x86/mm/init.c | 47 +- arch/x86/mm/init_64.c | 10 + arch/x86/mm/ioremap.c | 4 +- arch/x86/mm/kaiser.c | 484 ++++++ arch/x86/mm/kasan_init_64.c | 18 +- arch/x86/mm/kmmio.c | 12 +- arch/x86/mm/mpx.c | 12 +- arch/x86/mm/numa_32.c | 1 + arch/x86/mm/pageattr.c | 63 +- arch/x86/mm/pat.c | 33 +- arch/x86/mm/pgtable.c | 64 +- arch/x86/mm/tlb.c | 200 ++- arch/x86/net/bpf_jit_comp.c | 21 +- arch/x86/oprofile/nmi_int.c | 2 +- arch/x86/oprofile/op_model_ppro.c | 4 +- arch/x86/pci/broadcom_bus.c | 2 +- arch/x86/pci/xen.c | 23 +- arch/x86/platform/efi/efi-bgrt.c | 39 +- arch/x86/platform/goldfish/goldfish.c | 14 +- .../platform/intel-mid/device_libs/platform_wdt.c | 2 +- arch/x86/platform/olpc/olpc-xo15-sci.c | 2 + arch/x86/realmode/init.c | 4 +- arch/x86/realmode/rm/trampoline_64.S | 3 +- arch/x86/tools/relocs.c | 6 +- arch/x86/um/ldt.c | 7 +- arch/x86/um/ptrace_64.c | 2 +- arch/x86/um/stub_segv.c | 2 +- arch/x86/xen/enlighten.c | 6 + arch/x86/xen/mmu.c | 7 +- arch/x86/xen/setup.c | 6 +- arch/x86/xen/spinlock.c | 6 + arch/x86/xen/time.c | 6 +- arch/xtensa/include/asm/futex.h | 23 +- arch/xtensa/include/asm/irq.h | 3 +- arch/xtensa/kernel/irq.c | 5 - arch/xtensa/kernel/setup.c | 4 +- arch/xtensa/kernel/syscall.c | 2 +- .../platforms/xtfpga/include/platform/hardware.h | 6 +- arch/xtensa/platforms/xtfpga/setup.c | 10 +- block/bio-integrity.c | 3 + block/bio.c | 34 +- block/blk-cgroup.c | 13 +- block/blk-core.c | 46 +- block/blk-integrity.c | 22 +- block/blk-mq.c | 30 +- block/blk-throttle.c | 11 + block/genhd.c | 1 - block/partition-generic.c | 5 +- block/partitions/efi.c | 17 +- block/partitions/msdos.c | 4 + block/scsi_ioctl.c | 3 + certs/Makefile | 33 +- crypto/Makefile | 2 + crypto/af_alg.c | 10 +- crypto/ahash.c | 97 +- crypto/algapi.c | 12 + crypto/algif_aead.c | 157 +- crypto/algif_hash.c | 2 +- crypto/algif_skcipher.c | 13 +- crypto/asymmetric_keys/pkcs7_parser.c | 5 +- crypto/asymmetric_keys/x509_cert_parser.c | 2 + crypto/async_tx/async_pq.c | 5 +- crypto/authencesn.c | 5 + crypto/chacha20poly1305.c | 6 +- crypto/cryptd.c | 4 +- crypto/gcm.c | 6 +- crypto/hmac.c | 6 +- crypto/mcryptd.c | 24 +- crypto/pcrypt.c | 19 +- crypto/poly1305_generic.c | 17 +- crypto/salsa20_generic.c | 7 - crypto/shash.c | 13 +- crypto/tcrypt.c | 12 +- crypto/testmgr.c | 5 +- crypto/testmgr.h | 2 +- drivers/Makefile | 2 + drivers/acpi/Makefile | 1 - drivers/acpi/acpi_platform.c | 8 +- drivers/acpi/acpi_processor.c | 9 - drivers/acpi/acpi_video.c | 3 + drivers/acpi/acpica/evxfevnt.c | 18 + drivers/acpi/acpica/nsutils.c | 23 +- drivers/acpi/acpica/psobject.c | 14 + drivers/acpi/apei/erst.c | 2 +- drivers/acpi/apei/ghes.c | 1 + drivers/acpi/blacklist.c | 28 + drivers/acpi/device_sysfs.c | 4 + drivers/acpi/glue.c | 10 +- drivers/acpi/ioapic.c | 6 + drivers/acpi/nfit.c | 20 +- drivers/acpi/numa.c | 10 +- drivers/acpi/pci_irq.c | 3 - drivers/acpi/pmic/intel_pmic_xpower.c | 50 +- drivers/acpi/power.c | 1 + drivers/acpi/processor_driver.c | 10 +- drivers/acpi/processor_throttling.c | 71 +- drivers/acpi/sbshc.c | 4 +- drivers/acpi/video_detect.c | 9 + drivers/amba/bus.c | 17 +- drivers/android/binder.c | 18 +- drivers/ata/Kconfig | 3 + drivers/ata/ahci.c | 41 +- drivers/ata/libahci_platform.c | 5 +- drivers/ata/libata-core.c | 30 +- drivers/ata/libata-eh.c | 2 +- drivers/ata/libata-scsi.c | 10 +- drivers/ata/libata-sff.c | 1 - drivers/ata/libata-transport.c | 9 +- drivers/ata/pata_amd.c | 1 + drivers/ata/pata_cs5536.c | 1 + drivers/atm/horizon.c | 2 +- drivers/atm/zatm.c | 3 + drivers/base/Kconfig | 3 + drivers/base/bus.c | 2 +- drivers/base/cacheinfo.c | 15 +- drivers/base/core.c | 6 +- drivers/base/cpu.c | 48 + drivers/base/isa.c | 10 +- drivers/base/platform.c | 14 +- drivers/base/power/domain.c | 14 +- drivers/base/power/opp/core.c | 1 + drivers/base/power/runtime.c | 11 +- drivers/base/power/sysfs.c | 2 + drivers/base/power/trace.c | 4 +- drivers/base/power/wakeirq.c | 7 + drivers/base/power/wakeup.c | 30 +- drivers/base/regmap/regmap.c | 2 +- drivers/bcma/main.c | 4 + drivers/block/drbd/drbd_bitmap.c | 6 + drivers/block/loop.c | 59 +- drivers/block/pktcdvd.c | 4 +- drivers/block/rbd.c | 6 +- drivers/block/skd_main.c | 21 +- drivers/block/virtio_blk.c | 3 +- drivers/block/xen-blkback/blkback.c | 26 +- drivers/block/xen-blkback/common.h | 25 +- drivers/block/xen-blkback/xenbus.c | 8 +- drivers/block/zram/zram_drv.c | 8 +- drivers/bluetooth/ath3k.c | 2 + drivers/bluetooth/btsdio.c | 9 + drivers/bluetooth/btusb.c | 23 +- drivers/bluetooth/hci_bcm.c | 5 +- drivers/bluetooth/hci_intel.c | 13 +- drivers/bluetooth/hci_qca.c | 3 + drivers/bus/arm-ccn.c | 1 + drivers/bus/brcmstb_gisb.c | 42 +- drivers/bus/mvebu-mbus.c | 2 +- drivers/bus/sunxi-rsb.c | 1 + drivers/cdrom/cdrom.c | 2 +- drivers/char/Kconfig | 6 +- drivers/char/agp/intel-gtt.c | 2 + drivers/char/hw_random/core.c | 6 +- drivers/char/hw_random/exynos-rng.c | 10 +- drivers/char/ipmi/ipmi_msghandler.c | 15 +- drivers/char/ipmi/ipmi_si_intf.c | 44 +- drivers/char/ipmi/ipmi_ssif.c | 11 +- drivers/char/ipmi/ipmi_watchdog.c | 15 +- drivers/char/lp.c | 6 +- drivers/char/mem.c | 93 +- drivers/char/pcmcia/cm4040_cs.c | 6 +- drivers/char/random.c | 38 +- drivers/char/tpm/st33zp24/st33zp24.c | 4 +- drivers/char/tpm/tpm-chip.c | 196 ++- drivers/char/tpm/tpm-dev.c | 15 +- drivers/char/tpm/tpm-interface.c | 55 +- drivers/char/tpm/tpm-sysfs.c | 20 +- drivers/char/tpm/tpm.h | 20 +- drivers/char/tpm/tpm2-cmd.c | 14 +- drivers/char/tpm/tpm_atmel.c | 14 +- drivers/char/tpm/tpm_crb.c | 3 +- drivers/char/tpm/tpm_i2c_atmel.c | 16 +- drivers/char/tpm/tpm_i2c_infineon.c | 11 +- drivers/char/tpm/tpm_i2c_nuvoton.c | 30 +- drivers/char/tpm/tpm_infineon.c | 22 +- drivers/char/tpm/tpm_nsc.c | 20 +- drivers/char/tpm/tpm_tis.c | 21 +- drivers/char/virtio_console.c | 63 +- drivers/clk/Makefile | 2 + drivers/clk/bcm/clk-bcm2835.c | 12 +- drivers/clk/bcm/clk-ns2.c | 2 +- drivers/clk/clk-conf.c | 2 +- drivers/clk/clk-scpi.c | 6 +- drivers/clk/clk-si5351.c | 2 +- drivers/clk/imx/clk-imx6q.c | 2 +- drivers/clk/mediatek/clk-mtk.h | 1 + drivers/clk/mediatek/clk-pll.c | 5 +- drivers/clk/mvebu/armada-38x.c | 15 +- drivers/clk/qcom/gcc-msm8916.c | 1 + drivers/clk/sunxi/clk-simple-gates.c | 2 + drivers/clk/tegra/clk-tegra30.c | 2 +- drivers/clk/ti/clk-dra7-atl.c | 3 +- drivers/clocksource/cs5535-clockevt.c | 3 +- drivers/cpufreq/Kconfig | 2 + drivers/cpufreq/Kconfig.arm | 2 +- drivers/cpufreq/cpufreq.c | 12 +- drivers/cpufreq/cpufreq_conservative.c | 4 +- drivers/cpufreq/s3c2416-cpufreq.c | 1 - drivers/cpufreq/s3c24xx-cpufreq.c | 8 +- drivers/cpufreq/sh-cpufreq.c | 45 +- drivers/cpuidle/cpuidle-powernv.c | 18 + drivers/cpuidle/cpuidle.c | 1 + drivers/cpuidle/dt_idle_states.c | 4 +- drivers/cpuidle/sysfs.c | 12 + drivers/crypto/amcc/crypto4xx_core.h | 10 +- drivers/crypto/atmel-sha.c | 4 +- drivers/crypto/caam/caamhash.c | 2 +- drivers/crypto/caam/ctrl.c | 11 +- drivers/crypto/caam/key_gen.c | 2 +- drivers/crypto/n2_core.c | 3 + drivers/crypto/s5p-sss.c | 18 +- drivers/crypto/talitos.c | 14 +- drivers/crypto/vmx/aes_ctr.c | 6 + drivers/devfreq/devfreq.c | 2 +- drivers/dma/at_hdmac.c | 4 +- drivers/dma/at_xdmac.c | 4 +- drivers/dma/dma-jz4740.c | 4 +- drivers/dma/dmaengine.c | 2 + drivers/dma/dmatest.c | 54 +- drivers/dma/edma.c | 19 +- drivers/dma/ep93xx_dma.c | 2 + drivers/dma/imx-sdma.c | 40 +- drivers/dma/ioat/hw.h | 2 + drivers/dma/ioat/init.c | 13 +- drivers/dma/ipu/ipu_irq.c | 2 +- drivers/dma/pl330.c | 19 +- drivers/dma/sh/usb-dmac.c | 2 +- drivers/dma/ti-dma-crossbar.c | 18 +- drivers/dma/zx296702_dma.c | 3 +- drivers/edac/i5000_edac.c | 8 +- drivers/edac/i5400_edac.c | 9 +- drivers/edac/mv64x60_edac.c | 2 +- drivers/edac/octeon_edac-lmc.c | 1 + drivers/edac/sb_edac.c | 1 + drivers/extcon/extcon-axp288.c | 2 +- drivers/extcon/extcon-palmas.c | 5 + drivers/firmware/efi/efi.c | 36 +- drivers/firmware/efi/esrt.c | 17 +- drivers/firmware/efi/runtime-map.c | 10 +- drivers/firmware/psci.c | 2 +- drivers/gpio/gpio-altera.c | 26 +- drivers/gpio/gpio-ath79.c | 3 + drivers/gpio/gpio-intel-mid.c | 2 +- drivers/gpio/gpio-iop.c | 4 + drivers/gpio/gpio-xgene.c | 13 +- drivers/gpio/gpiolib.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 47 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 42 +- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 89 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 9 + drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 4 +- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 29 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 35 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 29 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 30 +- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 +- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 18 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 10 + drivers/gpu/drm/armada/armada_crtc.c | 25 +- drivers/gpu/drm/ast/ast_drv.h | 5 + drivers/gpu/drm/ast/ast_main.c | 171 +- drivers/gpu/drm/ast/ast_post.c | 63 +- drivers/gpu/drm/drm_atomic.c | 5 +- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_dp_mst_topology.c | 45 +- drivers/gpu/drm/drm_drv.c | 2 +- drivers/gpu/drm/drm_edid.c | 23 +- drivers/gpu/drm/drm_gem.c | 6 +- drivers/gpu/drm/drm_irq.c | 14 +- drivers/gpu/drm/drm_mm.c | 16 +- drivers/gpu/drm/drm_modeset_lock.c | 2 +- drivers/gpu/drm/drm_probe_helper.c | 20 + drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 + drivers/gpu/drm/exynos/exynos_drm_gem.c | 9 + drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 10 +- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +- drivers/gpu/drm/gma500/psb_intel_lvds.c | 18 +- drivers/gpu/drm/i2c/adv7511.c | 71 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 73 +- drivers/gpu/drm/i915/intel_bios.c | 7 + drivers/gpu/drm/i915/intel_i2c.c | 4 +- drivers/gpu/drm/i915/intel_pm.c | 25 +- drivers/gpu/drm/i915/intel_uncore.c | 3 +- drivers/gpu/drm/mgag200/mgag200_main.c | 2 + drivers/gpu/drm/msm/adreno/adreno_gpu.c | 9 +- drivers/gpu/drm/msm/msm_drv.c | 1 + drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gem.c | 14 +- drivers/gpu/drm/msm/msm_gem_prime.c | 7 + drivers/gpu/drm/msm/msm_gem_submit.c | 10 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 3 +- .../gpu/drm/nouveau/include/nvkm/subdev/timer.h | 1 + drivers/gpu/drm/nouveau/nouveau_connector.c | 18 +- drivers/gpu/drm/nouveau/nouveau_display.c | 5 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 +- drivers/gpu/drm/nouveau/nouveau_fence.h | 1 + drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- drivers/gpu/drm/nouveau/nouveau_usif.c | 3 +- drivers/gpu/drm/nouveau/nv84_fence.c | 6 + drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 11 + drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 64 +- drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c | 2 +- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 8 +- drivers/gpu/drm/omapdrm/omap_gem.c | 4 +- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 3 - drivers/gpu/drm/panel/panel-simple.c | 2 + drivers/gpu/drm/qxl/qxl_fb.c | 9 +- drivers/gpu/drm/radeon/atombios_dp.c | 38 +- drivers/gpu/drm/radeon/atombios_encoders.c | 13 +- drivers/gpu/drm/radeon/ci_dpm.c | 12 + drivers/gpu/drm/radeon/cik.c | 35 +- drivers/gpu/drm/radeon/evergreen.c | 4 +- drivers/gpu/drm/radeon/r600.c | 2 +- drivers/gpu/drm/radeon/radeon_combios.c | 7 + drivers/gpu/drm/radeon/radeon_connectors.c | 105 +- drivers/gpu/drm/radeon/radeon_cursor.c | 4 +- drivers/gpu/drm/radeon/radeon_device.c | 4 + drivers/gpu/drm/radeon/radeon_display.c | 6 + drivers/gpu/drm/radeon/radeon_fb.c | 1 - drivers/gpu/drm/radeon/radeon_object.c | 3 +- drivers/gpu/drm/radeon/radeon_ttm.c | 4 +- drivers/gpu/drm/radeon/radeon_uvd.c | 2 +- drivers/gpu/drm/radeon/si.c | 4 +- drivers/gpu/drm/radeon/si_dpm.c | 14 +- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 82 +- drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 10 +- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 185 +- drivers/gpu/drm/rcar-du/rcar_du_hdmicon.c | 11 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 17 +- drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 11 +- drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c | 8 +- drivers/gpu/drm/rcar-du/rcar_du_vgacon.c | 11 +- drivers/gpu/drm/rcar-du/rcar_lvds_regs.h | 2 +- drivers/gpu/drm/sti/sti_vtg.c | 4 + drivers/gpu/drm/ttm/ttm_bo.c | 4 +- drivers/gpu/drm/ttm/ttm_bo_vm.c | 12 + drivers/gpu/drm/ttm/ttm_object.c | 10 +- drivers/gpu/drm/ttm/ttm_page_alloc.c | 4 +- drivers/gpu/drm/udl/udl_fb.c | 9 +- drivers/gpu/drm/virtio/virtgpu_fb.c | 2 +- drivers/gpu/drm/virtio/virtgpu_object.c | 4 +- drivers/gpu/drm/virtio/virtgpu_vq.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 7 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 79 +- drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 + drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 29 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 12 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 52 +- drivers/hid/Kconfig | 4 +- drivers/hid/hid-chicony.c | 1 + drivers/hid/hid-core.c | 28 +- drivers/hid/hid-elo.c | 6 + drivers/hid/hid-ids.h | 11 + drivers/hid/hid-input.c | 23 +- drivers/hid/hid-multitouch.c | 5 +- drivers/hid/hid-rmi.c | 4 +- drivers/hid/hid-xinmo.c | 1 + drivers/hid/hidraw.c | 5 + drivers/hid/i2c-hid/i2c-hid.c | 25 +- drivers/hid/usbhid/hid-core.c | 12 +- drivers/hid/usbhid/hid-quirks.c | 1 + drivers/hid/wacom_wac.c | 45 +- drivers/hsi/clients/ssi_protocol.c | 5 +- drivers/hv/channel.c | 16 +- drivers/hv/connection.c | 8 +- drivers/hv/hv.c | 37 +- drivers/hv/hv_balloon.c | 140 +- drivers/hv/hv_fcopy.c | 8 + commit 69847b97f21141c2d4f6e9c1b22d932b7add3182 Author: Greg Kroah-Hartman <gre...@linuxfoundation.org> Date: Wed May 16 10:06:53 2018 +0200 Linux 4.4.132 commit f2fa49f50b327ffe100bc4bbbf7ca9b8762fcfac Author: Peter Zijlstra <pet...@infradead.org> Date: Fri Apr 20 14:08:58 2018 +0200 perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map() commit 46b1b577229a091b137831becaa0fae8690ee15a upstream. > arch/x86/events/intel/cstate.c:307 cstate_pmu_event_init() warn: potential spectre issue 'pkg_msr' (local cap) > arch/x86/events/intel/core.c:337 intel_pmu_event_map() warn: potential spectre issue 'intel_perfmon_event_map' > arch/x86/events/intel/knc.c:122 knc_pmu_event_map() warn: potential spectre issue 'knc_perfmon_event_map' > arch/x86/events/intel/p4.c:722 p4_pmu_event_map() warn: potential spectre issue 'p4_general_events' > arch/x86/events/intel/p6.c:116 p6_pmu_event_map() warn: potential spectre issue 'p6_perfmon_event_map' > arch/x86/events/amd/core.c:132 amd_pmu_event_map() warn: potential spectre issue 'amd_perfmon_event_map' Userspace controls @attr, sanitize @attr->config before passing it on to x86_pmu::event_map(). Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Cc: <sta...@kernel.org> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Stephane Eranian <eran...@google.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Vince Weaver <vincent.wea...@maine.edu> Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit f21e5918a98369190d4e167b011a5e9a62e9f2ad Author: Peter Zijlstra <pet...@infradead.org> Date: Fri Apr 20 14:03:18 2018 +0200 perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[] commit 4411ec1d1993e8dbff2898390e3fed280d88e446 upstream. > kernel/events/ring_buffer.c:871 perf_mmap_to_page() warn: potential spectre issue 'rb->aux_pages' Userspace controls @pgoff through the fault address. Sanitize the array index before doing the array dereference. Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Cc: <sta...@kernel.org> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Stephane Eranian <eran...@google.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Vince Weaver <vincent.wea...@maine.edu> Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit ae5751bee1e21dd17de021e7706abbab0b5e49da Author: Peter Zijlstra <pet...@infradead.org> Date: Fri Apr 20 14:23:36 2018 +0200 perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver commit 06ce6e9b6d6c09d4129c6e24a1314a395d816c10 upstream. > arch/x86/events/msr.c:178 msr_event_init() warn: potential spectre issue 'msr' (local cap) Userspace controls @attr, sanitize cfg (attr->config) before using it to index an array. Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Cc: <sta...@kernel.org> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Stephane Eranian <eran...@google.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Vince Weaver <vincent.wea...@maine.edu> Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 5ff02cfcbbf6d09be1ef45796d24677a73d4e8a8 Author: Peter Zijlstra <pet...@infradead.org> Date: Fri Apr 20 14:25:48 2018 +0200 perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr commit a5f81290ce475489fa2551c01a07470c1a4c932e upstream. > arch/x86/events/intel/cstate.c:307 cstate_pmu_event_init() warn: potential spectre issue 'pkg_msr' (local cap) Userspace controls @attr, sanitize cfg (attr->config) before using it to index an array. Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Cc: <sta...@kernel.org> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Stephane Eranian <eran...@google.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Vince Weaver <vincent.wea...@maine.edu> Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 9f2e20750aa96301abd7ff4791f6a6a977f453ca Author: Peter Zijlstra <pet...@infradead.org> Date: Fri Apr 20 14:06:29 2018 +0200 perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_* commit ef9ee4ad38445a30909c48998624861716f2a994 upstream. > arch/x86/events/core.c:319 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_event_ids[cache_type]' (local cap) > arch/x86/events/core.c:319 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_event_ids' (local cap) > arch/x86/events/core.c:328 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_extra_regs[cache_type]' (local cap) > arch/x86/events/core.c:328 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_extra_regs' (local cap) Userspace controls @config which contains 3 (byte) fields used for a 3 dimensional array deref. Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Cc: <sta...@kernel.org> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Stephane Eranian <eran...@google.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Vince Weaver <vincent.wea...@maine.edu> Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit cb2798296082952f1d0f739bd8b68ef6f9c7ef6b Author: Masami Hiramatsu <mhira...@kernel.org> Date: Tue Apr 10 21:20:08 2018 +0900 tracing/uprobe_event: Fix strncpy corner case commit 50268a3d266ecfdd6c5873d62b2758d9732fc598 upstream. Fix string fetch function to terminate with NUL. It is OK to drop the rest of string. Signed-off-by: Masami Hiramatsu <mhira...@kernel.org> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Song Liu <songliubrav...@fb.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: secur...@kernel.org Cc: 范龙飞 <long7...@126.com> Fixes: 5baaa59ef09e ("tracing/probes: Implement 'memory' fetch method for uprobes") Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit fc47961e81838f2bf46a6a0ba62ba150e0b1c71c Author: Hans de Goede <hdego...@redhat.com> Date: Thu Apr 26 14:18:19 2018 +0200 Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174" commit 544a591668813583021474fa5c7ff4942244d654 upstream. Commit f44cb4b19ed4 ("Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174") is causing bluetooth to no longer work for several people, see: https://bugzilla.redhat.com/show_bug.cgi?id=1568911 So lets revert it for now and try to find another solution for devices which need the modified quirk. Cc: sta...@vger.kernel.org Cc: Takashi Iwai <ti...@suse.de> Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Marcel Holtmann <mar...@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 46864b108b00bda066f5774785efbe82a4439a84 Author: Gustavo A. R. Silva <gust...@embeddedor.com> Date: Thu May 3 13:17:12 2018 -0500 atm: zatm: Fix potential Spectre v1 commit 2be147f7459db5bbf292e0a6f135037b55e20b39 upstream. pool can be indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: drivers/atm/zatm.c:1462 zatm_ioctl() warn: potential spectre issue 'zatm_dev->pool_info' (local cap) Fix this by sanitizing pool before using it to index zatm_dev->pool_info Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 0df23e9b9b2f0293b873145bd22d218d2940dfaa Author: Gustavo A. R. Silva <gust...@embeddedor.com> Date: Thu May 3 13:45:58 2018 -0500 net: atm: Fix potential Spectre v1 commit acf784bd0ce257fe43da7ca266f7a10b837479d2 upstream. ioc_data.dev_num can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: net/atm/lec.c:702 lec_vcc_attach() warn: potential spectre issue 'dev_lec' Fix this by sanitizing ioc_data.dev_num before using it to index dev_lec. Also, notice that there is another instance in which array dev_lec is being indexed using ioc_data.dev_num at line 705: lec_vcc_added(netdev_priv(dev_lec[ioc_data.dev_num]), Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 787bbee29326dce2f0ddd1c0d5b4fbc088849e13 Author: Jimmy Assarsson <ex...@kvaser.com> Date: Fri Apr 20 14:38:46 2018 +0200 can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg() commit 6ee00865ffe4e8c8ba4a68d26db53c7ec09bbb89 upstream. Increase rx_dropped, if alloc_can_skb() fails, not tx_dropped. Signed-off-by: Jimmy Assarsson <ex...@kvaser.com> Cc: linux-stable <sta...@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <m...@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 4cc56b7a9db913c19206401390215703f66cbd2d Author: Steven Rostedt (VMware) <rost...@goodmis.org> Date: Wed May 9 11:59:32 2018 -0400 tracing: Fix regex_match_front() to not over compare the test string commit dc432c3d7f9bceb3de6f5b44fb9c657c9810ed6d upstream. The regex match function regex_match_front() in the tracing filter logic, was fixed to test just the pattern length from testing the entire test string. That is, it went from strncmp(str, r->pattern, len) to strcmp(str, r->pattern, r->len). The issue is that str is not guaranteed to be nul terminated, and if r->len is greater than the length of str, it can access more memory than is allocated. The solution is to add a simple test if (len < r->len) return 0. Cc: sta...@vger.kernel.org Fixes: 285caad415f45 ("tracing/filters: Fix MATCH_FRONT_ONLY filter matching") Signed-off-by: Steven Rostedt (VMware) <rost...@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit f307956cade0239d1436bb3eaffbc65ab3c5d767 Author: Hans de Goede <hdego...@redhat.com> Date: Thu Apr 26 22:32:21 2018 +0200 libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs commit 184add2ca23ce5edcac0ab9c3b9be13f91e7b567 upstream. Richard Jones has reported that using med_power_with_dipm on a T450s with a Sandisk SD7UB3Q256G1001 SSD (firmware version X2180501) is causing the machine to hang. Switching the LPM to max_performance fixes this, so it seems that this Sandisk SSD does not handle LPM well. Note in the past there have been bug-reports about the following Sandisk models not working with min_power, so we may need to extend the quirk list in the future: name - firmware Sandisk SD6SB2M512G1022I - X210400 Sandisk SD6PP4M-256G-1006 - A200906 Cc: sta...@vger.kernel.org Cc: Richard W.M. Jones <rjo...@redhat.com> Reported-and-tested-by: Richard W.M. Jones <rjo...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Tejun Heo <t...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 6a08f48efae8bf6f59288f7527436c44ee364553 Author: Johan Hovold <jo...@kernel.org> Date: Thu Apr 26 09:31:52 2018 +0200 rfkill: gpio: fix memory leak in probe error path commit 4bf01ca21e2e0e4561d1a03c48c3d740418702db upstream. Make sure to free the rfkill device in case registration fails during probe. Fixes: 5e7ca3937fbe ("net: rfkill: gpio: convert to resource managed allocation") Cc: stable <sta...@vger.kernel.org> # 3.13 Cc: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Johan Hovold <jo...@kernel.org> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Johannes Berg <johannes.b...@intel.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit a8c459de1668043739ec330f1f843702edd119e9 Author: Yi Zhao <yi.z...@windriver.com> Date: Tue Nov 29 18:09:01 2016 +0800 xfrm_user: fix return value from xfrm_user_rcv_msg commit 83e2d0587ae859aae75fd9d246c409b10a6bd137 upstream. It doesn't support to run 32bit 'ip' to set xfrm objdect on 64bit host. But the return value is unknown for user program: ip xfrm policy list RTNETLINK answers: Unknown error 524 Replace ENOTSUPP with EOPNOTSUPP: ip xfrm policy list RTNETLINK answers: Operation not supported Signed-off-by: Yi Zhao <yi.z...@windriver.com> Signed-off-by: Steffen Klassert <steffen.klass...@secunet.com> Signed-off-by: Nathan Harold <nhar...@google.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 0678adf8f8a99c66c48c608ea9a79588743bc615 Author: Wei Fang <fangw...@huawei.com> Date: Sun Jan 22 12:21:02 2017 +0800 f2fs: fix a dead loop in f2fs_fiemap() commit b86e33075ed1909d8002745b56ecf73b833db143 upstream. A dead loop can be triggered in f2fs_fiemap() using the test case as below: ... fd = open(); fallocate(fd, 0, 0, 4294967296); ioctl(fd, FS_IOC_FIEMAP, fiemap_buf); ... It's caused by an overflow in __get_data_block(): ... bh->b_size = map.m_len << inode->i_blkbits; ... map.m_len is an unsigned int, and bh->b_size is a size_t which is 64 bits on 64 bits archtecture, type conversion from an unsigned int to a size_t will result in an overflow. In the above-mentioned case, bh->b_size will be zero, and f2fs_fiemap() will call get_data_block() at block 0 again an again. Fix this by adding a force conversion before left shift. Signed-off-by: Wei Fang <fangw...@huawei.com> Acked-by: Chao Yu <yuch...@huawei.com> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> Cc: Guenter Roeck <li...@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 3affd66711f6bb3a7cd7d880771afddf2eadcc2a Author: Jan Kara <j...@suse.cz> Date: Thu May 3 18:26:26 2018 +0200 bdi: Fix oops in wb_workfn() commit b8b784958eccbf8f51ebeee65282ca3fd59ea391 upstream. Syzbot has reported that it can hit a NULL pointer dereference in wb_workfn() due to wb->bdi->dev being NULL. This indicates that wb_workfn() was called for an already unregistered bdi which should not happen as wb_shutdown() called from bdi_unregister() should make sure all pending writeback works are completed before bdi is unregistered. Except that wb_workfn() itself can requeue the work with: mod_delayed_work(bdi_wq, &wb->dwork, 0); and if this happens while wb_shutdown() is waiting in: flush_delayed_work(&wb->dwork); the dwork can get executed after wb_shutdown() has finished and bdi_unregister() has cleared wb->bdi->dev. Make wb_workfn() use wakeup_wb() for requeueing the work which takes all the necessary precautions against racing with bdi unregistration. CC: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> CC: Tejun Heo <t...@kernel.org> Fixes: 839a8e8660b6777e7fe4e80af1a048aebe2b5977 Reported-by: syzbot <syzbot+9873874c735f2892e...@syzkaller.appspotmail.com> Reviewed-by: Dave Chinner <dchin...@redhat.com> Signed-off-by: Jan Kara <j...@suse.cz> Signed-off-by: Jens Axboe <ax...@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit d2368e5eeeba8f8545af034bfc7de2c25cc2e521 Author: Eric Dumazet <eduma...@google.com> Date: Sun Apr 29 18:55:20 2018 -0700 tcp: fix TCP_REPAIR_QUEUE bound checking commit bf2acc943a45d2b2e8a9f1a5ddff6b6e43cc69d9 upstream. syzbot is able to produce a nasty WARN_ON() in tcp_verify_left_out() with following C-repro : socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 setsockopt(3, SOL_TCP, TCP_REPAIR, [1], 4) = 0 setsockopt(3, SOL_TCP, TCP_REPAIR_QUEUE, [-1], 4) = 0 bind(3, {sa_family=AF_INET, sin_port=htons(20002), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 sendto(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1242, MSG_FASTOPEN, {sa_family=AF_INET, sin_port=htons(20002), sin_addr=inet_addr("127.0.0.1")}, 16) = 1242 setsockopt(3, SOL_TCP, TCP_REPAIR_WINDOW, "\4\0\0@+\205\0\0\377\377\0\0\377\377\377\177\0\0\0\0", 20) = 0 writev(3, [{"\270", 1}], 1) = 1 setsockopt(3, SOL_TCP, TCP_REPAIR_OPTIONS, "\10\0\0\0\0\0\0\0\0\0\0\0|\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 386) = 0 writev(3, [{"\210v\r[\226\320t\231qwQ\204\264l\254\t\1\20\245\214p\350H\223\254;\\\37\345\307p$"..., 3144}], 1) = 3144 The 3rd system call looks odd : setsockopt(3, SOL_TCP, TCP_REPAIR_QUEUE, [-1], 4) = 0 This patch makes sure bound checking is using an unsigned compare. Fixes: ee9952831cfd ("tcp: Initial repair mode") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Cc: Pavel Emelyanov <xe...@parallels.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit f17aafae9e4ba6df607f895bb09ae08ba3270fb1 Author: Jiri Olsa <jo...@kernel.org> Date: Sun Apr 15 11:23:52 2018 +0200 perf: Remove superfluous allocation error check commit bfb3d7b8b906b66551424d7636182126e1d134c8 upstream. If the get_callchain_buffers fails to allocate the buffer it will decrease the nr_callchain_events right away. There's no point of checking the allocation error for nr_callchain_events > 1. Removing that check. Signed-off-by: Jiri Olsa <jo...@kernel.org> Tested-by: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Andi Kleen <a...@firstfloor.org> Cc: H. Peter Anvin <h...@zytor.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Thomas Gleixner <t...@linutronix.de> Cc: syzkaller-b...@googlegroups.com Cc: x...@kernel.org Link: http://lkml.kernel.org/r/20180415092352.12403-3-jo...@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit ad4adb10e34ee00d3763ead7d9792ef6ca61d58d Author: Eric Dumazet <eduma...@google.com> Date: Sat Apr 7 13:42:43 2018 -0700 soreuseport: initialise timewait reuseport field commit 3099a52918937ab86ec47038ad80d377ba16c531 upstream. syzbot reported an uninit-value in inet_csk_bind_conflict() [1] It turns out we never propagated sk->sk_reuseport into timewait socket. [1] BUG: KMSAN: uninit-value in inet_csk_bind_conflict+0x5f9/0x990 net/ipv4/inet_connection_sock.c:151 CPU: 1 PID: 3589 Comm: syzkaller008242 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 inet_csk_bind_conflict+0x5f9/0x990 net/ipv4/inet_connection_sock.c:151 inet_csk_get_port+0x1d28/0x1e40 net/ipv4/inet_connection_sock.c:320 inet6_bind+0x121c/0x1820 net/ipv6/af_inet6.c:399 SYSC_bind+0x3f2/0x4b0 net/socket.c:1474 SyS_bind+0x54/0x80 net/socket.c:1460 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x4416e9 RSP: 002b:00007ffce6d15c88 EFLAGS: 00000217 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 0100000000000000 RCX: 00000000004416e9 RDX: 000000000000001c RSI: 0000000020402000 RDI: 0000000000000004 RBP: 0000000000000000 R08: 00000000e6d15e08 R09: 00000000e6d15e08 R10: 0000000000000004 R11: 0000000000000217 R12: 0000000000009478 R13: 00000000006cd448 R14: 0000000000000000 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 tcp_time_wait+0xf17/0xf50 net/ipv4/tcp_minisocks.c:283 tcp_rcv_state_process+0xebe/0x6490 net/ipv4/tcp_input.c:6003 tcp_v6_do_rcv+0x11dd/0x1d90 net/ipv6/tcp_ipv6.c:1331 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_close+0x277/0x18f0 net/ipv4/tcp.c:2269 inet_release+0x240/0x2a0 net/ipv4/af_inet.c:427 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:435 sock_release net/socket.c:595 [inline] sock_close+0xe0/0x300 net/socket.c:1149 __fput+0x49e/0xa10 fs/file_table.c:209 ____fput+0x37/0x40 fs/file_table.c:243 task_work_run+0x243/0x2c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x10e1/0x38d0 kernel/exit.c:867 do_group_exit+0x1a0/0x360 kernel/exit.c:970 SYSC_exit_group+0x21/0x30 kernel/exit.c:981 SyS_exit_group+0x25/0x30 kernel/exit.c:979 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 inet_twsk_alloc+0xaef/0xc00 net/ipv4/inet_timewait_sock.c:182 tcp_time_wait+0xd9/0xf50 net/ipv4/tcp_minisocks.c:258 tcp_rcv_state_process+0xebe/0x6490 net/ipv4/tcp_input.c:6003 tcp_v6_do_rcv+0x11dd/0x1d90 net/ipv6/tcp_ipv6.c:1331 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_close+0x277/0x18f0 net/ipv4/tcp.c:2269 inet_release+0x240/0x2a0 net/ipv4/af_inet.c:427 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:435 sock_release net/socket.c:595 [inline] sock_close+0xe0/0x300 net/socket.c:1149 __fput+0x49e/0xa10 fs/file_table.c:209 ____fput+0x37/0x40 fs/file_table.c:243 task_work_run+0x243/0x2c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x10e1/0x38d0 kernel/exit.c:867 do_group_exit+0x1a0/0x360 kernel/exit.c:970 SYSC_exit_group+0x21/0x30 kernel/exit.c:981 SyS_exit_group+0x25/0x30 kernel/exit.c:979 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmem_cache_alloc+0xaab/0xb90 mm/slub.c:2756 inet_twsk_alloc+0x13b/0xc00 net/ipv4/inet_timewait_sock.c:163 tcp_time_wait+0xd9/0xf50 net/ipv4/tcp_minisocks.c:258 tcp_rcv_state_process+0xebe/0x6490 net/ipv4/tcp_input.c:6003 tcp_v6_do_rcv+0x11dd/0x1d90 net/ipv6/tcp_ipv6.c:1331 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_close+0x277/0x18f0 net/ipv4/tcp.c:2269 inet_release+0x240/0x2a0 net/ipv4/af_inet.c:427 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:435 sock_release net/socket.c:595 [inline] sock_close+0xe0/0x300 net/socket.c:1149 __fput+0x49e/0xa10 fs/file_table.c:209 ____fput+0x37/0x40 fs/file_table.c:243 task_work_run+0x243/0x2c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x10e1/0x38d0 kernel/exit.c:867 do_group_exit+0x1a0/0x360 kernel/exit.c:970 SYSC_exit_group+0x21/0x30 kernel/exit.c:981 SyS_exit_group+0x25/0x30 kernel/exit.c:979 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: da5e36308d9f ("soreuseport: TCP/IPv4 implementation") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 208223c1db6c02d2e379e6ed1562cc4fe1f723ac Author: Eric Dumazet <eduma...@google.com> Date: Sat Apr 7 13:42:41 2018 -0700 dccp: initialize ireq->ir_mark commit b855ff827476adbdc2259e9895681d82b7b26065 upstream. syzbot reported an uninit-value read of skb->mark in iptable_mangle_hook() Thanks to the nice report, I tracked the problem to dccp not caring of ireq->ir_mark for passive sessions. BUG: KMSAN: uninit-value in ipt_mangle_out net/ipv4/netfilter/iptable_mangle.c:66 [inline] BUG: KMSAN: uninit-value in iptable_mangle_hook+0x5e5/0x720 net/ipv4/netfilter/iptable_mangle.c:84 CPU: 0 PID: 5300 Comm: syz-executor3 Not tainted 4.16.0+ #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 ipt_mangle_out net/ipv4/netfilter/iptable_mangle.c:66 [inline] iptable_mangle_hook+0x5e5/0x720 net/ipv4/netfilter/iptable_mangle.c:84 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline] nf_hook_slow+0x158/0x3d0 net/netfilter/core.c:483 nf_hook include/linux/netfilter.h:243 [inline] __ip_local_out net/ipv4/ip_output.c:113 [inline] ip_local_out net/ipv4/ip_output.c:122 [inline] ip_queue_xmit+0x1d21/0x21c0 net/ipv4/ip_output.c:504 dccp_transmit_skb+0x15eb/0x1900 net/dccp/output.c:142 dccp_xmit_packet+0x814/0x9e0 net/dccp/output.c:281 dccp_write_xmit+0x20f/0x480 net/dccp/output.c:363 dccp_sendmsg+0x12ca/0x12d0 net/dccp/proto.c:818 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x455259 RSP: 002b:00007f1a4473dc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f1a4473e6d4 RCX: 0000000000455259 RDX: 0000000000000000 RSI: 0000000020b76fc8 RDI: 0000000000000015 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004f0 R14: 00000000006fa720 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 ip_queue_xmit+0x1e35/0x21c0 net/ipv4/ip_output.c:502 dccp_transmit_skb+0x15eb/0x1900 net/dccp/output.c:142 dccp_xmit_packet+0x814/0x9e0 net/dccp/output.c:281 dccp_write_xmit+0x20f/0x480 net/dccp/output.c:363 dccp_sendmsg+0x12ca/0x12d0 net/dccp/proto.c:818 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_save_stack mm/kmsan/kmsan.c:293 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 inet_csk_clone_lock+0x503/0x580 net/ipv4/inet_connection_sock.c:797 dccp_create_openreq_child+0x7f/0x890 net/dccp/minisocks.c:92 dccp_v4_request_recv_sock+0x22c/0xe90 net/dccp/ipv4.c:408 dccp_v6_request_recv_sock+0x290/0x2000 net/dccp/ipv6.c:414 dccp_check_req+0x7b9/0x8f0 net/dccp/minisocks.c:197 dccp_v4_rcv+0x12e4/0x2630 net/dccp/ipv4.c:840 ip_local_deliver_finish+0x6ed/0xd40 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:288 [inline] ip_local_deliver+0x43c/0x4e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:449 [inline] ip_rcv_finish+0x1253/0x16d0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0x119d/0x16f0 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x47cf/0x4a80 net/core/dev.c:4562 __netif_receive_skb net/core/dev.c:4627 [inline] process_backlog+0x62d/0xe20 net/core/dev.c:5307 napi_poll net/core/dev.c:5705 [inline] net_rx_action+0x7c1/0x1a70 net/core/dev.c:5771 __do_softirq+0x56d/0x93d kernel/softirq.c:285 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmem_cache_alloc+0xaab/0xb90 mm/slub.c:2756 reqsk_alloc include/net/request_sock.h:88 [inline] inet_reqsk_alloc+0xc4/0x7f0 net/ipv4/tcp_input.c:6145 dccp_v4_conn_request+0x5cc/0x1770 net/dccp/ipv4.c:600 dccp_v6_conn_request+0x299/0x1880 net/dccp/ipv6.c:317 dccp_rcv_state_process+0x2ea/0x2410 net/dccp/input.c:612 dccp_v4_do_rcv+0x229/0x340 net/dccp/ipv4.c:682 dccp_v6_do_rcv+0x16d/0x1220 net/dccp/ipv6.c:578 sk_backlog_rcv include/net/sock.h:908 [inline] __sk_receive_skb+0x60e/0xf20 net/core/sock.c:513 dccp_v4_rcv+0x24d4/0x2630 net/dccp/ipv4.c:874 ip_local_deliver_finish+0x6ed/0xd40 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:288 [inline] ip_local_deliver+0x43c/0x4e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:449 [inline] ip_rcv_finish+0x1253/0x16d0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0x119d/0x16f0 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x47cf/0x4a80 net/core/dev.c:4562 __netif_receive_skb net/core/dev.c:4627 [inline] process_backlog+0x62d/0xe20 net/core/dev.c:5307 napi_poll net/core/dev.c:5705 [inline] net_rx_action+0x7c1/0x1a70 net/core/dev.c:5771 __do_softirq+0x56d/0x93d kernel/softirq.c:285 Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 6d5e346db4a732482e9fbd8f1200d892dfe3a225 Author: Eric Dumazet <eduma...@google.com> Date: Sat Apr 7 13:42:40 2018 -0700 net: fix uninit-value in __hw_addr_add_ex() commit 77d36398d99f2565c0a8d43a86fd520a82e64bb8 upstream. syzbot complained : BUG: KMSAN: uninit-value in memcmp+0x119/0x180 lib/string.c:861 CPU: 0 PID: 3 Comm: kworker/0:0 Not tainted 4.16.0+ #82 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: ipv6_addrconf addrconf_dad_work Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 memcmp+0x119/0x180 lib/string.c:861 __hw_addr_add_ex net/core/dev_addr_lists.c:60 [inline] __dev_mc_add+0x1c2/0x8e0 net/core/dev_addr_lists.c:670 dev_mc_add+0x6d/0x80 net/core/dev_addr_lists.c:687 igmp6_group_added+0x2db/0xa00 net/ipv6/mcast.c:662 ipv6_dev_mc_inc+0xe9e/0x1130 net/ipv6/mcast.c:914 addrconf_join_solict net/ipv6/addrconf.c:2078 [inline] addrconf_dad_begin net/ipv6/addrconf.c:3828 [inline] addrconf_dad_work+0x427/0x2150 net/ipv6/addrconf.c:3954 process_one_work+0x12c6/0x1f60 kernel/workqueue.c:2113 worker_thread+0x113c/0x24f0 kernel/workqueue.c:2247 kthread+0x539/0x720 kernel/kthread.c:239 Fixes: f001fde5eadd ("net: introduce a list of device addresses dev_addr_list (v6)") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit c5e0c93134455e9af7988dc1c75631ffe26da0d2 Author: Eric Dumazet <eduma...@google.com> Date: Sat Apr 7 13:42:39 2018 -0700 net: initialize skb->peeked when cloning commit b13dda9f9aa7caceeee61c080c2e544d5f5d85e5 upstream. syzbot reported __skb_try_recv_from_queue() was using skb->peeked while it was potentially unitialized. We need to clear it in __skb_clone() Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 1baf9dbebac9f1295794c76668b648e6e5f3efa7 Author: Eric Dumazet <eduma...@google.com> Date: Sat Apr 7 13:42:38 2018 -0700 net: fix rtnh_ok() commit b1993a2de12c9e75c35729e2ffbc3a92d50c0d31 upstream. syzbot reported : BUG: KMSAN: uninit-value in rtnh_ok include/net/nexthop.h:11 [inline] BUG: KMSAN: uninit-value in fib_count_nexthops net/ipv4/fib_semantics.c:469 [inline] BUG: KMSAN: uninit-value in fib_create_info+0x554/0x8d20 net/ipv4/fib_semantics.c:1091 @remaining is an integer, coming from user space. If it is negative we want rtnh_ok() to return false. Fixes: 4e902c57417c ("[IPv4]: FIB configuration using struct fib_config") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit bab5c357a16e77db86e5f681236065af609896a1 Author: Eric Dumazet <eduma...@google.com> Date: Sat Apr 7 13:42:37 2018 -0700 netlink: fix uninit-value in netlink_sendmsg commit 6091f09c2f79730d895149bcfe3d66140288cd0e upstream. syzbot reported : BUG: KMSAN: uninit-value in ffs arch/x86/include/asm/bitops.h:432 [inline] BUG: KMSAN: uninit-value in netlink_sendmsg+0xb26/0x1310 net/netlink/af_netlink.c:1851 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 83231e0aae2c6bca967dbd05b0966908e908a036 Author: Eric Dumazet <eduma...@google.com> Date: Sat Apr 7 13:42:36 2018 -0700 crypto: af_alg - fix possible uninit-value in alg_bind() commit a466856e0b7ab269cdf9461886d007e88ff575b0 upstream. syzbot reported : BUG: KMSAN: uninit-value in alg_bind+0xe3/0xd90 crypto/af_alg.c:162 We need to check addr_len before dereferencing sa (or uaddr) Fixes: bb30b8848c85 ("crypto: af_alg - whitelist mask and type") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Cc: Stephan Mueller <smuel...@chronox.de> Cc: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 7ae1c4cb9f1f8cf0e5473d44b31778e644ae89b1 Author: Julian Anastasov <j...@ssi.bg> Date: Sat Apr 7 15:50:47 2018 +0300 ipvs: fix rtnl_lock lockups caused by start_sync_thread commit 5c64576a77894a50be80be0024bed27171b55989 upstream. syzkaller reports for wrong rtnl_lock usage in sync code [1] and [2] We have 2 problems in start_sync_thread if error path is taken, eg. on memory allocation error or failure to configure sockets for mcast group or addr/port binding: 1. recursive locking: holding rtnl_lock while calling sock_release which in turn calls again rtnl_lock in ip_mc_drop_socket to leave the mcast group, as noticed by Florian Westphal. Additionally, sock_release can not be called while holding sync_mutex (ABBA deadlock). 2. task hung: holding rtnl_lock while calling kthread_stop to stop the running kthreads. As the kthreads do the same to leave the mcast group (sock_release -> ip_mc_drop_socket -> rtnl_lock) they hang. Fix the problems by calling rtnl_unlock early in the error path, now sock_release is called after unlocking both mutexes. Problem 3 (task hung reported by syzkaller [2]) is variant of problem 2: use _trylock to prevent one user to call rtnl_lock and then while waiting for sync_mutex to block kthreads that execute sock_release when they are stopped by stop_sync_thread. [1] IPVS: stopping backup sync thread 4500 ... WARNING: possible recursive locking detected 4.16.0-rc7+ #3 Not tainted -------------------------------------------- syzkaller688027/4497 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<00000000bb14d7fb>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: IPVS: stopping backup sync thread 4495 ... (rtnl_mutex){+.+.}, at: [<00000000bb14d7fb>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(rtnl_mutex); lock(rtnl_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syzkaller688027/4497: #0: (rtnl_mutex){+.+.}, at: [<00000000bb14d7fb>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 #1: (ipvs->sync_mutex){+.+.}, at: [<00000000703f78e3>] do_ip_vs_set_ctl+0x10f8/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2388 stack backtrace: CPU: 1 PID: 4497 Comm: syzkaller688027 Not tainted 4.16.0-rc7+ #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x24d lib/dump_stack.c:53 print_deadlock_bug kernel/locking/lockdep.c:1761 [inline] check_deadlock kernel/locking/lockdep.c:1805 [inline] validate_chain kernel/locking/lockdep.c:2401 [inline] __lock_acquire+0xe8f/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 ip_mc_drop_socket+0x88/0x230 net/ipv4/igmp.c:2643 inet_release+0x4e/0x1c0 net/ipv4/af_inet.c:413 sock_release+0x8d/0x1e0 net/socket.c:595 start_sync_thread+0x2213/0x2b70 net/netfilter/ipvs/ip_vs_sync.c:1924 do_ip_vs_set_ctl+0x1139/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2389 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1261 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2406 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x446a69 RSP: 002b:00007fa1c3a64da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000446a69 RDX: 000000000000048b RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00000000006e29fc R08: 0000000000000018 R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 00000000006e29f8 R13: 00676e697279656b R14: 00007fa1c3a659c0 R15: 00000000006e2b60 [2] IPVS: sync thread started: state = BACKUP, mcast_ifn = syz_tun, syncid = 4, id = 0 IPVS: stopping backup sync thread 25415 ... INFO: task syz-executor7:25421 blocked for more than 120 seconds. Not tainted 4.16.0-rc6+ #284 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor7 D23688 25421 4408 0x00000004 Call Trace: context_switch kernel/sched/core.c:2862 [inline] __schedule+0x8fb/0x1ec0 kernel/sched/core.c:3440 schedule+0xf5/0x430 kernel/sched/core.c:3499 schedule_timeout+0x1a3/0x230 kernel/time/timer.c:1777 do_wait_for_common kernel/sched/completion.c:86 [inline] __wait_for_common kernel/sched/completion.c:107 [inline] wait_for_common kernel/sched/completion.c:118 [inline] wait_for_completion+0x415/0x770 kernel/sched/completion.c:139 kthread_stop+0x14a/0x7a0 kernel/kthread.c:530 stop_sync_thread+0x3d9/0x740 net/netfilter/ipvs/ip_vs_sync.c:1996 do_ip_vs_set_ctl+0x2b1/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2394 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1253 sctp_setsockopt+0x2ca/0x63e0 net/sctp/socket.c:4154 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:3039 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index b683e8e..ea6a043 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -271,3 +271,19 @@ Description: Parameters for the CPU cache attributes - WriteBack: data is written only to the cache line and the modified cache line is written to main memory only when it is replaced + +What: /sys/devices/system/cpu/vulnerabilities + /sys/devices/system/cpu/vulnerabilities/meltdown + /sys/devices/system/cpu/vulnerabilities/spectre_v1 + /sys/devices/system/cpu/vulnerabilities/spectre_v2 +Date: January 2018 +Contact: Linux kernel mailing list <linux-ker...@vger.kernel.org> +Description: Information about CPU vulnerabilities + + The files are named after the code names of CPU + vulnerabilities. The output of those files reflects the + state of the CPUs in the system. Possible output values: + + "Not affected" CPU is not affected by the vulnerability + "Vulnerable" CPU is affected and no mitigation in effect + "Mitigation: $M" CPU is affected and mitigation $M is in effect diff --git a/Documentation/Makefile b/Documentation/Makefile index bc05482..fc75959 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,4 +1,4 @@ subdir-y := accounting auxdisplay blackfin connector \ - filesystems filesystems ia64 laptops mic misc-devices \ + filesystems filesystems ia64 laptops misc-devices \ networking pcmcia prctl ptp spi timers vDSO video4linux \ watchdog diff --git a/Documentation/arm64/tagged-pointers.txt b/Documentation/arm64/tagged-pointers.txt index d9995f1..a25a99e 100644 --- a/Documentation/arm64/tagged-pointers.txt +++ b/Documentation/arm64/tagged-pointers.txt @@ -11,24 +11,56 @@ in AArch64 Linux. The kernel configures the translation tables so that translations made via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of the virtual address ignored by the translation hardware. This frees up -this byte for application use, with the following caveats: +this byte for application use. - (1) The kernel requires that all user addresses passed to EL1 - are tagged with tag 0x00. This means that any syscall - parameters containing user virtual addresses *must* have - their top byte cleared before trapping to the kernel. - (2) Non-zero tags are not preserved when delivering signals. - This means that signal handlers in applications making use - of tags cannot rely on the tag information for user virtual - addresses being maintained for fields inside siginfo_t. - One exception to this rule is for signals raised in response - to watchpoint debug exceptions, where the tag information - will be preserved. +Passing tagged addresses to the kernel +-------------------------------------- - (3) Special care should be taken when using tagged pointers, - since it is likely that C compilers will not hazard two - virtual addresses differing only in the upper byte. +All interpretation of userspace memory addresses by the kernel assumes +an address tag of 0x00. + +This includes, but is not limited to, addresses found in: + + - pointer arguments to system calls, including pointers in structures + passed to system calls, + + - the stack pointer (sp), e.g. when interpreting it to deliver a + signal, + + - the frame pointer (x29) and frame records, e.g. when interpreting + them to generate a backtrace or call graph. + +Using non-zero address tags in any of these locations may result in an +error code being returned, a (fatal) signal being raised, or other modes +of failure. + +For these reasons, passing non-zero address tags to the kernel via +system calls is forbidden, and using a non-zero address tag for sp is +strongly discouraged. + +Programs maintaining a frame pointer and frame records that use non-zero +address tags may suffer impaired or inaccurate debug and profiling +visibility. + + +Preserving tags +--------------- + +Non-zero tags are not preserved when delivering signals. This means that +signal handlers in applications making use of tags cannot rely on the +tag information for user virtual addresses being maintained for fields +inside siginfo_t. One exception to this rule is for signals raised in +response to watchpoint debug exceptions, where the tag information will +be preserved. The architecture prevents the use of a tagged PC, so the upper byte will be set to a sign-extension of bit 55 on exception return. + + +Other considerations +-------------------- + +Special care should be taken when using tagged pointers, since it is +likely that C compilers will not hazard two virtual addresses differing +only in the upper byte. diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index 8a47b77..e8c74a6 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt @@ -18,6 +18,7 @@ Required properties: "allwinner,sun4i-a10-cpu-clk" - for the CPU multiplexer clock "allwinner,sun4i-a10-axi-clk" - for the AXI clock "allwinner,sun8i-a23-axi-clk" - for the AXI clock on A23 + "allwinner,sun4i-a10-gates-clk" - for generic gates on all compatible SoCs "allwinner,sun4i-a10-axi-gates-clk" - for the AXI gates "allwinner,sun4i-a10-ahb-clk" - for the AHB clock "allwinner,sun5i-a13-ahb-clk" - for the AHB clock on A13 @@ -43,6 +44,7 @@ Required properties: "allwinner,sun6i-a31-apb0-gates-clk" - for the APB0 gates on A31 "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20 "allwinner,sun8i-a23-apb0-gates-clk" - for the APB0 gates on A23 + "allwinner,sun8i-h3-apb0-gates-clk" - for the APB0 gates on H3 "allwinner,sun9i-a80-apb0-gates-clk" - for the APB0 gates on A80 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock "allwinner,sun9i-a80-apb1-clk" - for the APB1 bus clock on A80 diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt index c261598..17d43ca 100644 --- a/Documentation/devicetree/bindings/dma/snps-dma.txt +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt @@ -58,6 +58,6 @@ Example: interrupts = <0 35 0x4>; status = "disabled"; dmas = <&dmahost 12 0 1>, - <&dmahost 13 0 1 0>; + <&dmahost 13 1 0>; dma-names = "rx", "rx"; }; diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt new file mode 100644 index 0000000..b362940 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt @@ -0,0 +1,18 @@ +* AVIA HX711 ADC chip for weight cells + Bit-banging driver + +Required properties: + - compatible: Should be "avia,hx711" + - sck-gpios: Definition of the GPIO for the clock + - dout-gpios: Definition of the GPIO for data-out + See Documentation/devicetree/bindings/gpio/gpio.txt + - avdd-supply: Definition of the regulator used as analog supply + +Example: +weight@0 { + compatible = "avia,hx711"; + sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + avdd-suppy = <&avdd>; +}; + diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt index caf297b..c28d4eb8 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-palmas.txt @@ -35,6 +35,15 @@ Optional properties: - ti,palmas-enable-dvfs2: Enable DVFS2. Configure pins for DVFS2 mode. Selection primary or secondary function associated to GPADC_START and SYSEN2 pin/pad for DVFS2 interface +- ti,palmas-override-powerhold: This is applicable for PMICs for which + GPIO7 is configured in POWERHOLD mode which has higher priority + over DEV_ON bit and keeps the PMIC supplies on even after the DEV_ON + bit is turned off. This property enables driver to over ride the + POWERHOLD value to GPIO7 so as to turn off the PMIC in power off + scenarios. So for GPIO7 if ti,palmas-override-powerhold is set + then the GPIO_7 field should never be muxed to anything else. + It should be set to POWERHOLD by default and only in case of + power off scenarios the driver will over ride the mux value. This binding uses the following generic properties as defined in pinctrl-bindings.txt: diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 55df1d4..98dc175 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -31,6 +31,7 @@ asahi-kasei Asahi Kasei Corp. atmel Atmel Corporation auo AU Optronics Corporation avago Avago Technologies +avia avia semiconductor avic Shanghai AVIC Optoelectronics Co., Ltd. axis Axis Communications AB bosch Bosch Sensortec GmbH diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 6c0108e..2139ea2 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt @@ -233,7 +233,7 @@ data_err=ignore(*) Just print an error message if an error occurs data_err=abort Abort the journal if an error occurs in a file data buffer in ordered mode. -grpid Give objects the same group ID as their creator. +grpid New objects have the group ID of their parent. bsdgroups nogrpid (*) New objects have the group ID of their creator. diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 6716413..6d2689e 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -383,32 +383,6 @@ is not associated with a file: or if empty, the mapping is anonymous. -The /proc/PID/task/TID/maps is a view of the virtual memory from the viewpoint -of the individual tasks of a process. In this file you will see a mapping marked -as [stack] if that task sees it as a stack. Hence, for the example above, the -task-level map, i.e. /proc/PID/task/TID/maps for thread 1001 will look like this: - -08048000-08049000 r-xp 00000000 03:00 8312 /opt/test -08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test -0804a000-0806b000 rw-p 00000000 00:00 0 [heap] -a7cb1000-a7cb2000 ---p 00000000 00:00 0 -a7cb2000-a7eb2000 rw-p 00000000 00:00 0 -a7eb2000-a7eb3000 ---p 00000000 00:00 0 -a7eb3000-a7ed5000 rw-p 00000000 00:00 0 [stack] -a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 -a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6 -a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6 -a800b000-a800e000 rw-p 00000000 00:00 0 -a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0 -a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0 -a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0 -a8024000-a8027000 rw-p 00000000 00:00 0 -a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2 -a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2 -a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2 -aff35000-aff4a000 rw-p 00000000 00:00 0 -ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] - The /proc/PID/smaps is an extension based on maps, showing the memory consumption for each of the process's mappings. For each of mappings there is a series of lines such as the following: diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index c360f80..4df6bd7 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1255,6 +1255,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. When zero, profiling data is discarded and associated debugfs files are removed at module unload time. + goldfish [X86] Enable the goldfish android emulator platform. + Don't use this when you are not running on the + android emulator + gpt [EFI] Forces disk with valid GPT signature but invalid Protective MBR to be treated as GPT. If the primary GPT is corrupted, it enables the backup/alternate @@ -2398,6 +2402,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. noalign [KNL,ARM] + noaltinstr [S390] Disables alternative instructions patching + (CPU alternatives feature). + noapic [SMP,APIC] Tells the kernel to not make use of any IOAPICs that may be present in the system. @@ -2448,6 +2455,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nohugeiomap [KNL,x86] Disable kernel huge I/O mappings. + nospectre_v2 [X86] Disable all mitigations for the Spectre variant 2 + (indirect branch prediction) vulnerability. System may + allow data leaks with this option, which is equivalent + to spectre_v2=off. + 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. @@ -2515,6 +2527,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nointroute [IA-64] + noinvpcid [X86] Disable the INVPCID cpu feature. + nojitter [IA-64] Disables jitter checking for ITC timers. no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver @@ -2549,11 +2563,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nopat [X86] Disable PAT (page attribute table extension of pagetables) support. + nopcid [X86-64] Disable the PCID cpu feature. + norandmaps Don't use address space randomization. Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space - noreplace-paravirt [X86,IA-64,PV_OPS] Don't patch paravirt_ops - noreplace-smp [X86-32,SMP] Don't replace SMP instructions with UP alternatives @@ -3046,6 +3060,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted. pt. [PARIDE] See Documentation/blockdev/paride.txt. + pti= [X86_64] Control Page Table Isolation of user and + kernel address spaces. Disabling this feature + removes hardening, but improves performance of + system calls and interrupts. + + on - unconditionally enable + off - unconditionally disable + auto - kernel detects whether your CPU model is + vulnerable to issues that PTI mitigates + + Not specifying this option is equivalent to pti=auto. + + nopti [X86_64] + Equivalent to pti=off + pty.legacy_count= [KNL] Number of legacy pty's. Overwrites compiled-in default number. @@ -3571,11 +3600,41 @@ bytes respectively. Such letter suffixes can also be entirely omitted. sonypi.*= [HW] Sony Programmable I/O Control Device driver See Documentation/laptops/sonypi.txt + spectre_v2= [X86] Control mitigation of Spectre variant 2 + (indirect branch speculation) vulnerability. + + on - unconditionally enable + off - unconditionally disable + auto - kernel detects whether your CPU model is + vulnerable + + Selecting 'on' will, and 'auto' may, choose a + mitigation method at run time according to the + CPU, the available microcode, the setting of the + CONFIG_RETPOLINE configuration option, and the + compiler with which the kernel was built. + + Specific mitigations can also be selected manually: + + retpoline - replace indirect branches + retpoline,generic - google's original retpoline + retpoline,amd - AMD-specific minimal thunk + + Not specifying this option is equivalent to + spectre_v2=auto. + spia_io_base= [HW,MTD] spia_fio_base= spia_pedr= spia_peddr= + stack_guard_gap= [MM] + override the default stack gap protection. The value + is in page units and it defines how many pages prior + to (for stacks growing down) resp. after (for stacks + growing up) the main stack are reserved for no other + mapping. Default value is 256 pages. + stacktrace [FTRACE] Enabled the stack tracer on boot up. diff --git a/Documentation/mic/Makefile b/Documentation/mic/Makefile deleted file mode 100644 index a191d45..0000000 --- a/Documentation/mic/Makefile +++ /dev/null @@ -1 +0,0 @@ -subdir-y := mpssd diff --git a/Documentation/mic/mpssd/.gitignore b/Documentation/mic/mpssd/.gitignore deleted file mode 100644 index 8b7c72f..0000000 --- a/Documentation/mic/mpssd/.gitignore +++ /dev/null @@ -1 +0,0 @@ -mpssd diff --git a/Documentation/mic/mpssd/Makefile b/Documentation/mic/mpssd/Makefile deleted file mode 100644 index 06871b0..0000000 --- a/Documentation/mic/mpssd/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -ifndef CROSS_COMPILE -# List of programs to build -hostprogs-$(CONFIG_X86_64) := mpssd - -mpssd-objs := mpssd.o sysfs.o - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS += -I$(objtree)/usr/include -I$(srctree)/tools/include - -ifdef DEBUG -HOSTCFLAGS += -DDEBUG=$(DEBUG) -endif - -HOSTLOADLIBES_mpssd := -lpthread - -install: - install mpssd /usr/sbin/mpssd - install micctrl /usr/sbin/micctrl -endif diff --git a/Documentation/mic/mpssd/micctrl b/Documentation/mic/mpssd/micctrl deleted file mode 100755 index 8f2629b..0000000 --- a/Documentation/mic/mpssd/micctrl +++ /dev/null @@ -1,173 +0,0 @@ -#!/bin/bash -# Intel MIC Platform Software Stack (MPSS) -# -# Copyright(c) 2013 Intel Corporation. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License, version 2, as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Intel MIC User Space Tools. -# -# micctrl - Controls MIC boot/start/stop. -# -# chkconfig: 2345 95 05 -# description: start MPSS stack processing. -# -### BEGIN INIT INFO -# Provides: micctrl -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -sysfs="/sys/class/mic" - -_status() -{ - f=$sysfs/$1 - echo -e $1 state: "`cat $f/state`" shutdown_status: "`cat $f/shutdown_status`" -} - -status() -{ - if [ "`echo $1 | head -c3`" == "mic" ]; then - _status $1 - return $? - fi - for f in $sysfs/* - do - _status `basename $f` - RETVAL=$? - [ $RETVAL -ne 0 ] && return $RETVAL - done - return 0 -} - -_reset() -{ - f=$sysfs/$1 - echo reset > $f/state -} - -reset() -{ - if [ "`echo $1 | head -c3`" == "mic" ]; then - _reset $1 - return $? - fi - for f in $sysfs/* - do - _reset `basename $f` - RETVAL=$? - [ $RETVAL -ne 0 ] && return $RETVAL - done - return 0 -} - -_boot() -{ - f=$sysfs/$1 - echo "linux" > $f/bootmode - echo "mic/uos.img" > $f/firmware - echo "mic/$1.image" > $f/ramdisk - echo "boot" > $f/state -} - -boot() -{ - if [ "`echo $1 | head -c3`" == "mic" ]; then - _boot $1 - return $? - fi - for f in $sysfs/* - do - _boot `basename $f` - RETVAL=$? - [ $RETVAL -ne 0 ] && return $RETVAL - done - return 0 -} - -_shutdown() -{ - f=$sysfs/$1 - echo shutdown > $f/state -} - -shutdown() -{ - if [ "`echo $1 | head -c3`" == "mic" ]; then - _shutdown $1 - return $? - fi - for f in $sysfs/* - do - _shutdown `basename $f` - RETVAL=$? - [ $RETVAL -ne 0 ] && return $RETVAL - done - return 0 -} - -_wait() -{ - f=$sysfs/$1 - while [ "`cat $f/state`" != "offline" -a "`cat $f/state`" != "online" ] - do - sleep 1 - echo -e "Waiting for $1 to go offline" - done -} - -wait() -{ - if [ "`echo $1 | head -c3`" == "mic" ]; then - _wait $1 - return $? - fi - # Wait for the cards to go offline - for f in $sysfs/* - do - _wait `basename $f` - RETVAL=$? - [ $RETVAL -ne 0 ] && return $RETVAL - done - return 0 -} - -if [ ! -d "$sysfs" ]; then - echo -e $"Module unloaded " - exit 3 -fi - -case $1 in - -s) - status $2 - ;; - -r) - reset $2 - ;; - -b) - boot $2 - ;; - -S) - shutdown $2 - ;; - -w) - wait $2 - ;; - *) - echo $"Usage: $0 {-s (status) |-r (reset) |-b (boot) |-S (shutdown) |-w (wait)}" - exit 2 -esac - -exit $? diff --git a/Documentation/mic/mpssd/mpss b/Documentation/mic/mpssd/mpss deleted file mode 100755 index 09ea9093..0000000 --- a/Documentation/mic/mpssd/mpss +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash -# Intel MIC Platform Software Stack (MPSS) -# -# Copyright(c) 2013 Intel Corporation. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License, version 2, as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Intel MIC User Space Tools. -# -# mpss Start mpssd. -# -# chkconfig: 2345 95 05 -# description: start MPSS stack processing. -# -### BEGIN INIT INFO -# Provides: mpss -# Required-Start: -# Required-Stop: -# Short-Description: MPSS stack control -# Description: MPSS stack control -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -exec=/usr/sbin/mpssd -sysfs="/sys/class/mic" -mic_modules="mic_host mic_x100_dma scif" - -start() -{ - [ -x $exec ] || exit 5 - - if [ "`ps -e | awk '{print $4}' | grep mpssd | head -1`" = "mpssd" ]; then - echo -e $"MPSSD already running! " - success - echo - return 0 - fi - - echo -e $"Starting MPSS Stack" - echo -e $"Loading MIC drivers:" $mic_modules - - modprobe -a $mic_modules - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - failure - echo - return $RETVAL - fi - - # Start the daemon - echo -n $"Starting MPSSD " - $exec - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - failure - echo - return $RETVAL - fi - success - echo - - sleep 5 - - # Boot the cards - micctrl -b - - # Wait till ping works - for f in $sysfs/* - do - count=100 - ipaddr=`cat $f/cmdline` - ipaddr=${ipaddr#*address,} - ipaddr=`echo $ipaddr | cut -d, -f1 | cut -d\; -f1` - while [ $count -ge 0 ] - do - echo -e "Pinging "`basename $f`" " - ping -c 1 $ipaddr &> /dev/null - RETVAL=$? - if [ $RETVAL -eq 0 ]; then - success - break - fi - sleep 1 - count=`expr $count - 1` - done - [ $RETVAL -ne 0 ] && failure || success - echo - done - return $RETVAL -} - -stop() -{ - echo -e $"Shutting down MPSS Stack: " - - # Bail out if module is unloaded - if [ ! -d "$sysfs" ]; then - echo -n $"Module unloaded " - success - echo - return 0 - fi - - # Shut down the cards. - micctrl -S - - # Wait for the cards to go offline - for f in $sysfs/* - do - while [ "`cat $f/state`" != "ready" ] - do - sleep 1 - echo -e "Waiting for "`basename $f`" to become ready" - done - done - - # Display the status of the cards - micctrl -s - - # Kill MPSSD now - echo -n $"Killing MPSSD" - killall -9 mpssd 2>/dev/null - RETVAL=$? - [ $RETVAL -ne 0 ] && failure || success - echo - return $RETVAL -} - -restart() -{ - stop - sleep 5 - start -} - -status() -{ - micctrl -s - if [ "`ps -e | awk '{print $4}' | grep mpssd | head -n 1`" = "mpssd" ]; then - echo "mpssd is running" - else - echo "mpssd is stopped" - fi - return 0 -} - -unload() -{ - if [ ! -d "$sysfs" ]; then - echo -n $"No MIC_HOST Module: " - success - echo - return - fi - - stop - - sleep 5 - echo -n $"Removing MIC drivers:" $mic_modules - modprobe -r $mic_modules - RETVAL=$? - [ $RETVAL -ne 0 ] && failure || success - echo - return $RETVAL -} - -case $1 in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - status) - status - ;; - unload) - unload - ;; - *) - echo $"Usage: $0 {start|stop|restart|status|unload}" - exit 2 -esac - -exit $? diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c deleted file mode 100644 index c99a759..0000000 --- a/Documentation/mic/mpssd/mpssd.c +++ /dev/null @@ -1,1826 +0,0 @@ -/* - * Intel MIC Platform Software Stack (MPSS) - * - * Copyright(c) 2013 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2, as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * The full GNU General Public License is included in this distribution in - * the file called "COPYING". - * - * Intel MIC User Space Tools. - */ - -#define _GNU_SOURCE - -#include <stdlib.h> -#include <fcntl.h> -#include <getopt.h> -#include <assert.h> -#include <unistd.h> -#include <stdbool.h> -#include <signal.h> -#include <poll.h> -#include <features.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/mman.h> -#include <sys/socket.h> -#include <linux/virtio_ring.h> -#include <linux/virtio_net.h> -#include <linux/virtio_console.h> -#include <linux/virtio_blk.h> -#include <linux/version.h> -#include "mpssd.h" -#include <linux/mic_ioctl.h> -#include <linux/mic_common.h> -#include <tools/endian.h> - -static void *init_mic(void *arg); - -static FILE *logfp; -static struct mic_info mic_list; - -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - -#define min_t(type, x, y) ({ \ - type __min1 = (x); \ - type __min2 = (y); \ - __min1 < __min2 ? __min1 : __min2; }) - -/* align addr on a size boundary - adjust address up/down if needed */ -#define _ALIGN_DOWN(addr, size) ((addr)&(~((size)-1))) -#define _ALIGN_UP(addr, size) _ALIGN_DOWN(addr + size - 1, size) - -/* align addr on a size boundary - adjust address up if needed */ -#define _ALIGN(addr, size) _ALIGN_UP(addr, size) - -/* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) - -#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) - -#define GSO_ENABLED 1 -#define MAX_GSO_SIZE (64 * 1024) -#define ETH_H_LEN 14 -#define MAX_NET_PKT_SIZE (_ALIGN_UP(MAX_GSO_SIZE + ETH_H_LEN, 64)) -#define MIC_DEVICE_PAGE_END 0x1000 - -#ifndef VIRTIO_NET_HDR_F_DATA_VALID -#define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */ -#endif - -static struct { - struct mic_device_desc dd; - struct mic_vqconfig vqconfig[2]; - __u32 host_features, guest_acknowledgements; - struct virtio_console_config cons_config; -} virtcons_dev_page = { - .dd = { - .type = VIRTIO_ID_CONSOLE, - .num_vq = ARRAY_SIZE(virtcons_dev_page.vqconfig), - .feature_len = sizeof(virtcons_dev_page.host_features), - .config_len = sizeof(virtcons_dev_page.cons_config), - }, - .vqconfig[0] = { - .num = htole16(MIC_VRING_ENTRIES), - }, - .vqconfig[1] = { - .num = htole16(MIC_VRING_ENTRIES), - }, -}; - -static struct { - struct mic_device_desc dd; - struct mic_vqconfig vqconfig[2]; - __u32 host_features, guest_acknowledgements; - struct virtio_net_config net_config; -} virtnet_dev_page = { - .dd = { - .type = VIRTIO_ID_NET, - .num_vq = ARRAY_SIZE(virtnet_dev_page.vqconfig), - .feature_len = sizeof(virtnet_dev_page.host_features), - .config_len = sizeof(virtnet_dev_page.net_config), - }, - .vqconfig[0] = { - .num = htole16(MIC_VRING_ENTRIES), - }, - .vqconfig[1] = { - .num = htole16(MIC_VRING_ENTRIES), - }, -#if GSO_ENABLED - .host_features = htole32( - 1 << VIRTIO_NET_F_CSUM | - 1 << VIRTIO_NET_F_GSO | - 1 << VIRTIO_NET_F_GUEST_TSO4 | - 1 << VIRTIO_NET_F_GUEST_TSO6 | - 1 << VIRTIO_NET_F_GUEST_ECN), -#else - .host_features = 0, -#endif -}; - -static const char *mic_config_dir = "/etc/mpss"; -static const char *virtblk_backend = "VIRTBLK_BACKEND"; -static struct { - struct mic_device_desc dd; - struct mic_vqconfig vqconfig[1]; - __u32 host_features, guest_acknowledgements; - struct virtio_blk_config blk_config; -} virtblk_dev_page = { - .dd = { - .type = VIRTIO_ID_BLOCK, - .num_vq = ARRAY_SIZE(virtblk_dev_page.vqconfig), - .feature_len = sizeof(virtblk_dev_page.host_features), - .config_len = sizeof(virtblk_dev_page.blk_config), - }, - .vqconfig[0] = { - .num = htole16(MIC_VRING_ENTRIES), - }, - .host_features = - htole32(1<<VIRTIO_BLK_F_SEG_MAX), - .blk_config = { - .seg_max = htole32(MIC_VRING_ENTRIES - 2), - .capacity = htole64(0), - } -}; - -static char *myname; - -static int -tap_configure(struct mic_info *mic, char *dev) -{ - pid_t pid; - char *ifargv[7]; - char ipaddr[IFNAMSIZ]; - int ret = 0; - - pid = fork(); - if (pid == 0) { - ifargv[0] = "ip"; - ifargv[1] = "link"; - ifargv[2] = "set"; - ifargv[3] = dev; - ifargv[4] = "up"; - ifargv[5] = NULL; - mpsslog("Configuring %s\n", dev); - ret = execvp("ip", ifargv); - if (ret < 0) { - mpsslog("%s execvp failed errno %s\n", - mic->name, strerror(errno)); - return ret; - } - } - if (pid < 0) { - mpsslog("%s fork failed errno %s\n", - mic->name, strerror(errno)); - return ret; - } - - ret = waitpid(pid, NULL, 0); - if (ret < 0) { - mpsslog("%s waitpid failed errno %s\n", - mic->name, strerror(errno)); - return ret; - } - - snprintf(ipaddr, IFNAMSIZ, "172.31.%d.254/24", mic->id + 1); - - pid = fork();
_______________________________________________ unionfs-cvs mailing list: http://unionfs.filesystems.org/ unionfs-cvs@fsl.cs.sunysb.edu http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs