1. 16 Sep, 2017 1 commit
  2. 15 Sep, 2017 28 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 9db59599
      Linus Torvalds authored
      Pull more KVM updates from Paolo Bonzini:
       - PPC bugfixes
       - RCU splat fix
       - swait races fix
       - pointless userspace-triggerable BUG() fix
       - misc fixes for KVM_RUN corner cases
       - nested virt correctness fixes + one host DoS
       - some cleanups
       - clang build fix
       - fix AMD AVIC with default QEMU command line options
       - x86 bugfixes
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits)
        kvm: nVMX: Handle deferred early VMLAUNCH/VMRESUME failure properly
        kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly
        kvm: nVMX: Remove nested_vmx_succeed after successful VM-entry
        kvm,mips: Fix potential swait_active() races
        kvm,powerpc: Serialize wq active checks in ops->vcpu_kick
        kvm: Serialize wq active checks in kvm_vcpu_wake_up()
        kvm,x86: Fix apf_task_wake_one() wq serialization
        kvm,lapic: Justify use of swait_active()
        kvm,async_pf: Use swq_has_sleeper()
        sched/wait: Add swq_has_sleeper()
        KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
        KVM: Don't accept obviously wrong gsi values via KVM_IRQFD
        kvm: nVMX: Don't allow L2 to access the hardware CR8
        KVM: trace events: update list of exit reasons
        KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously
        KVM: X86: Don't block vCPU if there is pending exception
        KVM: SVM: Add irqchip_split() checks before enabling AVIC
        KVM: Add struct kvm_vcpu pointer parameter to get_enable_apicv()
        KVM: SVM: Refactor AVIC vcpu initialization into avic_init_vcpu()
        KVM: x86: fix clang build
        ...
      9db59599
    • Linus Torvalds's avatar
      Merge tag 'firmware_removal-4.14-rc1' of... · b38923a0
      Linus Torvalds authored
      Merge tag 'firmware_removal-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull firmware removal from Greg KH:
       "Many many years ago (at the kernel summit in Boston), we all came to
        the agreement that the firmware/ tree should be dropped from the
        kernel, and everyone use the linux-firmware package instead. For some
        minor reason, David Woodhouse didn't send the pull request at that
        point in time, and everyone forgot about this.
      
        The topic came up in the hallway track at the Plumbers conference this
        week, so here's a single patch that drops the whole firmware tree. The
        last firmware update was back in 2013, and all distros have been using
        linux-firmware instead since at least that year, if not before. The
        only commits to that directory since 2013 was some kbuild fixups for
        various build tool issues.
      
        So lets finally drop this, we don't need to lug them around in the
        kernel source tree anymore, especially as no one wants or uses them.
      
        This has passed build testing with 0-day, I don't think it made it
        into linux-next this week, but I figured it was good to get in before
        4.14-rc1 was out"
      
      * tag 'firmware_removal-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        firmware: delete in-kernel firmware
      b38923a0
    • Linus Torvalds's avatar
      Merge tag 'nios2-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · 866a30ef
      Linus Torvalds authored
      Pull arch/nios2 update from Ley Foon Tan.
      
      * tag 'nios2-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: time: Read timer in get_cycles only if initialized
        nios2: add earlycon support to 3c120 devboard DTS
      866a30ef
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 418702b9
      Linus Torvalds authored
      Pull powerpc fix from Michael Ellerman:
       "Just one fix, for the handling of alignment interrupts on dcbz
        instructions.
      
        Thanks to Paul Mackerras, Christian Zigotzky, Michal Sojka"
      
      * tag 'powerpc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Fix handling of alignment interrupt on dcbz instruction
      418702b9
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.14-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · 30db202e
      Linus Torvalds authored
      Pull orangefs updates from Mike Marshall:
       "Some cleanups and a big bug fix for ACLs.
      
        When I was reviewing Jan Kara's ACL patch, I realized that Orangefs
        ACL code was busted, not just in the kernel module, but in the server
        as well. I've been working on the code in the server mostly, but
        here's one kernel patch, there will be more"
      
      * tag 'for-linus-4.14-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: Adjust three checks for null pointers
        orangefs: Use kcalloc() in orangefs_prepare_cdm_array()
        orangefs: Delete error messages for a failed memory allocation in five functions
        orangefs: constify xattr_handler structure
        orangefs: don't call filemap_write_and_wait from fsync
        orangefs: off by ones in xattr size checks
        orangefs: documentation clean up
        orangefs: react properly to posix_acl_update_mode's aftermath.
        orangefs: Don't clear SGID when inheriting ACLs
      30db202e
    • Jim Mattson's avatar
      kvm: nVMX: Handle deferred early VMLAUNCH/VMRESUME failure properly · 4f350c6d
      Jim Mattson authored
      When emulating a nested VM-entry from L1 to L2, several control field
      validation checks are deferred to the hardware. Should one of these
      validation checks fail, vcpu_vmx_run will set the vmx->fail flag. When
      this happens, the L2 guest state is not loaded (even in part), and
      execution should continue in L1 with the next instruction after the
      VMLAUNCH/VMRESUME.
      
      The VMCS12 is not modified (except for the VM-instruction error
      field), the VMCS12 MSR save/load lists are not processed, and the CPU
      state is not loaded from the VMCS12 host area. Moreover, the vmcs02
      exit reason is stale, so it should not be consulted for any reason.
      Signed-off-by: default avatarJim Mattson <jmattson@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4f350c6d
    • Jim Mattson's avatar
      kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly · b060ca3b
      Jim Mattson authored
      On an early VMLAUNCH/VMRESUME failure (i.e. one which sets the
      VM-instruction error field of the current VMCS), the launch state of
      the current VMCS is not set to "launched," and the VM-exit information
      fields of the current VMCS (including IDT-vectoring information and
      exit reason) are stale.
      
      On a late VMLAUNCH/VMRESUME failure (i.e. one which sets the high bit
      of the exit reason field), the launch state of the current VMCS is not
      set to "launched," and only two of the VM-exit information fields of
      the current VMCS are modified (exit reason and exit
      qualification). The remaining VM-exit information fields of the
      current VMCS (including IDT-vectoring information, in particular) are
      stale.
      Signed-off-by: default avatarJim Mattson <jmattson@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b060ca3b
    • Jim Mattson's avatar
      kvm: nVMX: Remove nested_vmx_succeed after successful VM-entry · 7881f96c
      Jim Mattson authored
      After a successful VM-entry, RFLAGS is cleared, with the exception of
      bit 1, which is always set. This is handled by load_vmcs12_host_state.
      Signed-off-by: default avatarJim Mattson <jmattson@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7881f96c
    • Davidlohr Bueso's avatar
      kvm,mips: Fix potential swait_active() races · 4c0b4bc6
      Davidlohr Bueso authored
      For example, the following could occur, making us miss a wakeup:
      
      CPU0					CPU1
      kvm_vcpu_block				kvm_mips_comparecount_func
      					  [L] swait_active(&vcpu->wq)
        [S] prepare_to_swait(&vcpu->wq)
        [L] if (!kvm_vcpu_has_pending_timer(vcpu))
               schedule()                       [S] queue_timer_int(vcpu)
      
      Ensure that the swait_active() check is not hoisted over the interrupt.
      Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4c0b4bc6
    • Davidlohr Bueso's avatar
      kvm,powerpc: Serialize wq active checks in ops->vcpu_kick · 267ad7bc
      Davidlohr Bueso authored
      Particularly because kvmppc_fast_vcpu_kick_hv() is a callback,
      ensure that we properly serialize wq active checks in order to
      avoid potentially missing a wakeup due to racing with the waiter
      side.
      Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      267ad7bc
    • Davidlohr Bueso's avatar
      kvm: Serialize wq active checks in kvm_vcpu_wake_up() · 5e0018b3
      Davidlohr Bueso authored
      This is a generic call and can be suceptible to races
      in reading the wq task_list while another task is adding
      itself to the list. Add a full barrier by using the
      swq_has_sleeper() helper.
      Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      5e0018b3
    • Davidlohr Bueso's avatar
      kvm,x86: Fix apf_task_wake_one() wq serialization · a0cff57b
      Davidlohr Bueso authored
      During code inspection, the following potential race was seen:
      
      CPU0   	    		    	     	CPU1
      kvm_async_pf_task_wait			apf_task_wake_one
      					  [L] swait_active(&n->wq)
        [S] prepare_to_swait(&n.wq)
        [L] if (!hlist_unhahed(&n.link))
      	schedule()			  [S] hlist_del_init(&n->link);
      
      Properly serialize swait_active() checks such that a wakeup is
      not missed.
      Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a0cff57b
    • Davidlohr Bueso's avatar
      kvm,lapic: Justify use of swait_active() · cc1b4680
      Davidlohr Bueso authored
      A comment might serve future readers.
      Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cc1b4680
    • Davidlohr Bueso's avatar
      kvm,async_pf: Use swq_has_sleeper() · b9f67a42
      Davidlohr Bueso authored
      ... as we've got the new helper now. This caller already
      does the right thing, hence no changes in semantics.
      Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b9f67a42
    • Davidlohr Bueso's avatar
      sched/wait: Add swq_has_sleeper() · 8cd641e3
      Davidlohr Bueso authored
      Which is the equivalent of what we have in regular waitqueues.
      I'm not crazy about the name, but this also helps us get both
      apis closer -- which iirc comes originally from the -net folks.
      
      We also duplicate the comments for the lockless swait_active(),
      from wait.h. Future users will make use of this interface.
      Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8cd641e3
    • Jan H. Schönherr's avatar
      KVM: VMX: Do not BUG() on out-of-bounds guest IRQ · 3a8b0677
      Jan H. Schönherr authored
      The value of the guest_irq argument to vmx_update_pi_irte() is
      ultimately coming from a KVM_IRQFD API call. Do not BUG() in
      vmx_update_pi_irte() if the value is out-of bounds. (Especially,
      since KVM as a whole seems to hang after that.)
      
      Instead, print a message only once if we find that we don't have a
      route for a certain IRQ (which can be out-of-bounds or within the
      array).
      
      This fixes CVE-2017-1000252.
      
      Fixes: efc64404 ("KVM: x86: Update IRTE for posted-interrupts")
      Signed-off-by: default avatarJan H. Schönherr <jschoenh@amazon.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      3a8b0677
    • Jan H. Schönherr's avatar
      KVM: Don't accept obviously wrong gsi values via KVM_IRQFD · 36ae3c0a
      Jan H. Schönherr authored
      We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see
      kvm_set_irq_routing(). Hence, there is no sense in accepting them
      via KVM_IRQFD. Prevent them from entering the system in the first
      place.
      Signed-off-by: default avatarJan H. Schönherr <jschoenh@amazon.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      36ae3c0a
    • Guenter Roeck's avatar
      nios2: time: Read timer in get_cycles only if initialized · 65d1e3dd
      Guenter Roeck authored
      Mainline crashes as follows when running nios2 images.
      
      On node 0 totalpages: 65536
      free_area_init_node: node 0, pgdat c8408fa0, node_mem_map c8726000
        Normal zone: 512 pages used for memmap
        Normal zone: 0 pages reserved
        Normal zone: 65536 pages, LIFO batch:15
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      ea = c8003cb0, ra = c81cbf40, cause = 15
      Kernel panic - not syncing: Oops
      
      Problem is seen because get_cycles() is called before the timer it depends
      on is initialized. Returning 0 in that situation fixes the problem.
      
      Fixes: 33d72f38 ("init/main.c: extract early boot entropy from the ..")
      Cc: Laura Abbott <labbott@redhat.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Daniel Micay <danielmicay@gmail.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      65d1e3dd
    • Tobias Klauser's avatar
      nios2: add earlycon support to 3c120 devboard DTS · 8993d5e4
      Tobias Klauser authored
      Allow earlycon to be used on the JTAG UART present in the 3c120 GHRD.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      8993d5e4
    • Jim Mattson's avatar
      kvm: nVMX: Don't allow L2 to access the hardware CR8 · 51aa68e7
      Jim Mattson authored
      If L1 does not specify the "use TPR shadow" VM-execution control in
      vmcs12, then L0 must specify the "CR8-load exiting" and "CR8-store
      exiting" VM-execution controls in vmcs02. Failure to do so will give
      the L2 VM unrestricted read/write access to the hardware CR8.
      
      This fixes CVE-2017-12154.
      Signed-off-by: default avatarJim Mattson <jmattson@google.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      51aa68e7
    • Mimi Zohar's avatar
      vfs: constify path argument to kernel_read_file_from_path · 711aab1d
      Mimi Zohar authored
      This patch constifies the path argument to kernel_read_file_from_path().
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      711aab1d
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 6ed0529f
      Linus Torvalds authored
      Pull more NFS client updates from Trond Myklebust:
       "Hightlights include:
      
        Bugfixes:
         - Various changes relating to reporting IO errors.
         - pnfs: Use the standard I/O stateid when calling LAYOUTGET
      
        Features:
         - Add static NFS I/O tracepoints for debugging"
      
      * tag 'nfs-for-4.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: various changes relating to reporting IO errors.
        NFS: Add static NFS I/O tracepoints
        pNFS: Use the standard I/O stateid when calling LAYOUTGET
      6ed0529f
    • Linus Torvalds's avatar
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 9e0ce554
      Linus Torvalds authored
      Pull misc leftovers from Al Viro.
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix the __user misannotations in asm-generic get_user/put_user
        fput: Don't reinvent the wheel but use existing llist API
        namespace.c: Don't reinvent the wheel but use existing llist API
      9e0ce554
    • Linus Torvalds's avatar
      Merge branch 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · e253d98f
      Linus Torvalds authored
      Pull nowait read support from Al Viro:
       "Support IOCB_NOWAIT for buffered reads and block devices"
      
      * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        block_dev: support RFW_NOWAIT on block device nodes
        fs: support RWF_NOWAIT for buffered reads
        fs: support IOCB_NOWAIT in generic_file_buffered_read
        fs: pass iocb to do_generic_file_read
      e253d98f
    • Linus Torvalds's avatar
      Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 0f0d1272
      Linus Torvalds authored
      Pull mount flag updates from Al Viro:
       "Another chunk of fmount preparations from dhowells; only trivial
        conflicts for that part. It separates MS_... bits (very grotty
        mount(2) ABI) from the struct super_block ->s_flags (kernel-internal,
        only a small subset of MS_... stuff).
      
        This does *not* convert the filesystems to new constants; only the
        infrastructure is done here. The next step in that series is where the
        conflicts would be; that's the conversion of filesystems. It's purely
        mechanical and it's better done after the merge, so if you could run
        something like
      
      	list=$(for i in MS_RDONLY MS_NOSUID MS_NODEV MS_NOEXEC MS_SYNCHRONOUS MS_MANDLOCK MS_DIRSYNC MS_NOATIME MS_NODIRATIME MS_SILENT MS_POSIXACL MS_KERNMOUNT MS_I_VERSION MS_LAZYTIME; do git grep -l $i fs drivers/staging/lustre drivers/mtd ipc mm include/linux; done|sort|uniq|grep -v '^fs/namespace.c$')
      
      	sed -i -e 's/\<MS_RDONLY\>/SB_RDONLY/g' \
      	        -e 's/\<MS_NOSUID\>/SB_NOSUID/g' \
      	        -e 's/\<MS_NODEV\>/SB_NODEV/g' \
      	        -e 's/\<MS_NOEXEC\>/SB_NOEXEC/g' \
      	        -e 's/\<MS_SYNCHRONOUS\>/SB_SYNCHRONOUS/g' \
      	        -e 's/\<MS_MANDLOCK\>/SB_MANDLOCK/g' \
      	        -e 's/\<MS_DIRSYNC\>/SB_DIRSYNC/g' \
      	        -e 's/\<MS_NOATIME\>/SB_NOATIME/g' \
      	        -e 's/\<MS_NODIRATIME\>/SB_NODIRATIME/g' \
      	        -e 's/\<MS_SILENT\>/SB_SILENT/g' \
      	        -e 's/\<MS_POSIXACL\>/SB_POSIXACL/g' \
      	        -e 's/\<MS_KERNMOUNT\>/SB_KERNMOUNT/g' \
      	        -e 's/\<MS_I_VERSION\>/SB_I_VERSION/g' \
      	        -e 's/\<MS_LAZYTIME\>/SB_LAZYTIME/g' \
      	        $list
      
        and commit it with something along the lines of 'convert filesystems
        away from use of MS_... constants' as commit message, it would save a
        quite a bit of headache next cycle"
      
      * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        VFS: Differentiate mount flags (MS_*) from internal superblock flags
        VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)
        vfs: Add sb_rdonly(sb) to query the MS_RDONLY flag on s_flags
      0f0d1272
    • Linus Torvalds's avatar
      Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 581bfce9
      Linus Torvalds authored
      Pull more set_fs removal from Al Viro:
       "Christoph's 'use kernel_read and friends rather than open-coding
        set_fs()' series"
      
      * 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fs: unexport vfs_readv and vfs_writev
        fs: unexport vfs_read and vfs_write
        fs: unexport __vfs_read/__vfs_write
        lustre: switch to kernel_write
        gadget/f_mass_storage: stop messing with the address limit
        mconsole: switch to kernel_read
        btrfs: switch write_buf to kernel_write
        net/9p: switch p9_fd_read to kernel_write
        mm/nommu: switch do_mmap_private to kernel_read
        serial2002: switch serial2002_tty_write to kernel_{read/write}
        fs: make the buf argument to __kernel_write a void pointer
        fs: fix kernel_write prototype
        fs: fix kernel_read prototype
        fs: move kernel_read to fs/read_write.c
        fs: move kernel_write to fs/read_write.c
        autofs4: switch autofs4_write to __kernel_write
        ashmem: switch to ->read_iter
      581bfce9
    • Linus Torvalds's avatar
      Merge branch 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · cc73fee0
      Linus Torvalds authored
      Pull ipc compat cleanup and 64-bit time_t from Al Viro:
       "IPC copyin/copyout sanitizing, including 64bit time_t work from Deepa
        Dinamani"
      
      * 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        utimes: Make utimes y2038 safe
        ipc: shm: Make shmid_kernel timestamps y2038 safe
        ipc: sem: Make sem_array timestamps y2038 safe
        ipc: msg: Make msg_queue timestamps y2038 safe
        ipc: mqueue: Replace timespec with timespec64
        ipc: Make sys_semtimedop() y2038 safe
        get rid of SYSVIPC_COMPAT on ia64
        semtimedop(): move compat to native
        shmat(2): move compat to native
        msgrcv(2), msgsnd(2): move compat to native
        ipc(2): move compat to native
        ipc: make use of compat ipc_perm helpers
        semctl(): move compat to native
        semctl(): separate all layout-dependent copyin/copyout
        msgctl(): move compat to native
        msgctl(): split the actual work from copyin/copyout
        ipc: move compat shmctl to native
        shmctl: split the work from copyin/copyout
      cc73fee0
    • Linus Torvalds's avatar
      Merge branch 'zstd-minimal' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · e7cdb60f
      Linus Torvalds authored
      Pull zstd support from Chris Mason:
       "Nick Terrell's patch series to add zstd support to the kernel has been
        floating around for a while. After talking with Dave Sterba, Herbert
        and Phillip, we decided to send the whole thing in as one pull
        request.
      
        zstd is a big win in speed over zlib and in compression ratio over
        lzo, and the compression team here at FB has gotten great results
        using it in production. Nick will continue to update the kernel side
        with new improvements from the open source zstd userland code.
      
        Nick has a number of benchmarks for the main zstd code in his lib/zstd
        commit:
      
            I ran the benchmarks on a Ubuntu 14.04 VM with 2 cores and 4 GiB
            of RAM. The VM is running on a MacBook Pro with a 3.1 GHz Intel
            Core i7 processor, 16 GB of RAM, and a SSD. I benchmarked using
            `silesia.tar` [3], which is 211,988,480 B large. Run the following
            commands for the benchmark:
      
              sudo modprobe zstd_compress_test
              sudo mknod zstd_compress_test c 245 0
              sudo cp silesia.tar zstd_compress_test
      
            The time is reported by the time of the userland `cp`.
            The MB/s is computed with
      
              1,536,217,008 B / time(buffer size, hash)
      
            which includes the time to copy from userland.
            The Adjusted MB/s is computed with
      
              1,536,217,088 B / (time(buffer size, hash) - time(buffer size, none)).
      
            The memory reported is the amount of memory the compressor
            requests.
      
              | Method   | Size (B) | Time (s) | Ratio | MB/s    | Adj MB/s | Mem (MB) |
              |----------|----------|----------|-------|---------|----------|----------|
              | none     | 11988480 |    0.100 |     1 | 2119.88 |        - |        - |
              | zstd -1  | 73645762 |    1.044 | 2.878 |  203.05 |   224.56 |     1.23 |
              | zstd -3  | 66988878 |    1.761 | 3.165 |  120.38 |   127.63 |     2.47 |
              | zstd -5  | 65001259 |    2.563 | 3.261 |   82.71 |    86.07 |     2.86 |
              | zstd -10 | 60165346 |   13.242 | 3.523 |   16.01 |    16.13 |    13.22 |
              | zstd -15 | 58009756 |   47.601 | 3.654 |    4.45 |     4.46 |    21.61 |
              | zstd -19 | 54014593 |  102.835 | 3.925 |    2.06 |     2.06 |    60.15 |
              | zlib -1  | 77260026 |    2.895 | 2.744 |   73.23 |    75.85 |     0.27 |
              | zlib -3  | 72972206 |    4.116 | 2.905 |   51.50 |    52.79 |     0.27 |
              | zlib -6  | 68190360 |    9.633 | 3.109 |   22.01 |    22.24 |     0.27 |
              | zlib -9  | 67613382 |   22.554 | 3.135 |    9.40 |     9.44 |     0.27 |
      
            I benchmarked zstd decompression using the same method on the same
            machine. The benchmark file is located in the upstream zstd repo
            under `contrib/linux-kernel/zstd_decompress_test.c` [4]. The
            memory reported is the amount of memory required to decompress
            data compressed with the given compression level. If you know the
            maximum size of your input, you can reduce the memory usage of
            decompression irrespective of the compression level.
      
              | Method   | Time (s) | MB/s    | Adjusted MB/s | Memory (MB) |
              |----------|----------|---------|---------------|-------------|
              | none     |    0.025 | 8479.54 |             - |           - |
              | zstd -1  |    0.358 |  592.15 |        636.60 |        0.84 |
              | zstd -3  |    0.396 |  535.32 |        571.40 |        1.46 |
              | zstd -5  |    0.396 |  535.32 |        571.40 |        1.46 |
              | zstd -10 |    0.374 |  566.81 |        607.42 |        2.51 |
              | zstd -15 |    0.379 |  559.34 |        598.84 |        4.61 |
              | zstd -19 |    0.412 |  514.54 |        547.77 |        8.80 |
              | zlib -1  |    0.940 |  225.52 |        231.68 |        0.04 |
              | zlib -3  |    0.883 |  240.08 |        247.07 |        0.04 |
              | zlib -6  |    0.844 |  251.17 |        258.84 |        0.04 |
              | zlib -9  |    0.837 |  253.27 |        287.64 |        0.04 |
      
        I ran a long series of tests and benchmarks on the btrfs side and the
        gains are very similar to the core benchmarks Nick ran"
      
      * 'zstd-minimal' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        squashfs: Add zstd support
        btrfs: Add zstd support
        lib: Add zstd modules
        lib: Add xxhash module
      e7cdb60f
  3. 14 Sep, 2017 11 commits
    • Paul Mackerras's avatar
      powerpc: Fix handling of alignment interrupt on dcbz instruction · 1bc944ce
      Paul Mackerras authored
      This fixes the emulation of the dcbz instruction in the alignment
      interrupt handler.  The error was that we were comparing just the
      instruction type field of op.type rather than the whole thing,
      and therefore the comparison "type != CACHEOP + DCBZ" was always
      true.
      
      Fixes: 31bfdb03 ("powerpc: Use instruction emulation infrastructure to handle alignment faults")
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      Tested-by: default avatarMichal Sojka <sojkam1@fel.cvut.cz>
      Tested-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      1bc944ce
    • Greg Kroah-Hartman's avatar
      firmware: delete in-kernel firmware · 5620a0d1
      Greg Kroah-Hartman authored
      The last firmware change for the in-kernel firmware source code was back
      in 2013.  Everyone has been relying on the out-of-tree linux-firmware
      package for a long long time.
      
      So let's drop it, it's baggage we don't need to keep dragging around
      (and having to fix random kbuild issues over time...)
      
      Cc: Kyle McMartin <kyle@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Michal Marek <mmarek@suse.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5620a0d1
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · a2bc8dea
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Use Make-builtin $(abspath ...) helper to get absolute path
      
       - Add W=2 extra warning option to detect unused macros
      
       - Use more KCONFIG_CONFIG instead hard-coded .config
      
       - Fix bugs of tar*-pkg targets
      
      * tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: buildtar: do not print successful message if tar returns error
        kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled
        kbuild: Use KCONFIG_CONFIG in buildtar
        Kbuild: enable -Wunused-macros warning for "make W=2"
        kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)
      a2bc8dea
    • Linus Torvalds's avatar
      Merge tag 'for-4.14/dm-changes' of... · dff4d1f6
      Linus Torvalds authored
      Merge tag 'for-4.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper updates from Mike Snitzer:
      
       - Some request-based DM core and DM multipath fixes and cleanups
      
       - Constify a few variables in DM core and DM integrity
      
       - Add bufio optimization and checksum failure accounting to DM
         integrity
      
       - Fix DM integrity to avoid checking integrity of failed reads
      
       - Fix DM integrity to use init_completion
      
       - A couple DM log-writes target fixes
      
       - Simplify DAX flushing by eliminating the unnecessary flush
         abstraction that was stood up for DM's use.
      
      * tag 'for-4.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dax: remove the pmem_dax_ops->flush abstraction
        dm integrity: use init_completion instead of COMPLETION_INITIALIZER_ONSTACK
        dm integrity: make blk_integrity_profile structure const
        dm integrity: do not check integrity for failed read operations
        dm log writes: fix >512b sectorsize support
        dm log writes: don't use all the cpu while waiting to log blocks
        dm ioctl: constify ioctl lookup table
        dm: constify argument arrays
        dm integrity: count and display checksum failures
        dm integrity: optimize writing dm-bufio buffers that are partially changed
        dm rq: do not update rq partially in each ending bio
        dm rq: make dm-sq requeuing behavior consistent with dm-mq behavior
        dm mpath: complain about unsupported __multipath_map_bio() return values
        dm mpath: avoid that building with W=1 causes gcc 7 to complain about fall-through
      dff4d1f6
    • Linus Torvalds's avatar
      Merge tag 'fbdev-v4.14' of git://github.com/bzolnier/linux · 503f0453
      Linus Torvalds authored
      Pull fbdev updates from Bartlomiej Zolnierkiewicz:
      
       - make fbcon a built-time depency for fbdev (fbcon was tristate option
         before, now it is a bool) - this is a first step in preparations for
         making console_lock usage saner (currently it acts like the BKL for
         all things fbdev/fbcon) (Daniel Vetter)
      
       - add fbcon=margin:<color> command line option to select the fbcon
         margin color (David Lechner)
      
       - add DMI quirk table for x86 systems which need fbcon rotation
         (devices like Asus T100HA, GPD Pocket, the GPD win and the I.T.Works
         TW891) (Hans de Goede)
      
       - fix 1bpp logo support for unusual width (needed by LEGO MINDSTORMS
         EV3) (David Lechner)
      
       - enable Xilinx FB driver for ARM ZynqMP platform (Michal Simek)
      
       - fix use after free in the error path of udlfb driver (Anton Vasilyev)
      
       - fix error return code handling in pxa3xx_gcu driver (Gustavo A. R.
         Silva)
      
       - fix bootparams.screeninfo arguments checking in vgacon (Jan H.
         Schönherr)
      
       - do not leak uninitialized padding in clk to userspace in the debug
         code of atyfb driver (Vladis Dronov)
      
       - fix compiler warnings in fbcon code and matroxfb driver (Arnd
         Bergmann)
      
       - convert fbdev susbsytem to using %pOF instead of full_name (Rob
         Herring)
      
       - structures constifications (Arvind Yadav, Bhumika Goyal, Gustavo A.
         R. Silva, Julia Lawall)
      
       - misc cleanups (Gustavo A. R. Silva, Hyun Kwon, Julia Lawall, Kuninori
         Morimoto, Lynn Lei)
      
      * tag 'fbdev-v4.14' of git://github.com/bzolnier/linux: (75 commits)
        video/console: Update BIOS dates list for GPD win console rotation DMI quirk
        video/console: Add rotated LCD-panel DMI quirk for the VIOS LTH17
        video: fbdev: sis: fix duplicated code for different branches
        video: fbdev: make fb_var_screeninfo const
        video: fbdev: aty: do not leak uninitialized padding in clk to userspace
        vgacon: Prevent faulty bootparams.screeninfo from causing harm
        video: fbdev: make fb_videomode const
        video/console: Add new BIOS date for GPD pocket to dmi quirk table
        fbcon: remove restriction on margin color
        video: ARM CLCD: constify amba_id
        video: fm2fb: constify zorro_device_id
        video: fbdev: annotate fb_fix_screeninfo with const and __initconst
        omapfb: constify omap_video_timings structures
        video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path
        fbdev: i810: make fb_ops const
        fbdev: matrox: make fb_ops const
        video: fbdev: pxa3xx_gcu: fix error return code in pxa3xx_gcu_probe()
        video: fbdev: Enable Xilinx FB for ZynqMP
        video: fbdev: Fix multiple style issues in xilinxfb
        video: fbdev: udlfb: constify usb_device_id.
        ...
      503f0453
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · 939ae589
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - add support for the watchdog on Meson8 and Meson8m2
      
       - add support for MediaTek MT7623 and MT7622 SoC
      
       - add support for the r8a77995 wdt
      
       - explicitly request exclusive reset control for asm9260_wdt,
         zx2967_wdt, rt2880_wdt and mt7621_wdt
      
       - improvements to asm9260_wdt, aspeed_wdt, renesas_wdt and cadence_wdt
      
       - add support for reading freq via CCF + suspend/resume support for
         of_xilinx_wdt
      
       - constify watchdog_ops and various device-id structures
      
       - revert of commit 1fccb730 ("iTCO_wdt: all versions count down
         twice") (Bug 196509)
      
      * git://www.linux-watchdog.org/linux-watchdog: (40 commits)
        watchdog: mei_wdt: constify mei_cl_device_id
        watchdog: sp805: constify amba_id
        watchdog: ziirave: constify i2c_device_id
        watchdog: sc1200: constify pnp_device_id
        dt-bindings: watchdog: renesas-wdt: Add support for the r8a77995 wdt
        watchdog: renesas_wdt: update copyright dates
        watchdog: renesas_wdt: make 'clk' a variable local to probe()
        watchdog: renesas_wdt: consistently use RuntimePM for clock management
        watchdog: aspeed: Support configuration of external signal properties
        dt-bindings: watchdog: aspeed: External reset signal properties
        drivers/watchdog: Add optional ASPEED device tree properties
        drivers/watchdog: ASPEED reference dev tree properties for config
        watchdog: da9063_wdt: Simplify by removing unneeded struct...
        watchdog: bcm7038: Check the return value from clk_prepare_enable()
        watchdog: qcom: Check for platform_get_resource() failure
        watchdog: of_xilinx_wdt: Add suspend/resume support
        watchdog: of_xilinx_wdt: Add support for reading freq via CCF
        dt-bindings: watchdog: mediatek: add support for MediaTek MT7623 and MT7622 SoC
        watchdog: max77620_wdt: constify platform_device_id
        watchdog: pcwd_usb: constify usb_device_id
        ...
      939ae589
    • Linus Torvalds's avatar
      Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · e75f801f
      Linus Torvalds authored
      Pull dmi update from Jean Delvare:
       "Mark all struct dmi_system_id instances const"
      
      * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        dmi: Mark all struct dmi_system_id instances const
      e75f801f
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · ba768535
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "This slew of fixes for pin control was noticed and patched up early,
        so to get the annoyance out of the way for -rc1 it would make sense to
        send them already.
      
         - Fix a build include in the Uniphier driver to keep pace with
           ongoing refactorings.
      
         - Fix a slew of minor semantic and syntactic issues as well as
           stricting up Kconfig for the new Spreadtrum driver.
      
         - Fix the GPIO interrupt set-up on the Marvell 37xx Armada as fallout
           for dynamically allocating irq descriptors from the core. (Also
           tagged for stable.)
      
         - Fix AMD register suspend/resume state spool/unspooling so that
           wakeup works as it should. (Also tagged for stable.)"
      
      * tag 'pinctrl-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl/amd: save pin registers over suspend/resume
        pinctrl: armada-37xx: Fix gpio interrupt setup
        pinctrl: sprd: fix off by one bugs
        pinctrl: sprd: check for allocation failure
        pinctrl: sprd: Restrict PINCTRL_SPRD to ARCH_SPRD or COMPILE_TEST
        pinctrl: sprd: fix build errors and dependencies
        pinctrl: sprd: make three local functions static
        pinctrl: uniphier: include <linux/build_bug.h> instead of <linux/bug.h>
      ba768535
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 7a95bdb0
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "A few leftovers"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm, page_owner: skip unnecessary stack_trace entries
        arm64: stacktrace: avoid listing stacktrace functions in stacktrace
        mm: treewide: remove GFP_TEMPORARY allocation flag
        IB/mlx4: fix sprintf format warning
        fscache: fix fscache_objlist_show format processing
        lib/test_bitmap.c: use ULL suffix for 64-bit constants
        procfs: remove unused variable
        drivers/media/cec/cec-adap.c: fix build with gcc-4.4.4
        idr: remove WARN_ON_ONCE() when trying to replace negative ID
      7a95bdb0
    • Markus Elfring's avatar
      orangefs: Adjust three checks for null pointers · 0b08273c
      Markus Elfring authored
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      
      The script “checkpatch.pl” pointed information out like the following.
      
      Comparison to NULL could be written !…
      
      Thus fix affected source code places.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      0b08273c
    • Markus Elfring's avatar
      orangefs: Use kcalloc() in orangefs_prepare_cdm_array() · 5e273a0e
      Markus Elfring authored
      * A multiplication for the size determination of a memory allocation
        indicated that an array data structure should be processed.
        Thus use the corresponding function "kcalloc".
      
        This issue was detected by using the Coccinelle software.
      
      * Replace the specification of a data structure by a pointer dereference
        to make the corresponding size determination a bit safer according to
        the Linux coding style convention.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      5e273a0e