1. 09 Sep, 2018 2 commits
  2. 08 Sep, 2018 4 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · f8f65382
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "ARM:
         - Fix a VFP corruption in 32-bit guest
         - Add missing cache invalidation for CoW pages
         - Two small cleanups
      
        s390:
         - Fallout from the hugetlbfs support: pfmf interpretion and locking
         - VSIE: fix keywrapping for nested guests
      
        PPC:
         - Fix a bug where pages might not get marked dirty, causing guest
           memory corruption on migration
         - Fix a bug causing reads from guest memory to use the wrong guest
           real address for very large HPT guests (>256G of memory), leading
           to failures in instruction emulation.
      
        x86:
         - Fix out of bound access from malicious pv ipi hypercalls
           (introduced in rc1)
         - Fix delivery of pending interrupts when entering a nested guest,
           preventing arbitrarily late injection
         - Sanitize kvm_stat output after destroying a guest
         - Fix infinite loop when emulating a nested guest page fault and
           improve the surrounding emulation code
         - Two minor cleanups"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits)
        KVM: LAPIC: Fix pv ipis out-of-bounds access
        KVM: nVMX: Fix loss of pending IRQ/NMI before entering L2
        arm64: KVM: Remove pgd_lock
        KVM: Remove obsolete kvm_unmap_hva notifier backend
        arm64: KVM: Only force FPEXC32_EL2.EN if trapping FPSIMD
        KVM: arm/arm64: Clean dcache to PoC when changing PTE due to CoW
        KVM: s390: Properly lock mm context allow_gmap_hpage_1m setting
        KVM: s390: vsie: copy wrapping keys to right place
        KVM: s390: Fix pfmf and conditional skey emulation
        tools/kvm_stat: re-animate display of dead guests
        tools/kvm_stat: indicate dead guests as such
        tools/kvm_stat: handle guest removals more gracefully
        tools/kvm_stat: don't reset stats when setting PID filter for debugfs
        tools/kvm_stat: fix updates for dead guests
        tools/kvm_stat: fix handling of invalid paths in debugfs provider
        tools/kvm_stat: fix python3 issues
        KVM: x86: Unexport x86_emulate_instruction()
        KVM: x86: Rename emulate_instruction() to kvm_emulate_instruction()
        KVM: x86: Do not re-{try,execute} after failed emulation in L2
        KVM: x86: Default to not allowing emulation retry in kvm_mmu_page_fault
        ...
      f8f65382
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 0f3aa48a
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A few more fixes who have trickled in:
      
         - MMC bus width fixup for some Allwinner platforms
      
         - Fix for NULL deref in ti-aemif when no platform data is passed in
      
         - Fix div by 0 in SCMI code
      
         - Add a missing module alias in a new RPi driver"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        memory: ti-aemif: fix a potential NULL-pointer dereference
        firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero
        hwmon: rpi: add module alias to raspberrypi-hwmon
        arm64: allwinner: dts: h6: fix Pine H64 MMC bus width
      0f3aa48a
    • Olof Johansson's avatar
      Merge tag 'sunxi-fixes-for-4.19' of... · a132bb90
      Olof Johansson authored
      Merge tag 'sunxi-fixes-for-4.19' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes
      
      Allwinner fixes for 4.19
      
      Just one fix for H6 mmc on the Pine H64: the mmc bus width was missing
      from the device tree. This was added in 4.19-rc1.
      
      * tag 'sunxi-fixes-for-4.19' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
        arm64: allwinner: dts: h6: fix Pine H64 MMC bus width
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      a132bb90
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · d7b686eb
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
      
       - bugfixes for uniphier, i801, and xiic drivers
      
       - ID removal (never produced) for imx
      
       - one MAINTAINER addition
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: xiic: Record xilinx i2c with Zynq fragment
        i2c: xiic: Make the start and the byte count write atomic
        i2c: i801: fix DNV's SMBCTRL register offset
        i2c: imx-lpi2c: Remove mx8dv compatible entry
        dt-bindings: imx-lpi2c: Remove mx8dv compatible entry
        i2c: uniphier-f: issue STOP only for last message or I2C_M_STOP
        i2c: uniphier: issue STOP only for last message or I2C_M_STOP
      d7b686eb
  3. 07 Sep, 2018 21 commits
  4. 06 Sep, 2018 13 commits
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_4.19_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 2601dd39
      Linus Torvalds authored
      Pull MIPS fix from Paul Burton:
       "A single fix for v4.19-rc3, resolving a problem with our VDSO data
        page for systems with dcache aliasing. Those systems could previously
        observe stale data, causing clock_gettime() & gettimeofday() to return
        incorrect values"
      
      * tag 'mips_fixes_4.19_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: VDSO: Match data page cache colouring when D$ aliases
      2601dd39
    • Linus Torvalds's avatar
      Merge tag '4.19-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · c6ff25ce
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Four small SMB3 fixes, three for stable, and one minor debug
        clarification"
      
      * tag '4.19-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: connect to servername instead of IP for IPC$ share
        smb3: check for and properly advertise directory lease support
        smb3: minor debugging clarifications in rfc1001 len processing
        SMB3: Backup intent flag missing for directory opens with backupuid mounts
        fs/cifs: don't translate SFM_SLASH (U+F026) to backslash
      c6ff25ce
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20180906' of git://git.kernel.dk/linux-block · ca16eb34
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Small collection of fixes that should go into this release. This
        contains:
      
         - Small series that fixes a race between blkcg teardown and writeback
           (Dennis Zhou)
      
         - Fix disallowing invalid block size settings from the nbd ioctl (me)
      
         - BFQ fix for a use-after-free on last release of a bfqg (Konstantin
           Khlebnikov)
      
         - Fix for the "don't warn for flush" fix (Mikulas)"
      
      * tag 'for-linus-20180906' of git://git.kernel.dk/linux-block:
        block: bfq: swap puts in bfqg_and_blkg_put
        block: don't warn when doing fsync on read-only devices
        nbd: don't allow invalid blocksize settings
        blkcg: use tryget logic when associating a blkg with a bio
        blkcg: delay blkg destruction until after writeback has finished
        Revert "blk-throttle: fix race between blkcg_bio_issue_check() and cgroup_rmdir()"
      ca16eb34
    • Shubhrajyoti Datta's avatar
      i2c: xiic: Make the start and the byte count write atomic · ae7304c3
      Shubhrajyoti Datta authored
      Disable interrupts while configuring the transfer and enable them back.
      
      We have below as the programming sequence
      1. start and slave address
      2. byte count and stop
      
      In some customer platform there was a lot of interrupts between 1 and 2
      and after slave address (around 7 clock cyles) if 2 is not executed
      then the transaction is nacked.
      
      To fix this case make the 2 writes atomic.
      Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      [wsa: added a newline for better readability]
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      ae7304c3
    • Konstantin Khlebnikov's avatar
      block: bfq: swap puts in bfqg_and_blkg_put · d5274b3c
      Konstantin Khlebnikov authored
      Fix trivial use-after-free. This could be last reference to bfqg.
      
      Fixes: 8f9bebc3 ("block, bfq: access and cache blkg data only when safe")
      Acked-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d5274b3c
    • Bartosz Golaszewski's avatar
      memory: ti-aemif: fix a potential NULL-pointer dereference · 6b45a2b1
      Bartosz Golaszewski authored
      Platform data pointer may be NULL. We check it everywhere but in one
      place. Fix it.
      
      Fixes: 8af70cd2 ("memory: aemif: add support for board files")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      6b45a2b1
    • Mark Rutland's avatar
      arm64: fix erroneous warnings in page freeing functions · fac880c7
      Mark Rutland authored
      In pmd_free_pte_page() and pud_free_pmd_page() we try to warn if they
      hit a present non-table entry. In both cases we'll warn for non-present
      entries, as the VM_WARN_ON() only checks the entry is not a table entry.
      
      This has been observed to result in warnings when booting a v4.19-rc2
      kernel under qemu.
      
      Fix this by bailing out earlier for non-present entries.
      
      Fixes: ec28bb9c ("arm64: Implement page table free interfaces")
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      fac880c7
    • Olof Johansson's avatar
      Merge tag 'arm-soc/for-4.19/drivers-fixes' of https://github.com/Broadcom/stblinux into fixes · e312b6dc
      Olof Johansson authored
      This pull request contains Broadcom ARM/ARM64 SoCs drivers fixes for
      4.19, please pull the following:
      
      - Peter adds an alias to the Raspberry Pi HWMON driver that was just
        merged as part of the 4.19 merge window
      
      * tag 'arm-soc/for-4.19/drivers-fixes' of https://github.com/Broadcom/stblinux:
        hwmon: rpi: add module alias to raspberrypi-hwmon
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      e312b6dc
    • Sudeep Holla's avatar
      firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero · 96d529ba
      Sudeep Holla authored
      Firmware can provide zero as values for sustained performance level and
      corresponding sustained frequency in kHz in order to hide the actual
      frequencies and provide only abstract values. It may endup with divide
      by zero scenario resulting in kernel panic.
      
      Let's set the multiplication factor to one if either one or both of them
      (sustained_perf_level and sustained_freq) are set to zero.
      
      Fixes: a9e3fbfa ("firmware: arm_scmi: add initial support for performance protocol")
      Reported-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      96d529ba
    • Linus Torvalds's avatar
      Merge tag 'apparmor-pr-2018-09-06' of... · db44bf4b
      Linus Torvalds authored
      Merge tag 'apparmor-pr-2018-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
      
      Pull apparmor fix from John Johansen:
       "A fix for an issue syzbot discovered last week:
      
         - Fix for bad debug check when converting secids to secctx"
      
      * tag 'apparmor-pr-2018-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
        apparmor: fix bad debug check in apparmor_secid_to_secctx()
      db44bf4b
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · be65e259
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "This fixes two annoying bugs:
      
         - The first one is a side effect caused by using SRCU for rcuidle
           tracepoints. It seems that the perf was depending on the rcuidle
           tracepoints to make RCU watch when it wasn't.
      
           The real fix will be to have perf use SRCU instead of depending on
           RCU watching, but that can't be done until SRCU is safe to use in
           NMI context (Paul's working on that).
      
         - The second bug fix is for a bug that's been periodically making my
           tests fail randomly for some time. I haven't had time to track it
           down, but finally have. It has to do with stressing NMIs (via perf)
           while enabling or disabling ftrace function handling with lockdep
           enabled.
      
           If an interrupt happens and just as it returns, it sets lockdep
           back to "interrupts enabled" but before it returns an NMI is
           triggered, and if this happens while printk_nmi_enter has a
           breakpoint attached to it (because ftrace is converting it to or
           from nop to call fentry), the breakpoint trap also calls into
           lockdep, and since returning from the NMI to a interrupt handler,
           interrupts were disabled when the NMI went off, lockdep keeps its
           state as interrupts disabled when it returns back from the
           interrupt handler where interrupts are enabled.
      
           This causes lockdep_assert_irqs_enabled() to trigger a false
           positive"
      
      * tag 'trace-v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        printk/tracing: Do not trace printk_nmi_enter()
        tracing: Add back in rcu_irq_enter/exit_irqson() for rcuidle tracepoints
      be65e259
    • Linus Torvalds's avatar
      Merge tag 'for-4.19-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 5404525b
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - fix for improper fsync after hardlink
      
       - fix for a corruption during file deduplication
      
       - use after free fixes
      
       - RCU warning fix
      
       - fix for buffered write to nodatacow file
      
      * tag 'for-4.19-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: Fix suspicious RCU usage warning in btrfs_debug_in_rcu
        btrfs: use after free in btrfs_quota_enable
        btrfs: btrfs_shrink_device should call commit transaction at the end
        btrfs: fix qgroup_free wrong num_bytes in btrfs_subvolume_reserve_metadata
        Btrfs: fix data corruption when deduplicating between different files
        Btrfs: sync log after logging new name
        Btrfs: fix unexpected failure of nocow buffered writes after snapshotting when low on space
      5404525b
    • Steven Rostedt (VMware)'s avatar
      printk/tracing: Do not trace printk_nmi_enter() · d1c392c9
      Steven Rostedt (VMware) authored
      I hit the following splat in my tests:
      
      ------------[ cut here ]------------
      IRQs not enabled as expected
      WARNING: CPU: 3 PID: 0 at kernel/time/tick-sched.c:982 tick_nohz_idle_enter+0x44/0x8c
      Modules linked in: ip6t_REJECT nf_reject_ipv6 ip6table_filter ip6_tables ipv6
      CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.19.0-rc2-test+ #2
      Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014
      EIP: tick_nohz_idle_enter+0x44/0x8c
      Code: ec 05 00 00 00 75 26 83 b8 c0 05 00 00 00 75 1d 80 3d d0 36 3e c1 00
      75 14 68 94 63 12 c1 c6 05 d0 36 3e c1 01 e8 04 ee f8 ff <0f> 0b 58 fa bb a0
      e5 66 c1 e8 25 0f 04 00 64 03 1d 28 31 52 c1 8b
      EAX: 0000001c EBX: f26e7f8c ECX: 00000006 EDX: 00000007
      ESI: f26dd1c0 EDI: 00000000 EBP: f26e7f40 ESP: f26e7f38
      DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010296
      CR0: 80050033 CR2: 0813c6b0 CR3: 2f342000 CR4: 001406f0
      Call Trace:
       do_idle+0x33/0x202
       cpu_startup_entry+0x61/0x63
       start_secondary+0x18e/0x1ed
       startup_32_smp+0x164/0x168
      irq event stamp: 18773830
      hardirqs last  enabled at (18773829): [<c040150c>] trace_hardirqs_on_thunk+0xc/0x10
      hardirqs last disabled at (18773830): [<c040151c>] trace_hardirqs_off_thunk+0xc/0x10
      softirqs last  enabled at (18773824): [<c0ddaa6f>] __do_softirq+0x25f/0x2bf
      softirqs last disabled at (18773767): [<c0416bbe>] call_on_stack+0x45/0x4b
      ---[ end trace b7c64aa79e17954a ]---
      
      After a bit of debugging, I found what was happening. This would trigger
      when performing "perf" with a high NMI interrupt rate, while enabling and
      disabling function tracer. Ftrace uses breakpoints to convert the nops at
      the start of functions to calls to the function trampolines. The breakpoint
      traps disable interrupts and this makes calls into lockdep via the
      trace_hardirqs_off_thunk in the entry.S code. What happens is the following:
      
        do_idle {
      
          [interrupts enabled]
      
          <interrupt> [interrupts disabled]
      	TRACE_IRQS_OFF [lockdep says irqs off]
      	[...]
      	TRACE_IRQS_IRET
      	    test if pt_regs say return to interrupts enabled [yes]
      	    TRACE_IRQS_ON [lockdep says irqs are on]
      
      	    <nmi>
      		nmi_enter() {
      		    printk_nmi_enter() [traced by ftrace]
      		    [ hit ftrace breakpoint ]
      		    <breakpoint exception>
      			TRACE_IRQS_OFF [lockdep says irqs off]
      			[...]
      			TRACE_IRQS_IRET [return from breakpoint]
      			   test if pt_regs say interrupts enabled [no]
      			   [iret back to interrupt]
      	   [iret back to code]
      
          tick_nohz_idle_enter() {
      
      	lockdep_assert_irqs_enabled() [lockdep say no!]
      
      Although interrupts are indeed enabled, lockdep thinks it is not, and since
      we now do asserts via lockdep, it gives a false warning. The issue here is
      that printk_nmi_enter() is called before lockdep_off(), which disables
      lockdep (for this reason) in NMIs. By simply not allowing ftrace to see
      printk_nmi_enter() (via notrace annotation) we keep lockdep from getting
      confused.
      
      Cc: stable@vger.kernel.org
      Fixes: 42a0bb3f ("printk/nmi: generic solution for safe printk in NMI")
      Acked-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      d1c392c9