Push to branch refs/heads/wrapfs: 4addd7ea86a57f9263c563fa613eb5f4fe869bff --> 8ace8cc5be95f939a49f712ca1abf4954131d86a
Documentation/Makefile | 2 +- Documentation/arm64/tagged-pointers.txt | 62 +- Documentation/devicetree/bindings/arm/davinci.txt | 4 + .../bindings/display/bridge/ti,ths8135.txt | 46 + Documentation/devicetree/bindings/dma/snps-dma.txt | 2 +- .../devicetree/bindings/pinctrl/pinctrl-palmas.txt | 9 + .../devicetree/bindings/vendor-prefixes.txt | 1 + Documentation/filesystems/ext4.txt | 2 +- Documentation/filesystems/proc.txt | 31 +- Documentation/kernel-parameters.txt | 7 + Documentation/mic/Makefile | 1 - Documentation/mic/mpssd/.gitignore | 1 - Documentation/mic/mpssd/Makefile | 19 - Documentation/mic/mpssd/micctrl | 173 -- Documentation/mic/mpssd/mpss | 202 --- Documentation/mic/mpssd/mpssd.c | 1728 -------------------- Documentation/mic/mpssd/mpssd.h | 102 -- Documentation/mic/mpssd/sysfs.c | 102 -- Documentation/networking/netlink_mmap.txt | 339 ---- Documentation/sysctl/kernel.txt | 15 +- Makefile | 8 +- arch/alpha/include/asm/word-at-a-time.h | 2 + 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/Kbuild | 1 + arch/arc/kernel/entry.S | 6 + 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/am4372.dtsi | 6 +- arch/arm/boot/dts/at91-sama5d3_xplained.dts | 5 +- arch/arm/boot/dts/at91sam9g25.dtsi | 2 +- arch/arm/boot/dts/bcm5301x.dtsi | 4 +- arch/arm/boot/dts/dra7-evm.dts | 2 + arch/arm/boot/dts/dra7.dtsi | 2 + arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 1 + arch/arm/boot/dts/kirkwood-openblocks_a7.dts | 10 +- 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/r8a7790.dtsi | 7 +- arch/arm/boot/dts/r8a7791.dtsi | 7 +- arch/arm/boot/dts/s5pv210.dtsi | 1 + 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/configs/exynos_defconfig | 7 + arch/arm/configs/omap2plus_defconfig | 1 + arch/arm/include/asm/Kbuild | 1 - arch/arm/include/asm/floppy.h | 2 +- arch/arm/include/asm/ftrace.h | 18 + arch/arm/include/asm/kvm_arm.h | 4 +- arch/arm/include/asm/psci.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/head-nommu.S | 20 +- arch/arm/kernel/pj4-cp0.c | 4 + arch/arm/kernel/traps.c | 28 +- arch/arm/kvm/handle_exit.c | 19 +- arch/arm/kvm/init.S | 5 +- arch/arm/kvm/mmu.c | 15 + arch/arm/mach-cns3xxx/Makefile | 1 + arch/arm/mach-davinci/devices-da8xx.c | 10 + 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/pdata-quirks.c | 1 - arch/arm/mach-omap2/prm33xx.c | 12 - arch/arm/mm/cache-l2x0.c | 111 +- arch/arm/mm/dma-mapping.c | 20 +- arch/arm/mm/dump.c | 4 +- arch/arm/mm/fault.c | 5 +- arch/arm/mm/mmap.c | 4 +- arch/arm/mm/mmu.c | 8 +- arch/arm/xen/mm.c | 1 + arch/arm64/include/asm/asm-uaccess.h | 13 + arch/arm64/include/asm/barrier.h | 10 +- arch/arm64/include/asm/cpufeature.h | 10 +- arch/arm64/include/asm/futex.h | 8 +- arch/arm64/include/asm/kvm_arm.h | 3 +- arch/arm64/include/asm/uaccess.h | 11 +- arch/arm64/kernel/entry.S | 10 +- arch/arm64/kernel/fpsimd.c | 3 + arch/arm64/kernel/head.S | 1 + arch/arm64/kernel/hw_breakpoint.c | 3 +- arch/arm64/kernel/perf_event.c | 21 +- arch/arm64/kernel/process.c | 9 + arch/arm64/kernel/setup.c | 5 +- arch/arm64/kernel/sys.c | 2 +- arch/arm64/kernel/traps.c | 32 +- arch/arm64/kernel/vdso/Makefile | 3 + arch/arm64/kvm/handle_exit.c | 4 +- arch/arm64/mm/fault.c | 5 +- arch/arm64/mm/init.c | 3 +- arch/avr32/include/asm/Kbuild | 1 + arch/blackfin/Kconfig | 7 +- arch/blackfin/Kconfig.debug | 1 + arch/blackfin/include/asm/Kbuild | 1 + arch/c6x/include/asm/Kbuild | 1 + arch/c6x/kernel/ptrace.c | 41 - arch/cris/include/asm/Kbuild | 1 + arch/frv/include/asm/Kbuild | 1 + arch/frv/mm/elf-fdpic.c | 2 +- arch/hexagon/include/asm/Kbuild | 1 + arch/ia64/include/asm/Kbuild | 1 + arch/ia64/kernel/module.c | 4 +- arch/m32r/include/asm/Kbuild | 1 + arch/metag/include/asm/Kbuild | 1 + arch/metag/include/asm/uaccess.h | 64 +- arch/metag/kernel/ptrace.c | 19 +- arch/metag/lib/usercopy.c | 312 ++-- arch/microblaze/include/asm/Kbuild | 1 + arch/mips/ar7/platform.c | 1 + arch/mips/bcm47xx/leds.c | 2 +- arch/mips/boot/elf2ecoff.c | 10 +- arch/mips/configs/ip27_defconfig | 1 - arch/mips/dec/int-handler.S | 40 +- arch/mips/include/asm/Kbuild | 1 + arch/mips/include/asm/asm.h | 10 +- arch/mips/include/asm/branch.h | 5 +- arch/mips/include/asm/compiler.h | 13 + arch/mips/include/asm/kprobes.h | 3 +- arch/mips/include/asm/mips-cm.h | 4 +- arch/mips/include/uapi/asm/swab.h | 7 +- arch/mips/jz4740/board-qi_lb60.c | 1 + arch/mips/jz4740/gpio.c | 1 + arch/mips/jz4740/irq.h | 2 + arch/mips/kernel/branch.c | 8 +- arch/mips/kernel/crash.c | 16 +- arch/mips/kernel/entry.S | 3 + arch/mips/kernel/kgdb.c | 48 +- arch/mips/kernel/pm-cps.c | 9 +- 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 | 4 + arch/mips/kernel/smp-bmips.c | 8 +- arch/mips/kernel/syscall.c | 15 +- arch/mips/kernel/traps.c | 2 + arch/mips/kernel/vmlinux.lds.S | 2 +- arch/mips/lib/memset.S | 11 +- arch/mips/math-emu/cp1emu.c | 38 + arch/mips/mm/mmap.c | 2 +- arch/mips/mm/pgtable-32.c | 6 +- arch/mips/mm/uasm-micromips.c | 2 +- arch/mips/net/bpf_jit.c | 16 +- arch/mips/netlogic/common/irq.c | 4 +- arch/mips/pci/ops-pmcmsp.c | 12 - arch/mips/ralink/prom.c | 9 +- arch/mips/sgi-ip22/Platform | 2 +- arch/mn10300/include/asm/Kbuild | 1 + arch/mn10300/mm/misalignment.c | 2 +- arch/openrisc/include/asm/uaccess.h | 2 +- arch/openrisc/kernel/traps.c | 10 +- arch/parisc/include/asm/dma-mapping.h | 11 +- arch/parisc/include/asm/mmu_context.h | 15 +- arch/parisc/kernel/drivers.c | 4 + 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 | 5 - arch/powerpc/boot/zImage.lds.S | 1 + arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/include/asm/atomic.h | 4 +- arch/powerpc/include/asm/barrier.h | 3 +- arch/powerpc/include/asm/opal.h | 3 + arch/powerpc/include/asm/reg.h | 2 +- arch/powerpc/include/asm/synch.h | 4 - arch/powerpc/include/asm/word-at-a-time.h | 5 + arch/powerpc/kernel/align.c | 146 +- arch/powerpc/kernel/eeh_driver.c | 19 +- arch/powerpc/kernel/entry_64.S | 6 +- arch/powerpc/kernel/kprobes.c | 11 + arch/powerpc/kernel/ptrace.c | 4 +- arch/powerpc/kernel/setup_64.c | 9 + arch/powerpc/kernel/signal.c | 2 +- arch/powerpc/kernel/time.c | 14 +- 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_rmhandlers.S | 37 +- arch/powerpc/kvm/book3s_pr.c | 6 +- arch/powerpc/kvm/book3s_pr_papr.c | 34 +- arch/powerpc/kvm/emulate.c | 1 - arch/powerpc/lib/feature-fixups.c | 2 +- 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/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/setup.c | 2 +- arch/powerpc/platforms/pseries/dlpar.c | 1 - arch/powerpc/platforms/pseries/mobility.c | 4 +- arch/powerpc/platforms/pseries/reconfig.c | 1 - arch/powerpc/sysdev/axonram.c | 5 +- arch/powerpc/sysdev/ipic.c | 4 +- arch/s390/Kconfig | 3 - arch/s390/boot/compressed/misc.c | 35 +- arch/s390/hypfs/inode.c | 2 +- arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/pgtable.h | 2 + arch/s390/include/asm/processor.h | 3 +- arch/s390/include/asm/syscall.h | 6 + arch/s390/include/asm/uaccess.h | 2 +- arch/s390/kernel/compat_linux.c | 8 +- arch/s390/kernel/dis.c | 4 +- arch/s390/kernel/ipl.c | 1 + arch/s390/kernel/setup.c | 8 +- arch/s390/kernel/vmlinux.lds.S | 8 +- arch/s390/kvm/kvm-s390.c | 3 + arch/s390/mm/pgtable.c | 19 +- arch/s390/mm/vmem.c | 2 +- arch/score/include/asm/Kbuild | 1 + 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 | 3 - arch/sparc/include/asm/pgtable_64.h | 15 +- arch/sparc/kernel/ldc.c | 7 +- arch/sparc/kernel/ptrace_64.c | 2 +- arch/sparc/kernel/sys_sparc_64.c | 4 +- arch/sparc/kernel/traps_64.c | 4 +- arch/sparc/mm/hugetlbpage.c | 2 +- arch/sparc/mm/init_64.c | 11 +- arch/tile/Kconfig | 2 + arch/tile/gxio/mpipe.c | 33 +- arch/tile/include/asm/Kbuild | 1 + arch/tile/include/asm/uaccess.h | 66 +- arch/tile/include/asm/word-at-a-time.h | 42 + arch/tile/lib/exports.c | 2 - arch/tile/lib/usercopy_32.S | 46 - arch/tile/lib/usercopy_64.S | 46 - arch/tile/mm/hugetlbpage.c | 2 +- arch/um/Makefile | 9 +- arch/um/drivers/mconsole.h | 2 +- arch/um/include/asm/Kbuild | 1 + arch/um/include/shared/init.h | 24 +- arch/um/include/shared/user.h | 2 +- arch/unicore32/include/asm/Kbuild | 1 + arch/x86/Kconfig | 4 - arch/x86/boot/boot.h | 2 +- arch/x86/boot/compressed/misc.c | 14 +- arch/x86/boot/string.c | 1 + arch/x86/boot/string.h | 9 + arch/x86/configs/tiny.config | 2 + arch/x86/crypto/cast5_avx_glue.c | 3 +- arch/x86/crypto/ghash-clmulni-intel_glue.c | 26 + arch/x86/crypto/salsa20_glue.c | 7 - arch/x86/crypto/sha-mb/sha1_mb_mgr_flush_avx2.S | 12 +- arch/x86/crypto/sha1_ssse3_glue.c | 2 +- arch/x86/crypto/twofish-x86_64-asm_64-3way.S | 112 +- arch/x86/include/asm/elf.h | 2 +- arch/x86/include/asm/io.h | 4 +- arch/x86/include/asm/kvm_host.h | 3 +- arch/x86/include/asm/processor.h | 2 +- arch/x86/include/asm/tlbflush.h | 7 + arch/x86/include/asm/uaccess.h | 10 +- arch/x86/include/asm/vmx.h | 1 + arch/x86/kernel/acpi/boot.c | 60 +- arch/x86/kernel/cpu/mcheck/mce.c | 22 +- arch/x86/kernel/cpu/mcheck/mce_amd.c | 5 +- arch/x86/kernel/cpu/microcode/intel.c | 43 + arch/x86/kernel/cpu/perf_event_intel_lbr.c | 2 + arch/x86/kernel/ftrace.c | 12 + arch/x86/kernel/i387.c | 11 + arch/x86/kernel/i8259.c | 1 + arch/x86/kernel/kprobes/common.h | 2 +- arch/x86/kernel/kprobes/core.c | 21 +- arch/x86/kernel/kprobes/opt.c | 5 +- arch/x86/kernel/kvm.c | 6 +- arch/x86/kernel/machine_kexec_64.c | 1 + arch/x86/kernel/module.c | 14 + arch/x86/kernel/pci-calgary_64.c | 2 +- arch/x86/kernel/rtc.c | 2 +- arch/x86/kernel/sys_x86_64.c | 4 +- arch/x86/kernel/tsc.c | 4 +- arch/x86/kernel/xsave.c | 4 +- arch/x86/kvm/cpuid.c | 26 +- arch/x86/kvm/emulate.c | 7 + arch/x86/kvm/svm.c | 52 +- arch/x86/kvm/vmx.c | 68 +- arch/x86/kvm/x86.c | 44 +- arch/x86/lib/x86-opcode-map.txt | 2 +- arch/x86/mm/hugetlbpage.c | 2 +- arch/x86/mm/init.c | 40 +- arch/x86/mm/ioremap.c | 4 +- arch/x86/mm/kmmio.c | 12 +- arch/x86/mm/numa_32.c | 1 + arch/x86/oprofile/nmi_int.c | 2 +- arch/x86/oprofile/op_model_ppro.c | 4 +- arch/x86/pci/broadcom_bus.c | 2 +- .../platform/intel-mid/device_libs/platform_wdt.c | 2 +- arch/x86/tools/relocs.c | 42 +- arch/x86/um/ptrace_64.c | 2 +- arch/x86/um/shared/sysdep/tls.h | 6 +- arch/x86/vdso/vdso32-setup.c | 11 +- arch/x86/xen/time.c | 6 +- arch/xtensa/include/asm/Kbuild | 1 + arch/xtensa/include/asm/futex.h | 23 +- arch/xtensa/kernel/setup.c | 4 +- arch/xtensa/kernel/syscall.c | 2 +- block/bio-integrity.c | 3 + block/bio.c | 8 + block/blk-core.c | 2 +- block/blk-flush.c | 15 +- block/blk-mq-tag.c | 2 +- block/blk-mq-tag.h | 12 + block/blk-mq.c | 16 +- block/blk-throttle.c | 11 + block/blk.h | 6 + block/partition-generic.c | 4 +- block/partitions/efi.c | 17 +- block/partitions/msdos.c | 4 + block/scsi_ioctl.c | 3 + crypto/Makefile | 2 + crypto/ahash.c | 97 +- crypto/algapi.c | 12 + crypto/algif_hash.c | 2 +- crypto/algif_skcipher.c | 18 +- crypto/asymmetric_keys/x509_cert_parser.c | 2 + crypto/async_tx/async_pq.c | 5 +- crypto/cryptd.c | 4 +- crypto/gcm.c | 6 +- crypto/hmac.c | 6 +- crypto/mcryptd.c | 24 +- crypto/salsa20_generic.c | 7 - crypto/shash.c | 13 +- drivers/Makefile | 1 + drivers/acpi/Makefile | 1 - drivers/acpi/acpi_platform.c | 8 +- drivers/acpi/acpica/evxfevnt.c | 18 + drivers/acpi/acpica/psobject.c | 14 + drivers/acpi/apei/erst.c | 2 +- drivers/acpi/apei/ghes.c | 1 + drivers/acpi/power.c | 1 + drivers/acpi/processor_driver.c | 7 +- drivers/acpi/processor_throttling.c | 62 +- drivers/acpi/sbshc.c | 4 +- drivers/ata/Kconfig | 3 + drivers/ata/libahci_platform.c | 5 +- drivers/ata/libata-core.c | 26 +- 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/bus.c | 2 +- drivers/base/dma-contiguous.c | 2 +- drivers/base/isa.c | 10 +- drivers/base/platform.c | 14 +- drivers/base/power/domain.c | 8 +- drivers/base/power/sysfs.c | 2 + drivers/block/drbd/drbd_bitmap.c | 6 + drivers/block/drbd/drbd_main.c | 2 +- drivers/block/loop.c | 10 +- drivers/block/pktcdvd.c | 4 +- drivers/block/rbd.c | 4 +- drivers/block/skd_main.c | 21 +- drivers/block/zram/zram_drv.c | 6 +- drivers/bluetooth/ath3k.c | 2 + drivers/bluetooth/btusb.c | 1 + drivers/bus/arm-ccn.c | 1 + drivers/bus/mvebu-mbus.c | 2 +- drivers/cdrom/cdrom.c | 2 +- drivers/char/Kconfig | 6 +- drivers/char/ipmi/ipmi_msghandler.c | 10 +- drivers/char/ipmi/ipmi_watchdog.c | 15 +- drivers/char/lp.c | 6 +- drivers/char/mem.c | 87 +- drivers/char/pcmcia/cm4040_cs.c | 6 +- drivers/char/random.c | 38 +- drivers/char/tpm/tpm-sysfs.c | 2 + drivers/char/tpm/tpm_i2c_infineon.c | 5 +- drivers/char/tpm/tpm_i2c_nuvoton.c | 8 +- drivers/char/virtio_console.c | 61 +- drivers/clk/at91/clk-usb.c | 4 +- drivers/clk/clk-si5351.c | 12 +- drivers/clk/mvebu/armada-38x.c | 15 +- drivers/clk/tegra/clk-tegra30.c | 2 +- drivers/clk/ti/clk-dra7-atl.c | 3 +- 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/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 | 11 +- drivers/devfreq/devfreq.c | 2 +- drivers/dma/dma-jz4740.c | 4 +- drivers/dma/dmaengine.c | 2 + drivers/dma/ep93xx_dma.c | 2 + 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-palmas.c | 5 + drivers/firmware/efi/efi.c | 3 +- drivers/firmware/efi/runtime-map.c | 10 +- drivers/gpio/gpio-iop.c | 4 + drivers/gpu/drm/ast/ast_post.c | 48 +- drivers/gpu/drm/drm_dp_mst_topology.c | 43 +- drivers/gpu/drm/drm_drv.c | 2 +- drivers/gpu/drm/drm_gem.c | 6 +- drivers/gpu/drm/drm_irq.c | 14 +- drivers/gpu/drm/exynos/exynos_drm_core.c | 2 +- drivers/gpu/drm/gma500/psb_intel_lvds.c | 18 +- drivers/gpu/drm/i915/intel_bios.c | 7 + drivers/gpu/drm/i915/intel_i2c.c | 4 +- drivers/gpu/drm/mgag200/mgag200_main.c | 2 + drivers/gpu/drm/msm/adreno/adreno_gpu.c | 9 +- drivers/gpu/drm/msm/msm_gem.c | 14 +- drivers/gpu/drm/msm/msm_gem_submit.c | 10 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 3 +- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 5 + drivers/gpu/drm/omapdrm/omap_gem.c | 4 +- drivers/gpu/drm/panel/panel-simple.c | 2 + drivers/gpu/drm/radeon/ci_dpm.c | 12 + drivers/gpu/drm/radeon/radeon_display.c | 6 + drivers/gpu/drm/radeon/radeon_uvd.c | 2 +- drivers/gpu/drm/radeon/si_dpm.c | 14 +- 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/vmwgfx/vmwgfx_cmdbuf_res.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 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_resource.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 34 +- drivers/hid/hid-core.c | 4 + drivers/hid/hid-elo.c | 6 + drivers/hid/hid-ids.h | 2 + drivers/hid/hid-input.c | 20 +- drivers/hid/hid-xinmo.c | 1 + drivers/hid/hidraw.c | 5 + drivers/hid/i2c-hid/i2c-hid.c | 16 +- drivers/hid/usbhid/hid-core.c | 12 +- drivers/hid/usbhid/hid-quirks.c | 1 + drivers/hsi/clients/ssi_protocol.c | 5 +- drivers/hv/hv_balloon.c | 4 +- drivers/hwmon/asus_atk0110.c | 3 + drivers/hwmon/gl520sm.c | 25 +- drivers/hwmon/pmbus/pmbus_core.c | 21 +- drivers/i2c/busses/i2c-ismt.c | 5 + drivers/i2c/busses/i2c-riic.c | 34 +- drivers/i2c/busses/i2c-scmi.c | 4 + drivers/i2c/busses/i2c-tiny-usb.c | 25 +- drivers/iio/adc/ad7793.c | 4 +- drivers/iio/adc/ad_sigma_delta.c | 28 + drivers/iio/adc/mcp320x.c | 1 + drivers/iio/adc/ti_am335x_adc.c | 13 +- drivers/iio/adc/vf610_adc.c | 2 +- drivers/iio/adc/xilinx-xadc-core.c | 6 +- drivers/iio/dac/ad7303.c | 6 +- drivers/iio/imu/adis16480.c | 2 +- drivers/iio/imu/adis_trigger.c | 7 +- drivers/iio/industrialio-buffer.c | 2 +- drivers/iio/industrialio-core.c | 4 +- drivers/iio/light/tsl2563.c | 2 +- drivers/iio/magnetometer/st_magn_spi.c | 2 - drivers/iio/proximity/as3935.c | 13 +- drivers/iio/trigger/iio-trig-interrupt.c | 8 +- drivers/iio/trigger/iio-trig-sysfs.c | 2 +- drivers/infiniband/core/cma.c | 5 +- drivers/infiniband/hw/ehca/ehca_mrmw.c | 3 +- drivers/infiniband/hw/mlx4/main.c | 14 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 4 +- drivers/infiniband/hw/mlx5/mem.c | 2 +- drivers/infiniband/hw/qib/qib_iba7322.c | 2 +- drivers/infiniband/hw/qib/qib_qp.c | 18 +- drivers/infiniband/hw/qib/qib_rc.c | 4 +- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 14 +- drivers/infiniband/ulp/ipoib/ipoib_fs.c | 3 + drivers/infiniband/ulp/ipoib/ipoib_ib.c | 13 + drivers/infiniband/ulp/ipoib/ipoib_main.c | 74 +- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 13 +- drivers/infiniband/ulp/iser/iser_memory.c | 1 - drivers/infiniband/ulp/iser/iser_verbs.c | 15 +- drivers/infiniband/ulp/srpt/ib_srpt.c | 18 +- drivers/input/input.c | 5 +- drivers/input/joystick/iforce/iforce-usb.c | 3 + drivers/input/joystick/xpad.c | 2 + drivers/input/keyboard/matrix_keypad.c | 4 +- drivers/input/keyboard/mpr121_touchkey.c | 24 +- drivers/input/misc/cm109.c | 4 + drivers/input/misc/ims-pcu.c | 20 +- drivers/input/misc/twl4030-vibra.c | 7 +- drivers/input/misc/twl6040-vibra.c | 2 +- drivers/input/misc/yealink.c | 4 + drivers/input/mouse/elantech.c | 10 +- drivers/input/mouse/trackpoint.c | 7 +- drivers/input/mouse/trackpoint.h | 3 +- drivers/input/serio/gscps2.c | 2 +- drivers/input/serio/i8042-x86ia64io.h | 59 + drivers/input/serio/i8042.c | 12 +- drivers/input/tablet/gtco.c | 17 +- drivers/input/tablet/hanwang.c | 3 + drivers/input/tablet/kbtab.c | 3 + drivers/input/touchscreen/88pm860x-ts.c | 16 +- drivers/input/touchscreen/ar1021_i2c.c | 2 +- drivers/input/touchscreen/sur40.c | 3 + drivers/input/touchscreen/tsc2007.c | 8 + drivers/iommu/amd_iommu.c | 1 + drivers/iommu/amd_iommu_v2.c | 2 +- drivers/iommu/dmar.c | 4 +- drivers/iommu/intel-iommu.c | 24 +- drivers/iommu/iova.c | 2 +- drivers/irqchip/irq-atmel-aic-common.c | 5 +- drivers/irqchip/irq-crossbar.c | 9 +- drivers/irqchip/irq-gic-v3.c | 5 +- drivers/isdn/capi/kcapi.c | 1 + drivers/isdn/gigaset/bas-gigaset.c | 3 + drivers/isdn/hardware/mISDN/mISDNipac.c | 12 +- drivers/isdn/hardware/mISDN/w6692.c | 6 +- drivers/isdn/i4l/isdn_common.c | 1 + drivers/isdn/i4l/isdn_net.c | 5 +- drivers/isdn/i4l/isdn_ppp.c | 39 +- drivers/isdn/mISDN/stack.c | 2 +- drivers/leds/led-triggers.c | 12 +- drivers/leds/leds-pca955x.c | 2 +- drivers/mailbox/mailbox.c | 13 +- drivers/md/bcache/alloc.c | 22 +- drivers/md/bcache/bcache.h | 1 + drivers/md/bcache/btree.c | 5 +- drivers/md/bcache/request.c | 15 +- drivers/md/bcache/super.c | 19 +- drivers/md/bcache/sysfs.c | 4 +- drivers/md/bcache/util.c | 50 +- drivers/md/bcache/writeback.c | 20 +- drivers/md/bcache/writeback.h | 21 +- drivers/md/bitmap.c | 5 + drivers/md/dm-bufio.c | 25 +- drivers/md/dm-era-target.c | 8 +- drivers/md/dm-io.c | 1 + drivers/md/dm-ioctl.c | 2 +- drivers/md/dm-thin-metadata.c | 10 +- drivers/md/dm.c | 67 +- drivers/md/md.c | 2 +- drivers/md/persistent-data/dm-btree.c | 27 +- drivers/md/persistent-data/dm-space-map-disk.c | 15 +- drivers/md/raid1.c | 9 +- drivers/md/raid10.c | 43 +- drivers/md/raid5.c | 16 +- drivers/media/dvb-core/dvb_ca_en50221.c | 23 + drivers/media/dvb-frontends/si2168.c | 3 + drivers/media/i2c/cx25840/cx25840-core.c | 36 +- drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 2 +- drivers/media/i2c/s5k6aa.c | 5 + drivers/media/i2c/soc_camera/ov6650.c | 2 +- drivers/media/pci/bt8xx/bt878.c | 3 +- drivers/media/pci/bt8xx/dvb-bt8xx.c | 1 + drivers/media/pci/saa7134/saa7134-i2c.c | 31 + drivers/media/pci/ttpci/av7110_hw.c | 8 +- drivers/media/pci/ttpci/av7110_hw.h | 12 +- drivers/media/platform/davinci/vpfe_capture.c | 22 +- drivers/media/platform/exynos-gsc/gsc-core.c | 2 - drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 + drivers/media/rc/imon.c | 7 +- drivers/media/rc/ir-lirc-codec.c | 9 +- drivers/media/rc/mceusb.c | 13 +- drivers/media/tuners/r820t.c | 13 +- drivers/media/tuners/tuner-xc2028.c | 35 +- drivers/media/usb/as102/as102_fw.c | 28 +- drivers/media/usb/cpia2/cpia2_v4l.c | 4 +- drivers/media/usb/cx231xx/cx231xx-audio.c | 15 +- drivers/media/usb/cx231xx/cx231xx-cards.c | 45 +- drivers/media/usb/cx231xx/cx231xx-core.c | 7 +- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 10 +- drivers/media/usb/dvb-usb-v2/lmedm04.c | 39 +- drivers/media/usb/dvb-usb/cxusb.c | 2 + drivers/media/usb/dvb-usb/dib0700_core.c | 8 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 25 +- drivers/media/usb/dvb-usb/dibusb-common.c | 16 +- drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 33 +- drivers/media/usb/dvb-usb/ttusb2.c | 19 + drivers/media/usb/gspca/konica.c | 3 + drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 13 +- drivers/media/usb/usbtv/usbtv-core.c | 3 + drivers/media/usb/usbvision/usbvision-video.c | 9 +- drivers/media/usb/uvc/uvc_ctrl.c | 7 + drivers/media/usb/uvc/uvc_driver.c | 118 +- drivers/media/usb/zr364xx/zr364xx.c | 8 + drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 1019 +++++++----- drivers/media/v4l2-core/v4l2-ctrls.c | 112 +- drivers/media/v4l2-core/v4l2-ioctl.c | 5 +- drivers/media/v4l2-core/videobuf2-core.c | 7 +- drivers/message/fusion/mptsas.c | 1 + drivers/message/i2o/i2o_config.c | 4 +- drivers/mfd/omap-usb-tll.c | 2 +- drivers/mfd/palmas.c | 14 + drivers/mfd/twl4030-audio.c | 9 +- drivers/mfd/twl6040.c | 12 +- drivers/misc/c2port/c2port-duramar2150.c | 4 +- drivers/misc/eeprom/at24.c | 6 + drivers/misc/enclosure.c | 14 +- drivers/misc/ioc4.c | 31 +- drivers/misc/mei/main.c | 1 - drivers/mmc/core/core.c | 8 + drivers/mmc/core/sdio_bus.c | 12 +- drivers/mmc/host/jz4740_mmc.c | 2 +- drivers/mmc/host/omap_hsmmc.c | 4 +- drivers/mmc/host/s3cmci.c | 1 + drivers/mmc/host/sdhci-esdhc-imx.c | 1 + drivers/mmc/host/sdhci.c | 4 +- drivers/mmc/host/sunxi-mmc.c | 5 +- drivers/mmc/host/ushc.c | 3 + drivers/mtd/bcm47xxpart.c | 14 +- drivers/mtd/chips/Kconfig | 1 + drivers/mtd/chips/cfi_cmdset_0001.c | 33 +- drivers/mtd/chips/cfi_cmdset_0002.c | 9 +- drivers/mtd/chips/jedec_probe.c | 2 + drivers/mtd/maps/pmcmsp-flash.c | 4 +- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 6 +- drivers/mtd/nand/nand_base.c | 23 +- drivers/mtd/spi-nor/spi-nor.c | 7 + drivers/mtd/ubi/block.c | 2 +- drivers/mtd/ubi/build.c | 11 + drivers/mtd/ubi/fastmap.c | 7 +- drivers/mtd/ubi/upd.c | 8 +- drivers/mtd/ubi/vmt.c | 15 +- drivers/net/appletalk/ipddp.c | 2 +- drivers/net/bonding/bond_main.c | 87 +- drivers/net/can/c_can/c_can_pci.c | 1 - drivers/net/can/c_can/c_can_platform.c | 1 - drivers/net/can/cc770/cc770.c | 100 +- drivers/net/can/cc770/cc770.h | 2 + drivers/net/can/usb/ems_usb.c | 2 + drivers/net/can/usb/esd_usb2.c | 4 +- drivers/net/can/usb/gs_usb.c | 14 +- drivers/net/can/usb/kvaser_usb.c | 14 +- drivers/net/can/usb/usb_8dev.c | 2 + drivers/net/ethernet/3com/typhoon.c | 25 +- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 1 + drivers/net/ethernet/arc/emac_main.c | 53 +- drivers/net/ethernet/arc/emac_rockchip.c | 6 +- drivers/net/ethernet/broadcom/bgmac.c | 10 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 26 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 23 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 85 +- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 10 +- drivers/net/ethernet/broadcom/tg3.c | 20 +- drivers/net/ethernet/broadcom/tg3.h | 4 + drivers/net/ethernet/brocade/bna/bfa_ioc.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 + drivers/net/ethernet/dec/tulip/tulip_core.c | 9 +- drivers/net/ethernet/dec/tulip/winbond-840.c | 2 +- drivers/net/ethernet/ethoc.c | 3 +- drivers/net/ethernet/faraday/ftgmac100.c | 1 + drivers/net/ethernet/fealnx.c | 6 +- drivers/net/ethernet/freescale/fec.h | 1 + drivers/net/ethernet/freescale/fec_main.c | 31 +- drivers/net/ethernet/freescale/fec_ptp.c | 10 + drivers/net/ethernet/freescale/fsl_pq_mdio.c | 9 +- drivers/net/ethernet/freescale/gianfar.c | 6 +- drivers/net/ethernet/freescale/gianfar_ptp.c | 3 +- drivers/net/ethernet/ibm/emac/core.c | 26 +- drivers/net/ethernet/intel/e1000/e1000.h | 3 +- drivers/net/ethernet/intel/e1000/e1000_main.c | 27 +- drivers/net/ethernet/intel/e1000e/ich8lan.c | 24 +- drivers/net/ethernet/intel/e1000e/mac.c | 11 +- drivers/net/ethernet/intel/e1000e/netdev.c | 27 +- drivers/net/ethernet/intel/e1000e/phy.c | 7 +- drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 3 + drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 18 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/igb/e1000_82575.c | 11 + drivers/net/ethernet/intel/igb/e1000_i210.c | 4 +- drivers/net/ethernet/intel/igb/e1000_phy.c | 4 + drivers/net/ethernet/intel/igb/igb_main.c | 25 +- drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 25 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- drivers/net/ethernet/korina.c | 8 +- drivers/net/ethernet/marvell/mvmdio.c | 3 +- drivers/net/ethernet/marvell/mvneta.c | 4 + drivers/net/ethernet/marvell/sky2.c | 2 +- drivers/net/ethernet/mellanox/mlx4/cq.c | 38 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 10 +- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 13 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 6 +- drivers/net/ethernet/mellanox/mlx4/icm.c | 7 +- drivers/net/ethernet/mellanox/mlx4/main.c | 2 - drivers/net/ethernet/mellanox/mlx4/mcg.c | 15 +- drivers/net/ethernet/mellanox/mlx4/qp.c | 16 + .../net/ethernet/mellanox/mlx4/resource_tracker.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 6 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +- .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 2 +- drivers/net/ethernet/neterion/vxge/vxge-main.c | 31 +- .../net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 2 +- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 18 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 2 +- .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 + drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 6 +- drivers/net/ethernet/qualcomm/qca_spi.c | 10 +- drivers/net/ethernet/realtek/r8169.c | 9 +- drivers/net/ethernet/renesas/sh_eth.c | 42 +- drivers/net/ethernet/renesas/sh_eth.h | 2 +- drivers/net/ethernet/smsc/smc91x.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 + drivers/net/ethernet/ti/cpmac.c | 7 +- drivers/net/ethernet/ti/cpsw.c | 16 + drivers/net/ethernet/xilinx/Kconfig | 1 + drivers/net/ethernet/xilinx/xilinx_emaclite.c | 126 +- drivers/net/hamradio/hdlcdrv.c | 2 + drivers/net/hippi/rrunner.c | 2 +- drivers/net/irda/irda-usb.c | 2 +- drivers/net/irda/mcs7780.c | 16 +- drivers/net/irda/vlsi_ir.c | 8 +- drivers/net/macvlan.c | 2 +- drivers/net/macvtap.c | 2 + drivers/net/phy/at803x.c | 2 +- drivers/net/phy/marvell.c | 2 - drivers/net/phy/mdio-sun4i.c | 6 +- drivers/net/phy/phy.c | 8 +- drivers/net/phy/phy_device.c | 4 +- drivers/net/phy/spi_ks8995.c | 1 + drivers/net/ppp/ppp_generic.c | 15 +- drivers/net/ppp/pppoe.c | 15 +- drivers/net/ppp/pptp.c | 1 - drivers/net/slip/slhc.c | 5 + drivers/net/team/team.c | 50 +- drivers/net/tun.c | 7 + drivers/net/usb/Kconfig | 2 +- drivers/net/usb/catc.c | 56 +- drivers/net/usb/cdc_ether.c | 9 +- drivers/net/usb/cdc_ncm.c | 20 +- drivers/net/usb/kaweth.c | 10 +- drivers/net/usb/pegasus.c | 29 +- drivers/net/usb/plusb.c | 15 +- drivers/net/usb/qmi_wwan.c | 8 + drivers/net/usb/r8152.c | 1 + drivers/net/usb/rtl8150.c | 34 +- drivers/net/veth.c | 3 + drivers/net/virtio_net.c | 16 +- drivers/net/vmxnet3/vmxnet3_drv.c | 7 +- drivers/net/vxlan.c | 4 +- drivers/net/wan/hdlc_ppp.c | 5 +- drivers/net/wan/pc300too.c | 1 + drivers/net/wimax/i2400m/usb.c | 3 + drivers/net/wireless/ath/ath10k/debug.c | 9 + drivers/net/wireless/ath/ath5k/debug.c | 5 +- drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 - drivers/net/wireless/ath/ath9k/hif_usb.c | 3 + drivers/net/wireless/ath/ath9k/tx99.c | 18 +- drivers/net/wireless/ath/regd.c | 19 +- drivers/net/wireless/ath/wil6210/main.c | 35 +- .../net/wireless/brcm80211/brcmfmac/dhd_linux.c | 23 +- drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 2 +- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 24 +- .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 5 + .../net/wireless/brcm80211/brcmsmac/phy/phy_n.c | 197 ++- drivers/net/wireless/hostap/hostap_hw.c | 15 +- drivers/net/wireless/mwifiex/debugfs.c | 3 +- drivers/net/wireless/mwifiex/pcie.c | 7 + drivers/net/wireless/mwifiex/sta_ioctl.c | 2 - drivers/net/wireless/p54/fwio.c | 2 +- drivers/net/wireless/ray_cs.c | 7 +- drivers/net/wireless/rndis_wlan.c | 4 + drivers/net/wireless/ti/wl1251/main.c | 4 +- drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/interface.c | 6 +- drivers/net/xen-netback/netback.c | 12 +- drivers/net/xen-netfront.c | 24 + drivers/of/address.c | 2 +- drivers/of/device.c | 4 +- drivers/of/fdt.c | 12 +- drivers/parisc/ccio-dma.c | 12 + drivers/parisc/dino.c | 7 +- drivers/parisc/lba_pci.c | 39 +- drivers/parisc/sba_iommu.c | 14 + drivers/parport/parport_pc.c | 4 + drivers/pci/host/pci-keystone.c | 9 +- drivers/pci/host/pcie-xilinx.c | 4 +- drivers/pci/hotplug/acpiphp_glue.c | 23 +- drivers/pci/hotplug/shpchp_hpc.c | 2 + drivers/pci/iov.c | 3 +- drivers/pci/pci-driver.c | 8 +- drivers/pci/pci-sysfs.c | 21 +- drivers/pci/pci.c | 13 +- drivers/pci/pcie/aer/aerdrv_core.c | 9 +- drivers/pci/pcie/pme.c | 5 +- drivers/pci/probe.c | 15 +- drivers/pci/remove.c | 2 +- drivers/phy/phy-core.c | 4 + drivers/pinctrl/Kconfig | 3 +- drivers/pinctrl/core.c | 24 +- drivers/pinctrl/freescale/pinctrl-mxs.c | 16 +- drivers/pinctrl/qcom/pinctrl-msm.c | 4 - drivers/pinctrl/samsung/pinctrl-exynos.c | 4 - drivers/pinctrl/sh-pfc/core.c | 3 + drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 1 + drivers/platform/x86/acer-wmi.c | 22 +- drivers/platform/x86/asus-nb-wmi.c | 9 + drivers/platform/x86/intel_mid_thermal.c | 1 + drivers/power/bq24190_charger.c | 3 +- drivers/power/pda_power.c | 49 +- drivers/powercap/powercap_sys.c | 1 + drivers/pwm/core.c | 2 + drivers/pwm/sysfs.c | 18 + drivers/regulator/core.c | 2 + drivers/regulator/tps65023-regulator.c | 3 +- drivers/rtc/interface.c | 9 +- drivers/rtc/rtc-s35390a.c | 167 +- drivers/rtc/rtc-tegra.c | 28 +- drivers/s390/block/dasd.c | 7 +- drivers/s390/block/dasd_3990_erp.c | 10 + drivers/s390/block/dasd_eckd.c | 16 +- drivers/s390/cio/qdio_main.c | 42 +- drivers/s390/cio/qdio_thinint.c | 8 +- drivers/s390/net/qeth_core.h | 9 + drivers/s390/net/qeth_core_main.c | 75 +- drivers/s390/net/qeth_core_sys.c | 24 +- drivers/s390/net/qeth_l2.h | 2 + drivers/s390/net/qeth_l2_main.c | 28 +- drivers/s390/net/qeth_l2_sys.c | 8 + drivers/s390/net/qeth_l3_main.c | 23 +- drivers/s390/scsi/zfcp_aux.c | 5 + drivers/s390/scsi/zfcp_dbf.c | 23 +- drivers/s390/scsi/zfcp_dbf.h | 10 +- drivers/s390/scsi/zfcp_erp.c | 18 +- drivers/s390/scsi/zfcp_fc.h | 6 +- drivers/s390/scsi/zfcp_fsf.c | 3 +- drivers/s390/scsi/zfcp_scsi.c | 13 +- drivers/scsi/advansys.c | 3 +- drivers/scsi/aic94xx/aic94xx_sds.c | 5 +- drivers/scsi/bfa/bfad_debugfs.c | 5 +- drivers/scsi/bnx2fc/bnx2fc.h | 1 + drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 10 +- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 + drivers/scsi/device_handler/scsi_dh_emc.c | 2 +- drivers/scsi/ibmvscsi/ibmvfc.h | 2 +- drivers/scsi/ipr.c | 16 +- drivers/scsi/ips.c | 9 +- drivers/scsi/isci/remote_node_context.c | 3 + drivers/scsi/libiscsi.c | 52 +- drivers/scsi/libsas/sas_ata.c | 2 +- drivers/scsi/libsas/sas_expander.c | 4 +- drivers/scsi/lpfc/lpfc_attr.c | 17 + drivers/scsi/lpfc/lpfc_els.c | 17 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +- drivers/scsi/lpfc/lpfc_hw4.h | 2 +- drivers/scsi/lpfc/lpfc_init.c | 1 + drivers/scsi/lpfc/lpfc_sli.c | 6 + drivers/scsi/lpfc/lpfc_vport.c | 8 + drivers/scsi/mac_esp.c | 33 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 33 +- drivers/scsi/mvsas/mv_sas.c | 4 +- drivers/scsi/qla2xxx/qla_attr.c | 26 +- drivers/scsi/qla2xxx/qla_init.c | 1 + drivers/scsi/qla2xxx/qla_os.c | 8 +- drivers/scsi/scsi_devinfo.c | 4 +- drivers/scsi/scsi_transport_iscsi.c | 2 +- drivers/scsi/sd.c | 22 +- drivers/scsi/sg.c | 312 ++-- drivers/scsi/sr.c | 6 +- drivers/scsi/storvsc_drv.c | 3 +- drivers/scsi/ufs/ufshcd.c | 7 +- drivers/scsi/virtio_scsi.c | 25 + drivers/spi/spi-atmel.c | 2 +- drivers/spi/spi-dw-mmio.c | 2 +- drivers/spi/spi-dw.c | 5 +- drivers/spi/spi-imx.c | 15 +- drivers/spi/spi-omap2-mcspi.c | 9 +- drivers/spi/spi-sh-msiof.c | 2 +- drivers/spi/spi-sun4i.c | 2 +- drivers/spi/spi-sun6i.c | 2 +- drivers/spmi/spmi.c | 12 + drivers/staging/android/ashmem.c | 18 +- drivers/staging/android/binder.c | 35 +- drivers/staging/android/ion/ion.c | 55 +- drivers/staging/bcm/Kconfig | 1 + drivers/staging/comedi/comedi_fops.c | 7 +- drivers/staging/comedi/drivers/jr3_pci.c | 13 +- drivers/staging/emxx_udc/emxx_udc.c | 4 +- drivers/staging/gdm724x/gdm_mux.c | 3 +- drivers/staging/iio/adc/ad7192.c | 4 +- drivers/staging/iio/cdc/ad7150.c | 2 +- drivers/staging/iio/impedance-analyzer/ad5933.c | 17 +- drivers/staging/iio/resolver/ad2s1210.c | 2 +- drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 4 +- .../staging/iio/trigger/iio-trig-periodic-rtc.c | 6 +- drivers/staging/imx-drm/imx-hdmi.c | 2 +- .../lustre/lustre/include/lustre/lustre_user.h | 18 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 7 + drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +- drivers/staging/lustre/lustre/lov/lov_pack.c | 9 - drivers/staging/lustre/lustre/ptlrpc/service.c | 21 +- drivers/staging/nvec/nvec_ps2.c | 10 +- drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- drivers/staging/rtl8188eu/include/rtw_debug.h | 2 +- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 14 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 + drivers/staging/rtl8712/ieee80211.h | 84 +- drivers/staging/rtl8712/rtl871x_xmit.c | 7 +- drivers/staging/rts5208/rtsx_scsi.c | 2 +- drivers/staging/unisys/visorutil/periodic_work.c | 8 +- drivers/staging/vt6655/device_main.c | 10 +- drivers/staging/vt6656/main_usb.c | 3 + drivers/staging/vt6656/usbpipe.c | 31 +- drivers/staging/wlan-ng/prism2mgmt.c | 2 +- drivers/target/iscsi/iscsi_target.c | 90 +- drivers/target/iscsi/iscsi_target_configfs.c | 3 +- drivers/target/iscsi/iscsi_target_core.h | 2 + drivers/target/iscsi/iscsi_target_erl0.c | 12 +- drivers/target/iscsi/iscsi_target_erl0.h | 2 +- drivers/target/iscsi/iscsi_target_login.c | 11 +- drivers/target/iscsi/iscsi_target_nego.c | 208 ++- drivers/target/iscsi/iscsi_target_parameters.c | 16 - drivers/target/iscsi/iscsi_target_util.c | 12 +- drivers/target/target_core_alua.c | 8 +- drivers/target/target_core_fabric_configfs.c | 5 + drivers/target/target_core_file.c | 7 +- drivers/target/target_core_internal.h | 2 +- drivers/target/target_core_pr.c | 4 +- drivers/target/target_core_pscsi.c | 47 +- drivers/target/target_core_sbc.c | 10 +- drivers/target/target_core_tmr.c | 25 +- drivers/target/target_core_tpg.c | 3 + drivers/target/target_core_transport.c | 20 +- drivers/thermal/imx_thermal.c | 6 +- drivers/thermal/step_wise.c | 11 +- drivers/thunderbolt/nhi.c | 1 + drivers/tty/isicom.c | 2 +- drivers/tty/n_gsm.c | 40 +- drivers/tty/n_hdlc.c | 143 +- drivers/tty/n_tty.c | 4 +- drivers/tty/nozomi.c | 2 +- drivers/tty/serial/8250/8250_fintek.c | 2 +- drivers/tty/serial/8250/8250_pci.c | 50 +- drivers/tty/serial/atmel_serial.c | 6 + drivers/tty/serial/efm32-uart.c | 11 +- drivers/tty/serial/ifx6x60.c | 2 +- drivers/tty/serial/omap-serial.c | 9 +- drivers/tty/serial/sccnxp.c | 15 +- drivers/tty/serial/sh-sci.c | 29 +- drivers/tty/sysrq.c | 28 +- drivers/tty/tty_ldisc.c | 18 +- drivers/tty/vt/vt.c | 22 +- drivers/usb/chipidea/core.c | 30 +- drivers/usb/chipidea/debug.c | 3 +- drivers/usb/chipidea/udc.c | 10 +- drivers/usb/class/cdc-acm.c | 28 +- drivers/usb/class/cdc-wdm.c | 2 + drivers/usb/class/usbtmc.c | 7 + drivers/usb/core/config.c | 36 +- drivers/usb/core/devio.c | 78 +- drivers/usb/core/driver.c | 3 + drivers/usb/core/file.c | 9 +- drivers/usb/core/generic.c | 9 +- drivers/usb/core/hcd.c | 16 +- drivers/usb/core/hub.c | 88 +- drivers/usb/core/message.c | 4 + drivers/usb/core/quirks.c | 40 +- drivers/usb/core/urb.c | 2 +- drivers/usb/dwc3/dwc3-keystone.c | 4 + drivers/usb/dwc3/dwc3-pci.c | 2 +- drivers/usb/dwc3/dwc3-st.c | 2 +- drivers/usb/dwc3/gadget.c | 6 +- drivers/usb/dwc3/gadget.h | 14 +- drivers/usb/gadget/composite.c | 12 +- drivers/usb/gadget/configfs.c | 1 + drivers/usb/gadget/function/f_acm.c | 4 +- drivers/usb/gadget/function/f_fs.c | 32 +- drivers/usb/gadget/function/f_hid.c | 24 +- commit 8ace8cc5be95f939a49f712ca1abf4954131d86a Merge: 4addd7e 6d05aad Author: Rohit Kumar <rokku...@cs.stonybrook.edu> Date: Fri May 11 18:26:49 2018 -0400 Merge branch 'master' into wrapfs commit 6d05aadb69916b7e6595658fd57821219d16f2e6 Author: Greg Kroah-Hartman <gre...@linuxfoundation.org> Date: Wed May 2 07:59:55 2018 -0700 Linux 3.18.108 commit 36af635cc37482c7b1232e9bee4ffe232cde9c81 Author: Greg Kroah-Hartman <gre...@linuxfoundation.org> Date: Tue Apr 17 14:56:21 2018 +0200 Revert "perf tests: Decompress kernel module before objdump" This reverts commit 091b3b4ba55daf8b28f40794aefdaa0bdb5af7a1 which is commit 94df1040b1e6aacd8dec0ba3c61d7e77cd695f26 upstream. It breaks the build of perf on 3.18.y, so I'm dropping it. Reported-by: Pavlos Parissis <pavlos.paris...@gmail.com> Reported-by: Lei Chen <chenl....@gmail.com> Reported-by: Maxime Hadjinlian <maxime.hadjinl...@gmail.com> Reported-by: Murilo Opsfelder Araujo <muri...@linux.ibm.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Adrian Hunter <adrian.hun...@intel.com> Cc: Jiri Olsa <jo...@kernel.org> Cc: David Ahern <dsah...@gmail.com> Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Cc: Wang Nan <wangn...@huawei.com> Cc: kernel-t...@lge.com Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Sasha Levin <alexander.le...@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit bdf3b718bb3330ef48d426ca6f070f21ca71ec9e 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 c829ba0e5810c4faf5487d63ff4e89a84968c762 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 c55d649044862696848196ce15f72c6b6fa9363f 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 b2497363fa7beed9f714d983d0f6a53091f3f729 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 2365af7dba0ea7b12e93bb0c80bac6c16d51861c 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 6ad4bee75e23e6ce91f073d39b68db9f544ce5a0 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 51f8a19af20b999bd1766b695f4a86db5b08c323 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 2616aadf1c9a130a8db5c95a302283c00561da60 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 cd85ad112ecf79cb61a3b93ae1388375caf05a6d 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 31473a9e85383b99960537c813df4e4a3d730262 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 3f44674dd08ae1c13e0ab35fe37aabd8a9276e49 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 ffebfe63ae5f5ca60fe636970d8d9f2817a428cd 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 d2bbfac82b7942afc5d8e564d7087835280df495 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 86e4c0979206ad07a04095ba62d01f56745bb828 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 f59e0c3c53e73b6ecd24c5e6bd1883ec88d0ee95 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 9dfbd45c4f91d648ffac99eeceb0af35307cb026 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 5815b85d42f08334e7c5746b02de6857006e8452 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 a67a3e7cd8e4ccdf148cacd635d55bc51a282984 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 915224d505955eb1366d027b8a08c7fb3d4ef4a0 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 6246535bd77abf0d0b4684eaed373676d9e8587f 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 617d7a47bcf30271c858254a3a293891355199ca 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 2cb5c553e6d4a57f09153eb8e0b267b51afb261a 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 0643dbdb5c697fbe20dd380bcb3faa1dcec03b78 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. Backport notes: 3.18.y is missing commit 6a797d273783 ("ext4: call out CRC and corruption errors with specific error codes") so the EFSCORRUPTED label doesn't exist. Replaced all instances of EFSCORRUPTED with EUCLEAN since that's what 6a797d273783 defined it as. 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 [ha...@prjkt.io: s/EFSCORRUPTED/EUCLEAN/ fs/ext4/balloc.c] Signed-off-by: Harsh Shandilya <ha...@prjkt.io> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit d0800f61b95703d09607217ad4d5775c5313429b Author: Theodore Ts'o <ty...@mit.edu> Date: Wed Apr 18 11:49:31 2018 -0400 ext4: set h_journal if there is a failure starting a reserved handle commit b2569260d55228b617bd82aba6d0db2faeeb4116 upstream. If ext4 tries to start a reserved handle via jbd2_journal_start_reserved(), and the journal has been aborted, this can result in a NULL pointer dereference. This is because the fields h_journal and h_transaction in the handle structure share the same memory, via a union, so jbd2_journal_start_reserved() will clear h_journal before calling start_this_handle(). If this function fails due to an aborted handle, h_journal will still be NULL, and the call to jbd2_journal_free_reserved() will pass a NULL journal to sub_reserve_credits(). This can be reproduced by running "kvm-xfstests -c dioread_nolock generic/475". Cc: sta...@kernel.org # 3.11 Fixes: 8f7d89f36829b ("jbd2: transaction reservation support") Signed-off-by: Theodore Ts'o <ty...@mit.edu> Reviewed-by: Andreas Dilger <adil...@dilger.ca> Reviewed-by: Jan Kara <j...@suse.cz> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 754ca08efd83eeb9cccdb109da2fa0b3a27c1172 Author: Greg Kroah-Hartman <gre...@linuxfoundation.org> Date: Sun Apr 29 07:45:30 2018 +0200 Linux 3.18.107 commit 8e8a40578fac765527a5d55d258a2ca93904ed1b Author: Dan Carpenter <dan.carpen...@oracle.com> Date: Wed Apr 18 12:51:31 2018 +0300 cdrom: information leak in cdrom_ioctl_media_changed() commit 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 upstream. This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christoph Hellwig <h...@lst.de> Cc: sta...@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Jens Axboe <ax...@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 2127751e26b0021638a3597ff302e177cdb861f9 Author: Martin K. Petersen <martin.peter...@oracle.com> Date: Wed Apr 18 22:54:59 2018 -0400 scsi: mptsas: Disable WRITE SAME commit 94e5395d2403c8bc2504a7cbe4c4caaacb7b8b84 upstream. First generation MPT Fusion controllers can not translate WRITE SAME when the attached device is a SATA drive. Disable WRITE SAME support. Reported-by: Nikola Ciprich <nikola.cipr...@linuxbox.cz> 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 f4dd54821e6331dacf886a7e4fa5cec73b84ed95 Author: Eric Dumazet <eduma...@google.com> Date: Sun Apr 22 18:29:23 2018 -0700 ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy [ Upstream commit aa8f8778493c85fff480cdf8b349b1e1dcb5f243 ] KMSAN reported use of uninit-value that I tracked to lack of proper size check on RTA_TABLE attribute. I also believe RTA_PREFSRC lacks a similar check. Fixes: 86872cb57925 ("[IPv6] route: FIB6 configuration using struct fib6_config") Fixes: c3968a857a6b ("ipv6: RTA_PREFSRC support for ipv6 route source address selection") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Acked-by: David Ahern <dsah...@gmail.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit e2917cf238a2369f8e171b2eb3daad4ba43bcd05 Author: Cong Wang <xiyou.wangc...@gmail.com> Date: Thu Apr 19 12:25:38 2018 -0700 llc: delete timers synchronously in llc_sk_free() [ Upstream commit b905ef9ab90115d001c1658259af4b1c65088779 ] The connection timers of an llc sock could be still flying after we delete them in llc_sk_free(), and even possibly after we free the sock. We could just wait synchronously here in case of troubles. Note, I leave other call paths as they are, since they may not have to wait, at least we can change them to synchronously when needed. Also, move the code to net/llc/llc_conn.c, which is apparently a better place. Reported-by: <syzbot+f922284c18ea23a8e...@syzkaller.appspotmail.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 14670e490ff9296d1bd3f0c515db942f66f65809 Author: Eric Dumazet <eduma...@google.com> Date: Sun Apr 15 17:52:04 2018 -0700 net: af_packet: fix race in PACKET_{R|T}X_RING [ Upstream commit 5171b37d959641bbc619781caf62e61f7b940871 ] In order to remove the race caught by syzbot [1], we need to lock the socket before using po->tp_version as this could change under us otherwise. This means lock_sock() and release_sock() must be done by packet_set_ring() callers. [1] : BUG: KMSAN: uninit-value in packet_set_ring+0x1254/0x3870 net/packet/af_packet.c:4249 CPU: 0 PID: 20195 Comm: syzkaller707632 Not tainted 4.16.0+ #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 packet_set_ring+0x1254/0x3870 net/packet/af_packet.c:4249 packet_setsockopt+0x12c6/0x5a90 net/packet/af_packet.c:3662 SYSC_setsockopt+0x4b8/0x570 net/socket.c:1849 SyS_setsockopt+0x76/0xa0 net/socket.c:1828 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x449099 RSP: 002b:00007f42b5307ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000070003c RCX: 0000000000449099 RDX: 0000000000000005 RSI: 0000000000000107 RDI: 0000000000000003 RBP: 0000000000700038 R08: 000000000000001c R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000080eecf R14: 00007f42b53089c0 R15: 0000000000000001 Local variable description: ----req_u@packet_setsockopt Variable was created at: packet_setsockopt+0x13f/0x5a90 net/packet/af_packet.c:3612 SYSC_setsockopt+0x4b8/0x570 net/socket.c:1849 Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit c4ded09147f0d0049f085f9b792abe6aff51aa98 Author: Eric Dumazet <eduma...@google.com> Date: Wed Apr 11 14:36:28 2018 -0700 tcp: md5: reject TCP_MD5SIG or TCP_MD5SIG_EXT on established sockets [ Upstream commit 7212303268918b9a203aebeacfdbd83b5e87b20d ] syzbot/KMSAN reported an uninit-value in tcp_parse_options() [1] I believe this was caused by a TCP_MD5SIG being set on live flow. This is highly unexpected, since TCP option space is limited. For instance, presence of TCP MD5 option automatically disables TCP TimeStamp option at SYN/SYNACK time, which we can not do once flow has been established. Really, adding/deleting an MD5 key only makes sense on sockets in CLOSE or LISTEN state. [1] BUG: KMSAN: uninit-value in tcp_parse_options+0xd74/0x1a30 net/ipv4/tcp_input.c:3720 CPU: 1 PID: 6177 Comm: syzkaller192004 Not tainted 4.16.0+ #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676 tcp_parse_options+0xd74/0x1a30 net/ipv4/tcp_input.c:3720 tcp_fast_parse_options net/ipv4/tcp_input.c:3858 [inline] tcp_validate_incoming+0x4f1/0x2790 net/ipv4/tcp_input.c:5184 tcp_rcv_established+0xf60/0x2bb0 net/ipv4/tcp_input.c:5453 tcp_v4_do_rcv+0x6cd/0xd90 net/ipv4/tcp_ipv4.c:1469 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_sendmsg+0xd6/0x100 net/ipv4/tcp.c:1464 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] SYSC_sendto+0x6c3/0x7e0 net/socket.c:1747 SyS_sendto+0x8a/0xb0 net/socket.c:1715 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x448fe9 RSP: 002b:00007fd472c64d38 EFLAGS: 00000216 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000006e5a30 RCX: 0000000000448fe9 RDX: 000000000000029f RSI: 0000000020a88f88 RDI: 0000000000000004 RBP: 00000000006e5a34 R08: 0000000020e68000 R09: 0000000000000010 R10: 00000000200007fd R11: 0000000000000216 R12: 0000000000000000 R13: 00007fff074899ef R14: 00007fd472c659c0 R15: 0000000000000009 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc_node mm/slub.c:2737 [inline] __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:984 [inline] tcp_send_ack+0x18c/0x910 net/ipv4/tcp_output.c:3624 __tcp_ack_snd_check net/ipv4/tcp_input.c:5040 [inline] tcp_ack_snd_check net/ipv4/tcp_input.c:5053 [inline] tcp_rcv_established+0x2103/0x2bb0 net/ipv4/tcp_input.c:5469 tcp_v4_do_rcv+0x6cd/0xd90 net/ipv4/tcp_ipv4.c:1469 sk_backlog_rcv include/net/sock.h:908 [inline] __release_sock+0x2d6/0x680 net/core/sock.c:2271 release_sock+0x97/0x2a0 net/core/sock.c:2786 tcp_sendmsg+0xd6/0x100 net/ipv4/tcp.c:1464 inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] SYSC_sendto+0x6c3/0x7e0 net/socket.c:1747 SyS_sendto+0x8a/0xb0 net/socket.c:1715 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: cfb6eeb4c860 ("[TCP]: MD5 Signature Option (RFC2385) support.") Signed-off-by: Eric Dumazet <eduma...@google.com> Reported-by: syzbot <syzkal...@googlegroups.com> Acked-by: Yuchung Cheng <ych...@google.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 617b89aabca28f676617a106b940f75061ff578e Author: Willem de Bruijn <will...@google.com> Date: Mon Apr 23 17:37:03 2018 -0400 packet: fix bitfield update race [ Upstream commit a6361f0ca4b25460f2cdf3235ebe8115f622901e ] Updates to the bitfields in struct packet_sock are not atomic. Serialize these read-modify-write cycles. Move po->running into a separate variable. Its writes are protected by po->bind_lock (except for one startup case at packet_create). Also replace a textual precondition warning with lockdep annotation. All others are set only in packet_setsockopt. Serialize these updates by holding the socket lock. Analogous to other field updates, also hold the lock when testing whether a ring is active (pg_vec). Fixes: 8dc419447415 ("[PACKET]: Add optional checksum computation for recvmsg") Reported-by: DaeRyong Jeong <threeear...@gmail.com> Reported-by: Byoungyoung Lee <byoungyo...@purdue.edu> Signed-off-by: Willem de Bruijn <will...@google.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit bae70a5f916feb66baa063ceb36716f0a207c29c Author: Cong Wang <xiyou.wangc...@gmail.com> Date: Thu Apr 19 21:54:34 2018 -0700 llc: fix NULL pointer deref for SOCK_ZAPPED [ Upstream commit 3a04ce7130a7e5dad4e78d45d50313747f8c830f ] For SOCK_ZAPPED socket, we don't need to care about llc->sap, so we should just skip these refcount functions in this case. Fixes: f7e43672683b ("llc: hold llc_sap before release_sock()") Reported-by: kernel test robot <l...@intel.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit a5db62f6225e9b5852215c3b0397ef093deb49ff Author: Cong Wang <xiyou.wangc...@gmail.com> Date: Wed Apr 18 11:51:56 2018 -0700 llc: hold llc_sap before release_sock() [ Upstream commit f7e43672683b097bb074a8fe7af9bc600a23f231 ] syzbot reported we still access llc->sap in llc_backlog_rcv() after it is freed in llc_sap_remove_socket(): Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 llc_conn_ac_send_sabme_cmd_p_set_x+0x3a8/0x460 net/llc/llc_c_ac.c:785 llc_exec_conn_trans_actions net/llc/llc_conn.c:475 [inline] llc_conn_service net/llc/llc_conn.c:400 [inline] llc_conn_state_process+0x4e1/0x13a0 net/llc/llc_conn.c:75 llc_backlog_rcv+0x195/0x1e0 net/llc/llc_conn.c:891 sk_backlog_rcv include/net/sock.h:909 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2335 release_sock+0xa4/0x2b0 net/core/sock.c:2850 llc_ui_release+0xc8/0x220 net/llc/af_llc.c:204 llc->sap is refcount'ed and llc_sap_remove_socket() is paired with llc_sap_add_socket(). This can be amended by holding its refcount before llc_sap_remove_socket() and releasing it after release_sock(). Reported-by: <syzbot+6e181fc95081c2cf9...@syzkaller.appspotmail.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 8b467810a29ff4c2335225231a903f18dcf39d5a Author: Guillaume Nault <g.na...@alphalink.fr> Date: Mon Apr 23 16:38:27 2018 +0200 pppoe: check sockaddr length in pppoe_connect() [ Upstream commit a49e2f5d5fb141884452ddb428f551b123d436b5 ] We must validate sockaddr_len, otherwise userspace can pass fewer data than we expect and we end up accessing invalid data. Fixes: 224cf5ad14c0 ("ppp: Move the PPP drivers") Reported-by: syzbot+4f03bdf92fdf9ef5d...@syzkaller.appspotmail.com Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit a0475be870ab18f56df3ee3e925efd1688243b4c Author: Xin Long <lucien....@gmail.com> Date: Tue Apr 24 14:33:37 2018 +0800 team: fix netconsole setup over team [ Upstream commit 9cf2f437ca5b39828984064fad213e68fc17ef11 ] The same fix in Commit dbe173079ab5 ("bridge: fix netconsole setup over bridge") is also needed for team driver. While at it, remove the unnecessary parameter *team from team_port_enable_netpoll(). v1->v2: - fix it in a better way, as does bridge. Fixes: 0fb52a27a04a ("team: cleanup netpoll clode") Reported-by: João Avelino Bellomo Filho <jbell...@redhat.com> Signed-off-by: Xin Long <lucien....@gmail.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> commit 5ac746d5032c3fe7e8e96343c218f928e12f86de Author: Paolo Abeni <pab...@redhat.com> Date: Fri Apr 13 13:59:25 2018 +0200 team: avoid adding twice the same option to the event list [ Upstream commit 4fb0534fb7bbc2346ba7d3a072b538007f4135a5 ] When parsing the options provided by the user space, team_nl_cmd_options_set() insert them in a temporary list to send multiple events with a single message. While each option's attribute is correctly validated, the code does not check for duplicate entries before inserting into the event list. Exploiting the above, the syzbot was able to trigger the following splat: 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/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt index cfaeda4..e6f4b50 100644 --- a/Documentation/devicetree/bindings/arm/davinci.txt +++ b/Documentation/devicetree/bindings/arm/davinci.txt @@ -9,6 +9,10 @@ EnBW AM1808 based CMC board Required root node properties: - compatible = "enbw,cmc", "ti,da850; +LEGO MINDSTORMS EV3 (AM1808 based) +Required root node properties: + - compatible = "lego,ev3", "ti,da850"; + Generic DaVinci Boards ---------------------- diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt b/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt new file mode 100644 index 0000000..6ec1a88 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt @@ -0,0 +1,46 @@ +THS8135 Video DAC +----------------- + +This is the binding for Texas Instruments THS8135 Video DAC bridge. + +Required properties: + +- compatible: Must be "ti,ths8135" + +Required nodes: + +This device has two video ports. Their connections are modelled using the OF +graph bindings specified in Documentation/devicetree/bindings/graph.txt. + +- Video port 0 for RGB input +- Video port 1 for VGA output + +Example +------- + +vga-bridge { + compatible = "ti,ths8135"; + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + vga_bridge_in: endpoint { + remote-endpoint = <&lcdc_out_vga>; + }; + }; + + port@1 { + reg = <1>; + + vga_bridge_out: endpoint { + remote-endpoint = <&vga_con_in>; + }; + }; + }; +}; diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt index d58675e..f4bdc9d 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/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 a344ec2..356ffd6 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -83,6 +83,7 @@ karo Ka-Ro electronics GmbH keymile Keymile GmbH lacie LaCie lantiq Lantiq Semiconductor +lego LEGO Systems A/S lenovo Lenovo Group Ltd. lg LG Corporation linux Linux-specific binding diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 919a329..04f7e4a 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 eb8a10e..04b23a8 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -334,7 +334,7 @@ address perms offset dev inode pathname 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:1001] +a7eb3000-a7ed5000 rw-p 00000000 00:00 0 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 @@ -366,40 +366,11 @@ is not associated with a file: [heap] = the heap of the program [stack] = the stack of the main process - [stack:1001] = the stack of the thread with tid 1001 [vdso] = the "virtual dynamic shared object", the kernel system call handler 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. This is a key difference from the -content of /proc/PID/maps, where you will see all mappings that are being used -as stack by all of those tasks. 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 b2bdea19..9abe552 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -3324,6 +3324,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. 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 0f31568..0000000 --- a/Documentation/mic/mpssd/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# List of programs to build -hostprogs-y := 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 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 cacbdb0..0000000 --- a/Documentation/mic/mpssd/mpss +++ /dev/null @@ -1,202 +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" - -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_X100_DMA & MIC_HOST Modules" - - for f in "mic_host" "mic_x100_dma" - do - modprobe $f - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - failure - echo - return $RETVAL - fi - done - - # 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`" != "offline" ] - do - sleep 1 - echo -e "Waiting for "`basename $f`" to go offline" - 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_HOST & MIC_X100_DMA Modules: " - modprobe -r mic_host mic_x100_dma - 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 3c5c379..0000000 --- a/Documentation/mic/mpssd/mpssd.c +++ /dev/null @@ -1,1728 +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(struct mic_info *mic); - -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 | - 1 << VIRTIO_NET_F_GUEST_UFO), -#else - .host_features = 0, -#endif -}; - -static const char *mic_config_dir = "/etc/sysconfig/mic"; -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); - - pid = fork(); - if (pid == 0) { - ifargv[0] = "ip"; - ifargv[1] = "addr"; - ifargv[2] = "add"; - ifargv[3] = ipaddr; - ifargv[4] = "dev"; - ifargv[5] = dev; - ifargv[6] = NULL; - mpsslog("Configuring %s ipaddr %s\n", dev, ipaddr); - 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; - } - mpsslog("MIC name %s %s %d DONE!\n", - mic->name, __func__, __LINE__); - return 0; -} - -static int tun_alloc(struct mic_info *mic, char *dev) -{ - struct ifreq ifr; - int fd, err; -#if GSO_ENABLED - unsigned offload; -#endif - fd = open("/dev/net/tun", O_RDWR); - if (fd < 0) { - mpsslog("Could not open /dev/net/tun %s\n", strerror(errno)); - goto done; - } - - memset(&ifr, 0, sizeof(ifr)); - - ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; - if (*dev) - strncpy(ifr.ifr_name, dev, IFNAMSIZ); - - err = ioctl(fd, TUNSETIFF, (void *)&ifr); - if (err < 0) { - mpsslog("%s %s %d TUNSETIFF failed %s\n", - mic->name, __func__, __LINE__, strerror(errno)); - close(fd); - return err; - } -#if GSO_ENABLED - offload = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | - TUN_F_TSO_ECN | TUN_F_UFO; - - err = ioctl(fd, TUNSETOFFLOAD, offload); - if (err < 0) { - mpsslog("%s %s %d TUNSETOFFLOAD failed %s\n", - mic->name, __func__, __LINE__, strerror(errno)); - close(fd); - return err; - } -#endif - strcpy(dev, ifr.ifr_name); - mpsslog("Created TAP %s\n", dev); -done: - return fd; -} - -#define NET_FD_VIRTIO_NET 0 -#define NET_FD_TUN 1 -#define MAX_NET_FD 2 - -static void set_dp(struct mic_info *mic, int type, void *dp) -{ - switch (type) { - case VIRTIO_ID_CONSOLE: - mic->mic_console.console_dp = dp; - return; - case VIRTIO_ID_NET: - mic->mic_net.net_dp = dp;
_______________________________________________ unionfs-cvs mailing list: http://unionfs.filesystems.org/ unionfs-cvs@fsl.cs.sunysb.edu http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs