Push to branch refs/heads/master: c50b74d886619bf0fe742a2c461530232a7dc60d --> 8719027e78c77c31d338c616265caeb25887cf84
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 | 15 + 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 | 8 +- 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_ds.c | 57 +- arch/x86/kernel/cpu/perf_event_intel_lbr.c | 11 +- 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 | 27 +- 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/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 | 25 +- 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 | 28 +- 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 + drivers/hv/hv_kvp.c | 4 + drivers/hv/hv_snapshot.c | 4 + drivers/hv/hyperv_vmbus.h | 2 +- commit 8719027e78c77c31d338c616265caeb25887cf84 Author: Greg Kroah-Hartman <gre...@linuxfoundation.org> Date: Wed May 2 07:53:43 2018 -0700 Linux 4.4.131 commit ea548dec031ee95bcfe849aeabd1590b903fe767 Author: Romain Izard <romain.izard....@gmail.com> Date: Tue Feb 23 15:54:54 2016 +0100 serial: mctrl_gpio: Add missing module license commit 82a3f87f6e80e0bf7978152021eb8938976721cb upstream. As the mctrl_gpio driver can be built as a module, it needs to have its license specified with MODULE_LICENSE. Otherwise, it cannot access required symbols exported through EXPORT_SYMBOL_GPL. Signed-off-by: Romain Izard <romain.izard....@gmail.com> Acked-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Daniel Wagner <w...@monom.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit b017e9dd4925c9e44774efb1046f93de12d4dcf4 Author: Uwe Kleine-König <u.kleine-koe...@pengutronix.de> Date: Sun Dec 13 11:30:02 2015 +0100 serial: mctrl_gpio: export mctrl_gpio_disable_ms and mctrl_gpio_init commit 4f71a2e0a282611e55bacb60b564eaef5d16c27b upstream. To be able to make use of the mctrl-gpio helper from a module these functions must be exported. This was forgotten in the commit introducing support interrupt handling for these functions (while it was done for mctrl_gpio_enable_ms, *sigh*). Fixes: ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling") Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de> Cc: Daniel Wagner <w...@monom.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit d6080794595351d35124dc1e9c2bdfa196a7d248 Author: Yazen Ghannam <yazen.ghan...@amd.com> Date: Tue Apr 3 09:02:28 2018 -0500 x86/smpboot: Don't use mwait_play_dead() on AMD systems commit da6fa7ef67f07108a1b0cb9fd9e7fcaabd39c051 upstream. Recent AMD systems support using MWAIT for C1 state. However, MWAIT will not allow deeper cstates than C1 on current systems. play_dead() expects to use the deepest state available. The deepest state available on AMD systems is reached through SystemIO or HALT. If MWAIT is available, it is preferred over the other methods, so the CPU never reaches the deepest possible state. Don't try to use MWAIT to play_dead() on AMD systems. Instead, use CPUIDLE to enter the deepest state advertised by firmware. If CPUIDLE is not available then fallback to HALT. Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com> Signed-off-by: Thomas Gleixner <t...@linutronix.de> Reviewed-by: Borislav Petkov <b...@suse.de> Cc: sta...@vger.kernel.org Cc: Yazen Ghannam <yazen.ghan...@amd.com> Link: https://lkml.kernel.org/r/20180403140228.58540-1-yazen.ghan...@amd.com Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 72b4a16e75cad1e9d20640076d9fab843fe4636e Author: Arnd Bergmann <a...@arndb.de> Date: Tue Apr 24 23:19:51 2018 +0200 x86/ipc: Fix x32 version of shmid64_ds and msqid64_ds commit 1a512c0882bd311c5b5561840fcfbe4c25b8f319 upstream. A bugfix broke the x32 shmid64_ds and msqid64_ds data structure layout (as seen from user space) a few years ago: Originally, __BITS_PER_LONG was defined as 64 on x32, so we did not have padding after the 64-bit __kernel_time_t fields, After __BITS_PER_LONG got changed to 32, applications would observe extra padding. In other parts of the uapi headers we seem to have a mix of those expecting either 32 or 64 on x32 applications, so we can't easily revert the path that broke these two structures. Instead, this patch decouples x32 from the other architectures and moves it back into arch specific headers, partially reverting the even older commit 73a2d096fdf2 ("x86: remove all now-duplicate header files"). It's not clear whether this ever made any difference, since at least glibc carries its own (correct) copy of both of these header files, so possibly no application has ever observed the definitions here. Based on a suggestion from H.J. Lu, I tried out the tool from https://github.com/hjl-tools/linux-header to find other such bugs, which pointed out the same bug in statfs(), which also has a separate (correct) copy in glibc. Fixes: f4b4aae18288 ("x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds") Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Thomas Gleixner <t...@linutronix.de> Cc: "H . J . Lu" <hjl.to...@gmail.com> Cc: Jeffrey Walton <noloa...@gmail.com> Cc: sta...@vger.kernel.org Cc: "H. Peter Anvin" <h...@zytor.com> Link: https://lkml.kernel.org/r/20180424212013.3967461-1-a...@arndb.de Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 0c6679b05baec7506463b1c972ca739463536cbf Author: Ilya Dryomov <idryo...@gmail.com> Date: Tue Apr 24 19:10:55 2018 +0200 libceph: validate con->state at the top of try_write() commit 9c55ad1c214d9f8c4594ac2c3fa392c1c32431a7 upstream. ceph_con_workfn() validates con->state before calling try_read() and then try_write(). However, try_read() temporarily releases con->mutex, notably in process_message() and ceph_con_in_msg_alloc(), opening the window for ceph_con_close() to sneak in, close the connection and release con->sock. When try_write() is called on the assumption that con->state is still valid (i.e. not STANDBY or CLOSED), a NULL sock gets passed to the networking stack: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 IP: selinux_socket_sendmsg+0x5/0x20 Make sure con->state is valid at the top of try_write() and add an explicit BUG_ON for this, similar to try_read(). Cc: sta...@vger.kernel.org Link: https://tracker.ceph.com/issues/23706 Signed-off-by: Ilya Dryomov <idryo...@gmail.com> Reviewed-by: Jason Dillaman <dilla...@redhat.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 599c76c923309bfc5aa54b593c7c52a2ce82df3e Author: Nicolin Chen <nicoleots...@gmail.com> Date: Sun Apr 8 16:57:35 2018 -0700 ASoC: fsl_esai: Fix divisor calculation failure at lower ratio commit c656941df9bc80f7ec65b92ca73c42f8b0b62628 upstream. When the desired ratio is less than 256, the savesub (tolerance) in the calculation would become 0. This will then fail the loop- search immediately without reporting any errors. But if the ratio is smaller enough, there is no need to calculate the tolerance because PM divisor alone is enough to get the ratio. So a simple fix could be just to set PM directly instead of going into the loop-search. Reported-by: Marek Vasut <ma...@denx.de> Signed-off-by: Nicolin Chen <nicoleots...@gmail.com> Tested-by: Marek Vasut <ma...@denx.de> Reviewed-by: Fabio Estevam <fabio.este...@nxp.com> Signed-off-by: Mark Brown <broo...@kernel.org> Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 30a80ca6dbbda67b0c902448993ed6a35b52612a Author: Geert Uytterhoeven <geert+rene...@glider.be> Date: Tue Apr 10 15:21:45 2018 +0200 ARM: amba: Don't read past the end of sysfs "driver_override" buffer commit d2ffed5185df9d8d9ccd150e4340e3b6f96a8381 upstream. When printing the driver_override parameter when it is 4095 and 4094 bytes long, the printing code would access invalid memory because we need count + 1 bytes for printing. Cfr. commits 4efe874aace57dba ("PCI: Don't read past the end of sysfs "driver_override" buffer") and bf563b01c2895a4b ("driver core: platform: Don't read past the end of "driver_override" buffer"). Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> Reviewed-by: Todd Kjos <tk...@google.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 7488404d3bab4eccb590c80c8827520394444630 Author: Geert Uytterhoeven <geert+rene...@glider.be> Date: Tue Apr 10 15:21:44 2018 +0200 ARM: amba: Fix race condition with driver_override commit 6a7228d90d42bcacfe38786756ba62762b91c20a upstream. The driver_override implementation is susceptible to a race condition when different threads are reading vs storing a different driver override. Add locking to avoid this race condition. Cfr. commits 6265539776a0810b ("driver core: platform: fix race condition with driver_override") and 9561475db680f714 ("PCI: Fix race condition with driver_override"). Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> Reviewed-by: Todd Kjos <tk...@google.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 0448fd9403b4d77bd4aebc4e892db871d74850c8 Author: Geert Uytterhoeven <geert+rene...@glider.be> Date: Tue Apr 10 15:21:43 2018 +0200 ARM: amba: Make driver_override output consistent with other buses commit 5f53624662eaac89598641cee6cd54fc192572d9 upstream. For AMBA devices with unconfigured driver override, the "driver_override" sysfs virtual file is empty, while it contains "(null)" for platform and PCI devices. Make AMBA consistent with other buses by dropping the test for a NULL pointer. Note that contrary to popular belief, sprintf() handles NULL pointers fine; they are printed as "(null)". Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> Cc: stable <sta...@vger.kernel.org> Reviewed-by: Todd Kjos <tk...@google.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 634602948de7dd0e04a0160f7d24eaad2eaa2b01 Author: Mahesh Rajashekhara <mahesh.rajashekh...@microsemi.com> Date: Tue Apr 17 17:03:12 2018 +0530 scsi: sd: Defer spinning up drive while SANITIZE is in progress commit 505aa4b6a8834a2300971c5220c380c3271ebde3 upstream. A drive being sanitized will return NOT READY / ASC 0x4 / ASCQ 0x1b ("LOGICAL UNIT NOT READY. SANITIZE IN PROGRESS"). Prevent spinning up the drive until this condition clears. [mkp: tweaked commit message] Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekh...@microsemi.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit abb841c5e943316bbf74ddb27d188813b3cba0d9 Author: Dmitry Vyukov <dvyu...@google.com> Date: Wed Apr 11 17:22:43 2018 +0200 kobject: don't use WARN for registration failures commit 3e14c6abbfb5c94506edda9d8e2c145d79375798 upstream. This WARNING proved to be noisy. The function still returns an error and callers should handle it. That's how most of kernel code works. Downgrade the WARNING to pr_err() and leave WARNINGs for kernel bugs. Signed-off-by: Dmitry Vyukov <dvyu...@google.com> Reported-by: syzbot+209c0f67f99fec8eb...@syzkaller.appspotmail.com Reported-by: syzbot+7fb6d9525a4528104...@syzkaller.appspotmail.com Reported-by: syzbot+2e63711063e2d8f9e...@syzkaller.appspotmail.com Reported-by: syzbot+de73361ee4971b6e6...@syzkaller.appspotmail.com Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit fc1584670f289d3cc9e2c17c0d6ba3a24ae5b785 Author: Joakim Tjernlund <joakim.tjernl...@infinera.com> Date: Thu Mar 1 14:39:41 2018 +0100 mtd: cfi: cmdset_0002: Do not allow read/write to suspend erase block. commit 7b70eb14392a7cf505f9b358d06c33b5af73d1e7 upstream. Currently it is possible to read and/or write to suspend EB's. Writing /dev/mtdX or /dev/mtdblockX from several processes may break the flash state machine. Taken from cfi_cmdset_0001 driver. Signed-off-by: Joakim Tjernlund <joakim.tjernl...@infinera.com> Cc: <sta...@vger.kernel.org> Reviewed-by: Richard Weinberger <rich...@nod.at> Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit d519eb768c1e17f1494d539eafdc6c4f0ba318b2 Author: Joakim Tjernlund <joakim.tjernl...@transmode.se> Date: Thu Mar 1 14:39:40 2018 +0100 mtd: cfi: cmdset_0001: Workaround Micron Erase suspend bug. commit 46a16a2283f9e678a4e26829175e0c37a5191860 upstream. Some Micron chips does not work well wrt Erase suspend for boot blocks. This avoids the issue by not allowing Erase suspend for the boot blocks for the 28F00AP30(1GBit) chip. Signed-off-by: Joakim Tjernlund <joakim.tjernl...@infinera.com> Cc: <sta...@vger.kernel.org> Reviewed-by: Richard Weinberger <rich...@nod.at> Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 869a31dfe4187038fe3b6033e70141a5e5739ada Author: Joakim Tjernlund <joakim.tjernl...@transmode.se> Date: Thu Mar 1 14:39:39 2018 +0100 mtd: cfi: cmdset_0001: Do not allow read/write to suspend erase block. commit 6510bbc88e3258631831ade49033537081950605 upstream. Currently it is possible to read and/or write to suspend EB's. Writing /dev/mtdX or /dev/mtdblockX from several processes may break the flash state machine. Signed-off-by: Joakim Tjernlund <joakim.tjernl...@infinera.com> Cc: <sta...@vger.kernel.org> Reviewed-by: Richard Weinberger <rich...@nod.at> Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 13169025cf309886a73c9b4a75fac8505162be98 Author: Kailang Yang <kail...@realtek.com> Date: Wed Apr 25 15:31:52 2018 +0800 ALSA: hda/realtek - Add some fixes for ALC233 commit ea04a1dbf8b1d6af759d58e705636fde48583f8f upstream. Fill COEF to change EAPD to verb control. Assigned codec type. This is an additional fix over 92f974df3460 ("ALSA: hda/realtek - New vendor ID for ALC233"). [ More notes: according to Kailang, the chip is 10ec:0235 bonding for ALC233b, which is equivalent with ALC255. It's only used for Lenovo. The chip needs no alc_process_coef_fw() for headset unlike ALC255. ] Signed-off-by: Kailang Yang <kail...@realtek.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit bd54c1122356e73d2421097e82768b57a7f8b478 Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 07:50:50 2018 +0200 ALSA: hda: Hardening for potential Spectre v1 commit 69fa6f19b95597618ab30438a27b67ad93daa7c7 upstream. As recently Smatch suggested, one place in HD-audio hwdep ioctl codes may expand the array directly from the user-space value with speculation: sound/pci/hda/hda_local.h:467 get_wcaps() warn: potential spectre issue 'codec->wcaps' As get_wcaps() itself is a fairly frequently called inline function, and there is only one single call with a user-space value, we replace only the latter one to open-code locally with array_index_nospec() hardening in this patch. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 8cff710ea7d3ae35bdc799ef0f09639ffa459965 Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 07:31:54 2018 +0200 ALSA: seq: oss: Hardening for potential Spectre v1 commit 8d218dd8116695ecda7164f97631c069938aa22e upstream. As Smatch recently suggested, a few places in OSS sequencer codes may expand the array directly from the user-space value with speculation, namely there are a significant amount of references to either info->ch[] or dp->synths[] array: sound/core/seq/oss/seq_oss_event.c:315 note_on_event() warn: potential spectre issue 'info->ch' (local cap) sound/core/seq/oss/seq_oss_event.c:362 note_off_event() warn: potential spectre issue 'info->ch' (local cap) sound/core/seq/oss/seq_oss_synth.c:470 snd_seq_oss_synth_load_patch() warn: potential spectre issue 'dp->synths' (local cap) sound/core/seq/oss/seq_oss_event.c:293 note_on_event() warn: potential spectre issue 'dp->synths' sound/core/seq/oss/seq_oss_event.c:353 note_off_event() warn: potential spectre issue 'dp->synths' sound/core/seq/oss/seq_oss_synth.c:506 snd_seq_oss_synth_sysex() warn: potential spectre issue 'dp->synths' sound/core/seq/oss/seq_oss_synth.c:580 snd_seq_oss_synth_ioctl() warn: potential spectre issue 'dp->synths' Although all these seem doing only the first load without further reference, we may want to stay in a safer side, so hardening with array_index_nospec() would still make sense. We may put array_index_nospec() at each place, but here we take a different approach: - For dp->synths[], change the helpers to retrieve seq_oss_synthinfo pointer directly instead of the array expansion at each place - For info->ch[], harden in a normal way, as there are only a couple of places As a result, the existing helper, snd_seq_oss_synth_is_valid() is replaced with snd_seq_oss_synth_info(). Also, we cover MIDI device where a similar array expansion is done, too, although it wasn't reported by Smatch. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 37d11f6e286d975be4a21b02f159ff0594a266f5 Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 07:26:59 2018 +0200 ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device commit f5e94b4c6ebdabe0f602d796e0430180927521a0 upstream. When get_synthdev() is called for a MIDI device, it returns the fixed midi_synth_dev without the use refcounting. OTOH, the caller is supposed to unreference unconditionally after the usage, so this would lead to unbalanced refcount. This patch corrects the behavior and keep up the refcount balance also for the MIDI synth device. Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 10a249ca58c99e0980383fbc4ec7be7506283b30 Author: David Henningsson <di...@ubuntu.com> Date: Sat Apr 21 14:57:40 2018 +0200 ALSA: core: Report audio_tstamp in snd_pcm_sync_ptr commit f853dcaae2f5bbe021161e421bd1576845bae8f6 upstream. It looks like a simple mistake that this struct member was forgotten. Audio_tstamp isn't used much, and on some archs (such as x86) this ioctl is not used by default, so that might be the reason why this has slipped for so long. Fixes: 4eeaaeaea1ce ("ALSA: core: add hooks for audio timestamps") Signed-off-by: David Henningsson <di...@ubuntu.com> Reviewed-by: Takashi Sakamoto <o-taka...@sakamocchi.jp> Cc: <sta...@vger.kernel.org> # v3.8+ Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 210392f6093fa65483a25a77d4397f1654c067bd Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 07:45:56 2018 +0200 ALSA: control: Hardening for potential Spectre v1 commit 088e861edffb84879cf0c0d1b02eda078c3a0ffe upstream. As recently Smatch suggested, a few places in ALSA control core codes may expand the array directly from the user-space value with speculation: sound/core/control.c:1003 snd_ctl_elem_lock() warn: potential spectre issue 'kctl->vd' sound/core/control.c:1031 snd_ctl_elem_unlock() warn: potential spectre issue 'kctl->vd' sound/core/control.c:844 snd_ctl_elem_info() warn: potential spectre issue 'kctl->vd' sound/core/control.c:891 snd_ctl_elem_read() warn: potential spectre issue 'kctl->vd' sound/core/control.c:939 snd_ctl_elem_write() warn: potential spectre issue 'kctl->vd' Although all these seem doing only the first load without further reference, we may want to stay in a safer side, so hardening with array_index_nospec() would still make sense. In this patch, we put array_index_nospec() to the common snd_ctl_get_ioff*() helpers instead of each caller. These helpers are also referred from some drivers, too, and basically all usages are to calculate the array index from the user-space value, hence it's better to cover there. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 4984b8bb89fc7d0f0415b4a48fc07333f7b7bbca Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 08:04:41 2018 +0200 ALSA: rme9652: Hardening for potential Spectre v1 commit f526afcd8f71945c23ce581d7864ace93de8a4f7 upstream. As recently Smatch suggested, one place in RME9652 driver may expand the array directly from the user-space value with speculation: sound/pci/rme9652/rme9652.c:2074 snd_rme9652_channel_info() warn: potential spectre issue 'rme9652->channel_map' (local cap) This patch puts array_index_nospec() for hardening against it. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 7625e9fd5fa9862bce433a36a42d7364e4a6ba3f Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 08:03:14 2018 +0200 ALSA: hdspm: Hardening for potential Spectre v1 commit 10513142a7114d251670361ad40cba2c61403406 upstream. As recently Smatch suggested, a couple of places in HDSP MADI driver may expand the array directly from the user-space value with speculation: sound/pci/rme9652/hdspm.c:5717 snd_hdspm_channel_info() warn: potential spectre issue 'hdspm->channel_map_out' (local cap) sound/pci/rme9652/hdspm.c:5734 snd_hdspm_channel_info() warn: potential spectre issue 'hdspm->channel_map_in' (local cap) This patch puts array_index_nospec() for hardening against them. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 257e7b73ffb602eebc940f6bd5415355d32d293c Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 08:01:48 2018 +0200 ALSA: asihpi: Hardening for potential Spectre v1 commit f9d94b57e30fd1575b4935045b32d738668aa74b upstream. As recently Smatch suggested, a couple of places in ASIHPI driver may expand the array directly from the user-space value with speculation: sound/pci/asihpi/hpimsginit.c:70 hpi_init_response() warn: potential spectre issue 'res_size' (local cap) sound/pci/asihpi/hpioctl.c:189 asihpi_hpi_ioctl() warn: potential spectre issue 'adapters' This patch puts array_index_nospec() for hardening against them. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 0f3234318b2817683433d6cc9d1c9d98d9770aa3 Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 07:56:07 2018 +0200 ALSA: opl3: Hardening for potential Spectre v1 commit 7f054a5bee0987f1e2d4e59daea462421c76f2cb upstream. As recently Smatch suggested, one place in OPL3 driver may expand the array directly from the user-space value with speculation: sound/drivers/opl3/opl3_synth.c:476 snd_opl3_set_voice() warn: potential spectre issue 'snd_opl3_regmap' This patch puts array_index_nospec() for hardening against it. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 7717f4f8de215aaad8dca8cd2575f30ad282a082 Author: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> Date: Wed Apr 25 20:12:31 2018 +0900 tty: Use __GFP_NOFAIL for tty_ldisc_get() commit bcdd0ca8cb8730573afebcaae4138f8f4c8eaa20 upstream. syzbot is reporting crashes triggered by memory allocation fault injection at tty_ldisc_get() [1]. As an attempt to handle OOM in a graceful way, we have tried commit 5362544bebe85071 ("tty: don't panic on OOM in tty_set_ldisc()"). But we reverted that attempt by commit a8983d01f9b7d600 ("Revert "tty: don't panic on OOM in tty_set_ldisc()"") due to reproducible crash. We should spend resource for finding and fixing race condition bugs rather than complicate error paths for 2 * sizeof(void *) bytes allocation failure. [1] https://syzkaller.appspot.com/bug?id=489d33fa386453859ead58ff5171d43772b13aa3 Signed-off-by: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> Reported-by: syzbot <syzbot+40b7287c2dc987c48...@syzkaller.appspotmail.com> Cc: Michal Hocko <mho...@suse.com> Cc: Vegard Nossum <vegard.nos...@gmail.com> Cc: Dmitry Vyukov <dvyu...@google.com> Cc: Jiri Slaby <jsl...@suse.com> Cc: Peter Hurley <pe...@hurleysoftware.com> Cc: One Thousand Gnomes <gno...@lxorguk.ukuu.org.uk> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit c37a5d3c70cc07f77a5805e69ab46841f7c1c839 Author: Tony Lindgren <t...@atomide.com> Date: Sat Apr 7 10:19:51 2018 -0700 tty: n_gsm: Fix DLCI handling for ADM mode if debug & 2 is not set commit b2d89ad9c9682e795ed6eeb9ed455789ad6cedf1 upstream. At least on droid 4 with control channel in ADM mode, there is no response to Modem Status Command (MSC). Currently gsmtty_modem_update() expects to have data in dlci->modem_rx unless debug & 2 is set. This means that on droid 4, things only work if debug & 2 is set. Let's fix the issue by ignoring empty dlci->modem_rx for ADM mode. In the AMD mode, CMD_MSC will never respond and gsm_process_modem() won't get called to set dlci->modem_rx. And according to ts_127010v140000p.pdf, MSC is only relevant if basic option is chosen, so let's test for that too. Fixes: ea3d8465ab9b ("tty: n_gsm: Allow ADM response in addition to UA for control dlci") Cc: linux-ser...@vger.kernel.org Cc: Alan Cox <alan@llwyncelyn.cymru> Cc: Dan Williams <d...@redhat.com> Cc: Jiri Prchal <jiri.prc...@aksignal.cz> Cc: Jiri Slaby <jsl...@suse.cz> Cc: Marcel Partap <mpar...@gmx.net> Cc: Merlijn Wajer <merl...@wizzup.org> Cc: Michael Nazzareno Trimarchi <mich...@amarulasolutions.com> Cc: Michael Scott <michael.sc...@linaro.org> Cc: Pavel Machek <pa...@ucw.cz> Cc: Peter Hurley <pe...@hurleysoftware.com> Cc: Russ Gorby <russ.go...@intel.com> Cc: Sascha Hauer <s.ha...@pengutronix.de> Cc: Sebastian Reichel <s...@kernel.org> Signed-off-by: Tony Lindgren <t...@atomide.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 9c389e2be2741da9cba7c572c3e2ab47ed445cce Author: Tony Lindgren <t...@atomide.com> Date: Sat Apr 7 10:19:50 2018 -0700 tty: n_gsm: Fix long delays with control frame timeouts in ADM mode commit e9ec22547986dd32c5c70da78107ce35dbff1344 upstream. Commit ea3d8465ab9b ("tty: n_gsm: Allow ADM response in addition to UA for control dlci") added support for DLCI to stay in Asynchronous Disconnected Mode (ADM). But we still get long delays waiting for commands to other DLCI to complete: --> 5) C: SABM(P) Q> 0) C: UIH(F) Q> 0) C: UIH(F) Q> 0) C: UIH(F) ... This happens because gsm_control_send() sets cretries timer to T2 that is by default set to 34. This will cause resend for T2 times for the control frame. In ADM mode, we will never get a response so the control frame, so retries are just delaying all the commands. Let's fix the issue by setting DLCI_MODE_ADM flag after detecting the ADM mode for the control DLCI. Then we can use that in gsm_control_send() to set retries to 1. This means the control frame will be sent once allowing the other end at an opportunity to switch from ADM to ABM mode. Note that retries will be decremented in gsm_control_retransmit() so we don't want to set it to 0 here. Fixes: ea3d8465ab9b ("tty: n_gsm: Allow ADM response in addition to UA for control dlci") Cc: linux-ser...@vger.kernel.org Cc: Alan Cox <alan@llwyncelyn.cymru> Cc: Dan Williams <d...@redhat.com> Cc: Jiri Prchal <jiri.prc...@aksignal.cz> Cc: Jiri Slaby <jsl...@suse.cz> Cc: Marcel Partap <mpar...@gmx.net> Cc: Merlijn Wajer <merl...@wizzup.org> Cc: Michael Nazzareno Trimarchi <mich...@amarulasolutions.com> Cc: Michael Scott <michael.sc...@linaro.org> Cc: Pavel Machek <pa...@ucw.cz> Cc: Peter Hurley <pe...@hurleysoftware.com> Cc: Russ Gorby <russ.go...@intel.com> Cc: Sascha Hauer <s.ha...@pengutronix.de> Cc: Sebastian Reichel <s...@kernel.org> Signed-off-by: Tony Lindgren <t...@atomide.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit ed7d4b0c4aaa64190be153f3813540e263a201a2 Author: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> Date: Thu Apr 5 19:40:16 2018 +0900 tty: Don't call panic() at tty_ldisc_init() commit 903f9db10f18f735e62ba447147b6c434b6af003 upstream. syzbot is reporting kernel panic [1] triggered by memory allocation failure at tty_ldisc_get() from tty_ldisc_init(). But since both tty_ldisc_get() and caller of tty_ldisc_init() can cleanly handle errors, tty_ldisc_init() does not need to call panic() when tty_ldisc_get() failed. [1] https://syzkaller.appspot.com/bug?id=883431818e036ae6a9981156a64b821110f39187 Signed-off-by: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> Reported-by: syzbot <syzkal...@googlegroups.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Jiri Slaby <jsl...@suse.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 7aa90727fda6943274224bc8dde19d346b60ee3f Author: Gerd Hoffmann <kra...@redhat.com> Date: Tue Apr 3 11:59:04 2018 +0200 drm/virtio: fix vq wait_event condition commit d02d270014f70dcab0117776b81a37b6fca745ae upstream. Wait until we have enough space in the virt queue to actually queue up our request. Avoids the guest spinning in case we have a non-zero amount of free entries but not enough for the request. Cc: sta...@vger.kernel.org Reported-by: Alain Magloire <amaglo...@blackberry.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Reviewed-by: Dave Airlie <airl...@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180403095904.11152-1-kra...@redhat.com Signed-off-by: Sean Paul <seanp...@chromium.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit dd807a784fd36f4136516d5858efb6473dda422c Author: Michael S. Tsirkin <m...@redhat.com> Date: Fri Apr 20 20:24:23 2018 +0300 virtio_console: free buffers after reset commit a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b upstream. Console driver is out of spec. The spec says: A driver MUST NOT decrement the available idx on a live virtqueue (ie. there is no way to âunexposeâ buffers). and it does exactly that by trying to detach unused buffers without doing a device reset first. Defer detaching the buffers until device unplug. Of course this means we might get an interrupt for a vq without an attached port now. Handle that by discarding the consumed buffer. Reported-by: Tiwei Bie <tiwei....@intel.com> Fixes: b3258ff1d6 ("virtio: Decrement avail idx on buffer detach") Cc: sta...@vger.kernel.org Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit a4fc9c518e70c6e1c9c897a99b028795235d83ca Author: Michael S. Tsirkin <m...@redhat.com> Date: Fri Apr 20 20:22:40 2018 +0300 virtio: add ability to iterate over vqs commit 24a7e4d20783c0514850f24a5c41ede46ab058f0 upstream. For cleanup it's helpful to be able to simply scan all vqs and discard all data. Add an iterator to do that. Cc: sta...@vger.kernel.org Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 311a886f34311e575f7f911ebdbcbba9f05a498e Author: Takashi Iwai <ti...@suse.de> Date: Tue Apr 24 11:11:48 2018 +0200 ALSA: usb-audio: Skip broken EU on Dell dock USB-audio commit 1d8d6428d1da642ddd75b0be2d1bb1123ff8e017 upstream. The Dell Dock USB-audio device with 0bda:4014 is behaving notoriously bad, and we have already applied some workaround to avoid the firmware hiccup. Yet we still need to skip one thing, the Extension Unit at ID 4, which doesn't react correctly to the mixer ctl access. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1090658 Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit d2a2cc40f2413643bc0a15fe102365a3c466bb82 Author: Ravi Chandra Sadineni <ravisadin...@chromium.org> Date: Fri Apr 20 11:08:21 2018 -0700 USB: Increment wakeup count on remote wakeup. commit 83a62c51ba7b3c0bf45150c4eac7aefc6c785e94 upstream. On chromebooks we depend on wakeup count to identify the wakeup source. But currently USB devices do not increment the wakeup count when they trigger the remote wake. This patch addresses the same. Resume condition is reported differently on USB 2.0 and USB 3.0 devices. On USB 2.0 devices, a wake capable device, if wake enabled, drives resume signal to indicate a remote wake (USB 2.0 spec section 7.1.7.7). The upstream facing port then sets C_PORT_SUSPEND bit and reports a port change event (USB 2.0 spec section 11.24.2.7.2.3). Thus if a port has resumed before driving the resume signal from the host and C_PORT_SUSPEND is set, then the device attached to the given port might be the reason for the last system wakeup. Increment the wakeup count for the same. On USB 3.0 devices, a function may signal that it wants to exit from device suspend by sending a Function Wake Device Notification to the host (USB3.0 spec section 8.5.6.4) Thus on receiving the Function Wake, increment the wakeup count. Signed-off-by: Ravi Chandra Sadineni <ravisadin...@chromium.org> Acked-by: Alan Stern <st...@rowland.harvard.edu> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 46aba9fa5b7c79631b6a8e5dbb86d9db7882f9be Author: Kamil Lulko <kamilx.lu...@intel.com> Date: Thu Apr 19 16:54:02 2018 -0700 usb: core: Add quirk for HP v222w 16GB Mini commit 3180dabe08e3653bf0a838553905d88f3773f29c upstream. Add DELAY_INIT quirk to fix the following problem with HP v222w 16GB Mini: usb 1-3: unable to read config index 0 descriptor/start: -110 usb 1-3: can't read configurations, error -110 usb 1-3: can't set config #1, error -110 Signed-off-by: Kamil Lulko <kamilx.lu...@intel.com> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppusw...@linux.intel.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit d6ccb61e3d86174bf182913bad26fe6e1ede3659 Author: Kyle Roeschley <kyle.roesch...@ni.com> Date: Mon Apr 9 10:23:55 2018 -0500 USB: serial: cp210x: add ID for NI USB serial console commit 1e23aace21515a8f7615a1de016c0ea8d4e0cc6e upstream. Added the USB VID and PID for the USB serial console on some National Instruments devices. Signed-off-by: Kyle Roeschley <kyle.roesch...@ni.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Johan Hovold <jo...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 8713dc52928d8b0df4ac21396ab794917b7b7d4b Author: Vasyl Vavrychuk <vvavryc...@gmail.com> Date: Wed Apr 11 17:05:13 2018 +0300 USB: serial: ftdi_sio: use jtag quirk for Arrow USB Blaster commit 470b5d6f0cf4674be2d1ec94e54283a1770b6a1a upstream. Arrow USB Blaster integrated on MAX1000 board uses the same vendor ID (0x0403) and product ID (0x6010) as the "original" FTDI device. This patch avoids picking up by ftdi_sio of the first interface of this USB device. After that this device can be used by Arrow user-space JTAG driver. Signed-off-by: Vasyl Vavrychuk <vvavryc...@gmail.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Johan Hovold <jo...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 0964d65e05ea80a6464629b20a16e49373f14a44 Author: Collin May <col...@collinswebsite.com> Date: Sat Apr 7 14:32:48 2018 -0700 USB: serial: simple: add libtransistor console commit fe710508b6ba9d28730f3021fed70e7043433b2e upstream. Add simple driver for libtransistor USB console. This device is implemented in software: https://github.com/reswitched/libtransistor/blob/development/lib/usb_serial.c Signed-off-by: Collin May <col...@collinswebsite.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Johan Hovold <jo...@kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit c4e4036903ac3c6cd9cba06cd0dffb9a9aa4b069 Author: Shuah Khan <shua...@osg.samsung.com> Date: Mon Apr 2 14:52:32 2018 -0600 usbip: vhci_hcd: Fix usb device and sockfd leaks commit 9020a7efe537856eb3e826ebebdf38a5d07a7857 upstream. vhci_hcd fails to do reset to put usb device and sockfd in the module remove/stop paths. Fix the leak. Signed-off-by: Shuah Khan <shua...@osg.samsung.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 50d26a47c13e6d7c96b6e250593ec2d1f4123258 Author: Shuah Khan <shua...@osg.samsung.com> Date: Thu Apr 5 16:29:04 2018 -0600 usbip: usbip_host: fix to hold parent lock for device_attach() calls commit 4bfb141bc01312a817d36627cc47c93f801c216d upstream. usbip_host calls device_attach() without holding dev->parent lock. Fix it. Signed-off-by: Shuah Khan <shua...@osg.samsung.com> Cc: stable <sta...@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 629433b4f9bad7da26a30e84e6eeb59e3ef41a16 Author: Lukas Czerner <lczer...@redhat.com> Date: Tue Apr 24 11:31:44 2018 -0400 ext4: fix bitmap position validation commit 22be37acce25d66ecf6403fc8f44df9c5ded2372 upstream. Currently in ext4_valid_block_bitmap() we expect the bitmap to be positioned anywhere between 0 and s_blocksize clusters, but that's wrong because the bitmap can be placed anywhere in the block group. This causes false positives when validating bitmaps on perfectly valid file system layouts. Fix it by checking whether the bitmap is within the group boundary. The problem can be reproduced using the following mkfs -t ext3 -E stride=256 /dev/vdb1 mount /dev/vdb1 /mnt/test cd /mnt/test wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.xz tar xf linux-4.16.3.tar.xz This will result in the warnings in the logs EXT4-fs error (device vdb1): ext4_validate_block_bitmap:399: comm tar: bg 84: block 2774529: invalid block bitmap [ Changed slightly for clarity and to not drop a overflow test -- TYT ] Signed-off-by: Lukas Czerner <lczer...@redhat.com> Signed-off-by: Theodore Ts'o <ty...@mit.edu> Reported-by: Ilya Dryomov <idryo...@gmail.com> Fixes: 7dac4a1726a9 ("ext4: add validity checks for bitmap block numbers") Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit ea057aed06d8f13d931652bc4faa604ac0c50aa2 Author: Theodore Ts'o <ty...@mit.edu> Date: Mon Mar 26 23:54:10 2018 -0400 ext4: add validity checks for bitmap block numbers commit 7dac4a1726a9c64a517d595c40e95e2d0d135f6f upstream. An privileged attacker can cause a crash by mounting a crafted ext4 image which triggers a out-of-bounds read in the function ext4_valid_block_bitmap() in fs/ext4/balloc.c. This issue has been assigned CVE-2018-1093. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199181 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1560782 Reported-by: Wen Xu <wen...@gatech.edu> Signed-off-by: Theodore Ts'o <ty...@mit.edu> Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 47757f587b676902a6b4a9f4023eb02b71fbf281 Author: Theodore Ts'o <ty...@mit.edu> Date: Wed Apr 18 11:49:31 2018 -0400 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