Skip to content
  1. Aug 01, 2019
    • Vladis Dronov's avatar
      Bluetooth: hci_uart: check for missing tty operations · b36a1552
      Vladis Dronov authored
      Certain ttys operations (pty_unix98_ops) lack tiocmget() and tiocmset()
      functions which are called by the certain HCI UART protocols (hci_ath,
      hci_bcm, hci_intel, hci_mrvl, hci_qca) via hci_uart_set_flow_control()
      or directly. This leads to an execution at NULL and can be triggered by
      an unprivileged user. Fix this by adding a helper function and a check
      for the missing tty operations in the protocols code.
      
      This fixes CVE-2019-10207. The Fixes: lines list commits where calls to
      tiocm[gs]et() or hci_uart_set_flow_control() were added to the HCI UART
      protocols.
      
      Link: https://syzkaller.appspot.com/bug?id=1b42faa2848963564a5b1b7f8c837ea7b55ffa50
      
      
      Reported-by: default avatar <syzbot+79337b501d6aa974d0f6@syzkaller.appspotmail.com>
      Cc: stable@vger.kernel.org # v2.6.36+
      Fixes: b3190df6 ("Bluetooth: Support for Atheros AR300x serial chip")
      Fixes: 118612fb ("Bluetooth: hci_bcm: Add suspend/resume PM functions")
      Fixes: ff289559 ("Bluetooth: hci_intel: Add Intel baudrate configuration support")
      Fixes: 162f812f ("Bluetooth: hci_uart: Add Marvell support")
      Fixes: fa9ad876
      
       ("Bluetooth: hci_qca: Add support for Qualcomm Bluetooth chip wcn3990")
      Signed-off-by: default avatarVladis Dronov <vdronov@redhat.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Reviewed-by: default avatarYu-Chen, Cho <acho@suse.com>
      Tested-by: default avatarYu-Chen, Cho <acho@suse.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b36a1552
    • Laura Abbott's avatar
      mm: slub: Fix slab walking for init_on_free · 1b7e816f
      Laura Abbott authored
      
      
      To properly clear the slab on free with slab_want_init_on_free, we walk
      the list of free objects using get_freepointer/set_freepointer.
      
      The value we get from get_freepointer may not be valid.  This isn't an
      issue since an actual value will get written later but this means
      there's a chance of triggering a bug if we use this value with
      set_freepointer:
      
        kernel BUG at mm/slub.c:306!
        invalid opcode: 0000 [#1] PREEMPT PTI
        CPU: 0 PID: 0 Comm: swapper Not tainted 5.2.0-05754-g6471384a #4
        RIP: 0010:kfree+0x58a/0x5c0
        Code: 48 83 05 78 37 51 02 01 0f 0b 48 83 05 7e 37 51 02 01 48 83 05 7e 37 51 02 01 48 83 05 7e 37 51 02 01 48 83 05 d6 37 51 02 01 <0f> 0b 48 83 05 d4 37 51 02 01 48 83 05 d4 37 51 02 01 48 83 05 d4
        RSP: 0000:ffffffff82603d90 EFLAGS: 00010002
        RAX: ffff8c3976c04320 RBX: ffff8c3976c04300 RCX: 0000000000000000
        RDX: ffff8c3976c04300 RSI: 0000000000000000 RDI: ffff8c3976c04320
        RBP: ffffffff82603db8 R08: 0000000000000000 R09: 0000000000000000
        R10: ffff8c3976c04320 R11: ffffffff8289e1e0 R12: ffffd52cc8db0100
        R13: ffff8c3976c01a00 R14: ffffffff810f10d4 R15: ffff8c3976c04300
        FS:  0000000000000000(0000) GS:ffffffff8266b000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: ffff8c397ffff000 CR3: 0000000125020000 CR4: 00000000000406b0
        Call Trace:
         apply_wqattrs_prepare+0x154/0x280
         apply_workqueue_attrs_locked+0x4e/0xe0
         apply_workqueue_attrs+0x36/0x60
         alloc_workqueue+0x25a/0x6d0
         workqueue_init_early+0x246/0x348
         start_kernel+0x3c7/0x7ec
         x86_64_start_reservations+0x40/0x49
         x86_64_start_kernel+0xda/0xe4
         secondary_startup_64+0xb6/0xc0
        Modules linked in:
        ---[ end trace f67eb9af4d8d492b ]---
      
      Fix this by ensuring the value we set with set_freepointer is either NULL
      or another value in the chain.
      
      Reported-by: default avatarkernel test robot <rong.a.chen@intel.com>
      Signed-off-by: default avatarLaura Abbott <labbott@redhat.com>
      Fixes: 6471384a
      
       ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1b7e816f
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · d2eee9fc
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "Two minor fixes:
      
         - Fix trace event header include guards, as several did not match the
           #define to the #ifdef
      
         - Remove a redundant test to ftrace_graph_notrace_addr() that was
           accidentally added"
      
      * tag 'trace-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        fgraph: Remove redundant ftrace_graph_notrace_addr() test
        tracing: Fix header include guards in trace event headers
      d2eee9fc
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.3-2' of git://github.com/cminyard/linux-ipmi · 52fde434
      Linus Torvalds authored
      Pull IPMI fix from Corey Minyard:
       "One necessary fix for an uninitialized variable in the new IPMB driver.
      
        Nothing else has come in besides things that need to wait until later"
      
      * tag 'for-linus-5.3-2' of git://github.com/cminyard/linux-ipmi:
        Fix uninitialized variable in ipmb_dev_int.c
      52fde434
  2. Jul 31, 2019
  3. Jul 30, 2019
  4. Jul 29, 2019
  5. Jul 28, 2019
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9815a4f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 fixes and functional updates:
      
         - Prevent stale huge I/O TLB mappings on 32bit. A long standing bug
           which got exposed by KPTI support for 32bit
      
         - Prevent bogus access_ok() warnings in arch_stack_walk_user()
      
         - Add display quirks for Lenovo devices which have height and width
           swapped
      
         - Add the missing CR2 fixup for 32 bit async pagefaults. Fallout of
           the CR2 bug fix series.
      
         - Unbreak handling of force enabled HPET by moving the 'is HPET
           counting' check back to the original place.
      
         - A more accurate check for running on a hypervisor platform in the
           MDS mitigation code. Not perfect, but more accurate than the
           previous one.
      
         - Update a stale and confusing comment vs. IRQ stacks"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/speculation/mds: Apply more accurate check on hypervisor platform
        x86/hpet: Undo the early counter is counting check
        x86/entry/32: Pass cr2 to do_async_page_fault()
        x86/irq/64: Update stale comment
        x86/sysfb_efi: Add quirks for some devices with swapped width and height
        x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user()
        mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
        x86/mm: Sync also unmappings in vmalloc_sync_all()
        x86/mm: Check for pfn instead of page in vmalloc_sync_one()
      a9815a4f
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e24ce84e
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "Two fixes for the fair scheduling class:
      
         - Prevent freeing memory which is accessible by concurrent readers
      
         - Make the RCU annotations for numa groups consistent"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Use RCU accessors consistently for ->numa_group
        sched/fair: Don't free p->numa_faults with concurrent readers
      e24ce84e
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 750991f9
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A pile of perf related fixes:
      
        Kernel:
         - Fix SLOTS PEBS event constraints for Icelake CPUs
      
         - Add the missing mask bit to allow counting hardware generated
           prefetches on L3 for Icelake CPUs
      
         - Make the test for hypervisor platforms more accurate (as far as
           possible)
      
         - Handle PMUs correctly which override event->cpu
      
         - Yet another missing fallthrough annotation
      
        Tools:
           perf.data:
              - Fix loading of compressed data split across adjacent records
              - Fix buffer size setting for processing CPU topology perf.data
                header.
      
           perf stat:
              - Fix segfault for event group in repeat mode
              - Always separate "stalled cycles per insn" line, it was being
                appended to the "instructions" line.
      
           perf script:
              - Fix --max-blocks man page description.
              - Improve man page description of metrics.
              - Fix off by one in brstackinsn IPC computation.
      
           perf probe:
              - Avoid calling freeing routine multiple times for same pointer.
      
           perf build:
              - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings
                treated as errors, breaking the build"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Mark expected switch fall-throughs
        perf/core: Fix creating kernel counters for PMUs that override event->cpu
        perf/x86: Apply more accurate check on hypervisor platform
        perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register
        perf/x86/intel: Fix SLOTS PEBS event constraint
        perf build: Do not use -Wshadow on gcc < 4.8
        perf probe: Avoid calling freeing routine multiple times for same pointer
        perf probe: Set pev->nargs to zero after freeing pev->args entries
        perf session: Fix loading of compressed data split across adjacent records
        perf stat: Always separate stalled cycles per insn
        perf stat: Fix segfault for event group in repeat mode
        perf tools: Fix proper buffer size for feature processing
        perf script: Fix off by one in brstackinsn IPC computation
        perf script: Improve man page description of metrics
        perf script: Fix --max-blocks man page description
      750991f9
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 431f288e
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "A set of locking fixes:
      
         - Address the fallout of the rwsem rework. Missing ACQUIREs and a
           sanity check to prevent a use-after-free
      
         - Add missing checks for unitialized mutexes when mutex debugging is
           enabled.
      
         - Remove the bogus code in the generic SMP variant of
           arch_futex_atomic_op_inuser()
      
         - Fixup the #ifdeffery in lockdep to prevent compile warnings"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/mutex: Test for initialized mutex
        locking/lockdep: Clean up #ifdef checks
        locking/lockdep: Hide unused 'class' variable
        locking/rwsem: Add ACQUIRE comments
        tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop
        lcoking/rwsem: Add missing ACQUIRE to read_slowpath sleep loop
        locking/rwsem: Add missing ACQUIRE to read_slowpath exit when queue is empty
        locking/rwsem: Don't call owner_on_cpu() on read-owner
        futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser()
      431f288e
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 13fbe991
      Linus Torvalds authored
      Pull objtool fix from Thomas Gleixner:
       "A single robustness fix for objtool to handle unbalanced CLAC
        invocations under all circumstances"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Improve UACCESS coverage
      13fbe991
    • Linus Torvalds's avatar
      Merge tag 'Wimplicit-fallthrough-5.3-rc2' of... · 88c50834
      Linus Torvalds authored
      Merge tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull Wimplicit-fallthrough enablement from Gustavo A. R. Silva:
       "This marks switch cases where we are expecting to fall through, and
        globally enables the -Wimplicit-fallthrough option in the main
        Makefile.
      
        Finally, some missing-break fixes that have been tagged for -stable:
      
         - drm/amdkfd: Fix missing break in switch statement
      
         - drm/amdgpu/gfx10: Fix missing break in switch statement
      
        With these changes, we completely get rid of all the fall-through
        warnings in the kernel"
      
      * tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        Makefile: Globally enable fall-through warning
        drm/i915: Mark expected switch fall-throughs
        drm/amd/display: Mark expected switch fall-throughs
        drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning
        drm/amdgpu/gfx10: Fix missing break in switch statement
        drm/amdkfd: Fix missing break in switch statement
        perf/x86/intel: Mark expected switch fall-throughs
        mtd: onenand_base: Mark expected switch fall-through
        afs: fsclient: Mark expected switch fall-throughs
        afs: yfsclient: Mark expected switch fall-throughs
        can: mark expected switch fall-throughs
        firewire: mark expected switch fall-throughs
      88c50834
  6. Jul 27, 2019
    • Linus Torvalds's avatar
      Merge tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 43e317c1
      Linus Torvalds authored
      Pull s390 updates from Heiko Carstens:
      
       - Add ABI to kernel image file which allows e.g. the file utility to
         figure out the kernel version.
      
       - Wire up clone3 system call.
      
       - Add support for kasan bitops instrumentation.
      
       - uapi header cleanup: use __u{16,32,64} instead of uint{16,32,64}_t.
      
       - Provide proper ARCH_ZONE_DMA_BITS so the s390 DMA zone is correctly
         defined with 2 GB instead of the default value of 1 MB.
      
       - Farhan Ali leaves the group of vfio-ccw maintainers.
      
       - Various small vfio-ccw fixes.
      
       - Add missing locking for airq_areas array in virtio code.
      
       - Minor qdio improvements.
      
      * tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        MAINTAINERS: vfio-ccw: Remove myself as the maintainer
        s390/mm: use shared variables for sysctl range check
        virtio/s390: fix race on airq_areas[]
        s390/dma: provide proper ARCH_ZONE_DMA_BITS value
        s390/kasan: add bitops instrumentation
        s390/bitops: make test functions return bool
        s390: wire up clone3 system call
        kbuild: enable arch/s390/include/uapi/asm/zcrypt.h for uapi header test
        s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header
        s390/hypfs: fix a typo in the name of a function
        s390/qdio: restrict QAOB usage to IQD unicast queues
        s390/qdio: add sanity checks to the fast-requeue path
        s390: enable detection of kernel version from bzImage
        Documentation: fix vfio-ccw doc
        vfio-ccw: Update documentation for csch/hsch
        vfio-ccw: Don't call cp_free if we are processing a channel program
        vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn
        vfio-ccw: Fix memory leak and don't call cp_free in cp_init
        vfio-ccw: Fix misleading comment when setting orb.cmd.c64
      43e317c1
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 5efbd937
      Linus Torvalds authored
      Pull Devicetree fixes from Rob Herring:
       "The nvmem changes would typically go thru Greg's tree, but they were
        missed in the merge window. [ Acked by Greg ]
      
        Summary:
      
         - Fix mismatches in $id values and actual filenames. Now checked by
           tools.
      
         - Convert nvmem binding to DT schema
      
         - Fix a typo in of_property_read_bool() kerneldoc
      
         - Remove some redundant description in al-fic interrupt-controller"
      
      * tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: Fix more $id value mismatches filenames
        dt-bindings: nvmem: SID: Fix the examples node names
        dt-bindings: nvmem: Add YAML schemas for the generic NVMEM bindings
        of: Fix typo in kerneldoc
        dt-bindings: interrupt-controller: al-fic: remove redundant binding
        dt-bindings: clk: allwinner,sun4i-a10-ccu: Correct path in $id
      5efbd937
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 523634db
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
       "A collection of locking and async operations fixes for v5.3-rc2. These
        had been soaking in a branch targeting the merge window, but missed
        due to a regression hunt. This fixed up version has otherwise been in
        -next this past week with no reported issues.
      
        In order to gain confidence in the locking changes the pull also
        includes a debug / instrumentation patch to enable lockdep coverage
        for libnvdimm subsystem operations that depend on the device_lock for
        exclusion. As mentioned in the changelog it is a hack, but it works
        and documents the locking expectations of the sub-system in a way that
        others can use lockdep to verify. The driver core touches got an ack
        from Greg.
      
        Summary:
      
         - Fix duplicate device_unregister() calls (multiple threads competing
           to do unregister work when scheduling device removal from a sysfs
           attribute of the self-same device).
      
         - Fix badblocks registration order bug. Ensure region badblocks are
           initialized in advance of namespace registration.
      
         - Fix a deadlock between the bus lock and probe operations.
      
         - Export device-core infrastructure to coordinate async operations
           via the device ->dead state.
      
         - Add device-core infrastructure to validate device_lock() usage with
           lockdep"
      
      * tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        driver-core, libnvdimm: Let device subsystems add local lockdep coverage
        libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock
        libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl()
        libnvdimm/bus: Prepare the nd_ioctl() path to be re-entrant
        libnvdimm/region: Register badblocks before namespaces
        libnvdimm/bus: Prevent duplicate device_unregister() calls
        drivers/base: Introduce kill_device()
      523634db
    • Masahiro Yamada's avatar
      kbuild: remove unused single-used-m · b25e8a23
      Masahiro Yamada authored
      This is unused since commit 9f69a496
      
       ("kbuild: split out *.mod out
      of {single,multi}-used-m rules").
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      b25e8a23
    • Masahiro Yamada's avatar
      gen_compile_commands: lower the entry count threshold · cb36955a
      Masahiro Yamada authored
      
      
      Running gen_compile_commands.py after building the kernel with
      allnoconfig gave this:
      
      $ ./scripts/gen_compile_commands.py
      WARNING: Found 449 entries. Have you compiled the kernel?
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      cb36955a
    • Toru Komatsu's avatar
      .gitignore: Add compilation database file · 26c4c71b
      Toru Komatsu authored
      
      
      This file is used by clangd to use language server protocol.
      It can be generated at each compile using scripts/gen_compile_commands.py.
      Therefore it is different depending on the environment and should be
      ignored.
      
      Signed-off-by: default avatarToru Komatsu <k0ma@utam0k.jp>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      26c4c71b