1. 04 Jul, 2019 1 commit
    • Greg Kroah-Hartman's avatar
      Merge tag 'misc-habanalabs-next-2019-07-04' of... · a94de2e7
      Greg Kroah-Hartman authored
      Merge tag 'misc-habanalabs-next-2019-07-04' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next
      
      Oded writes:
      
      This tag contains the following changes for kernel 5.3:
      
      - Change the way the device's CPU access the host memory. This allows the
        driver to use the kernel API of setting DMA mask in a standard way (call
        it once).
      
      - Add a new debugfs entry to show the status of the internal DMA and
        compute engines. This is very helpful for debugging in case a command
        submission get stuck.
      
      - Return to the user a mask of the internal engines indicating their busy
        state.
      
      - Make sure to restore registers that can be modified by the user to their
        default values. Only applies to registers that are initialized by the
        driver.
      
      - Elimination of redundant and dead-code.
      
      - Support memset of the device's memory with size larger then 4GB
      
      - Force the user to set the device to debug mode before configuring the
        device's coresight infrastructure
      
      - Improve error printing in case of interrupts from the device
      
      * tag 'misc-habanalabs-next-2019-07-04' of git://people.freedesktop.org/~gabbayo/linux: (31 commits)
        habanalabs: Add busy engines bitmask to HW idle IOCTL
        habanalabs: Add debugfs node for engines status
        habanalabs: Update the device idle check
        habanalabs: Allow accessing host mapped addresses via debugfs
        habanalabs: add WARN in case of bad MMU mapping
        habanalabs: remove DMA mask hack for Goya
        habanalabs: set Goya CPU to use ASIC MMU
        habanalabs: add MMU mappings for Goya CPU
        habanalabs: initialize MMU context for driver
        habanalabs: de-couple MMU and VM module initialization
        habanalabs: initialize device CPU queues after MMU init
        docs/habanalabs: update text for some entries in sysfs
        habanalabs: add rate-limit to an error message
        habanalabs: remove simulator dedicated code
        habanalabs: restore unsecured registers default values
        habanalabs: clear sobs and monitors in context switch
        habanalabs: make tpc registers secured
        habanalabs: don't limit packet size for device CPU
        habanalabs: support device memory memset > 4GB
        habanalabs: print event name for fatal and non-RAZWI events
        ...
      a94de2e7
  2. 03 Jul, 2019 25 commits
  3. 01 Jul, 2019 5 commits
  4. 26 Jun, 2019 7 commits
  5. 23 Jun, 2019 2 commits
    • Greg Kroah-Hartman's avatar
      Merge 5.2-rc6 into char-misc-next · 8083f3d7
      Greg Kroah-Hartman authored
      We need the char-misc fixes in here as well.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8083f3d7
    • Kees Cook's avatar
      lkdtm: Check for SMEP clearing protections · 06b32fdb
      Kees Cook authored
      This adds an x86-specific test for pinned cr4 bits. A successful test
      will validate pinning and check the ROP-style call-middle-of-function
      defense, if needed. For example, in the case of native_write_cr4()
      looking like this:
      
      ffffffff8171bce0 <native_write_cr4>:
      ffffffff8171bce0:       48 8b 35 79 46 f2 00    mov    0xf24679(%rip),%rsi
      ffffffff8171bce7:       48 09 f7                or     %rsi,%rdi
      ffffffff8171bcea:       0f 22 e7                mov    %rdi,%cr4
      ...
      ffffffff8171bd5a:       c3                      retq
      
      The UNSET_SMEP test will jump to ffffffff8171bcea (the mov to cr4)
      instead of ffffffff8171bce0 (native_write_cr4() entry) to simulate a
      direct-call bypass attempt.
      
      Expected successful results:
      
        # echo UNSET_SMEP > /sys/kernel/debug/provoke-crash/DIRECT
        # dmesg
        [   79.594433] lkdtm: Performing direct entry UNSET_SMEP
        [   79.596459] lkdtm: trying to clear SMEP normally
        [   79.598406] lkdtm: ok: SMEP did not get cleared
        [   79.599981] lkdtm: trying to clear SMEP with call gadget
        [   79.601810] ------------[ cut here ]------------
        [   79.603421] Attempt to unpin cr4 bits: 100000; bypass attack?!
        ...
        [   79.650170] ---[ end trace 2452ca0f6126242e ]---
        [   79.650937] lkdtm: ok: SMEP removal was reverted
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      06b32fdb