1. 02 Nov, 2023 3 commits
    • Palmer Dabbelt's avatar
      Merge patch series "riscv: SCS support" · 24005d18
      Palmer Dabbelt authored
      Sami Tolvanen <samitolvanen@google.com> says:
      
      This series adds Shadow Call Stack (SCS) support for RISC-V. SCS
      uses compiler instrumentation to store return addresses in a
      separate shadow stack to protect them against accidental or
      malicious overwrites. More information about SCS can be found
      here:
      
        https://clang.llvm.org/docs/ShadowCallStack.html
      
      Patch 1 is from Deepak, and it simplifies VMAP_STACK overflow
      handling by adding support for accessing per-CPU variables
      directly in assembly. The patch is included in this series to
      make IRQ stack switching cleaner with SCS, and I've simply
      rebased it and fixed a couple of minor issues. Patch 2 uses this
      functionality to clean up the stack switching by moving duplicate
      code into a single function. On RISC-V, the compiler uses the
      gp register for storing the current shadow call stack pointer,
      which is incompatible with global pointer relaxation. Patch 3
      moves global pointer loading into a macro that can be easily
      disabled with SCS. Patch 4 implements SCS register loading and
      switching, and allows the feature to be enabled, and patch 5 adds
      separate per-CPU IRQ shadow call stacks when CONFIG_IRQ_STACKS is
      enabled. Patch 6 fixes the backward-edge CFI test in lkdtm for
      RISC-V.
      
      Note that this series requires Clang 17. Earlier Clang versions
      support SCS on RISC-V, but use the x18 register instead of gp,
      which isn't ideal. gcc has SCS support for arm64, but I'm not
      aware of plans to support RISC-V. Once the Zicfiss extension is
      ratified, it's probably preferable to use hardware-backed shadow
      stacks instead of SCS on hardware that supports the extension,
      and we may want to consider implementing CONFIG_DYNAMIC_SCS to
      patch between the implementation at runtime (similarly to the
      arm64 implementation, which switches to SCS when hardware PAC
      support isn't available).
      
      * b4-shazam-merge:
        lkdtm: Fix CFI_BACKWARD on RISC-V
        riscv: Use separate IRQ shadow call stacks
        riscv: Implement Shadow Call Stack
        riscv: Move global pointer loading to a macro
        riscv: Deduplicate IRQ stack switching
        riscv: VMAP_STACK overflow detection thread-safe
      
      Link: https://lore.kernel.org/r/20230927224757.1154247-8-samitolvanen@google.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      24005d18
    • Palmer Dabbelt's avatar
      Merge patch "riscv: errata: improve T-Head CMO" · 4630d6da
      Palmer Dabbelt authored
      This fixes an encoding issue with T-Head's dcache.cva and fixes the
      comment about the T-Head encodings.  The first of these was a fix and
      got picked up earlier, I'm merging the second on top of it as they touch
      the same comment.
      
      * b4-shazam-merge:
        riscv: errata: prefix T-Head mnemonics with th.
        riscv: errata: fix T-Head dcache.cva encoding
      
      Link: https://lore.kernel.org/r/20230827090813.1353-1-jszhang@kernel.orgSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      4630d6da
    • Icenowy Zheng's avatar
      riscv: errata: prefix T-Head mnemonics with th. · 27fb2719
      Icenowy Zheng authored
      T-Head now maintains some specification for their extended instructions
      at [1], in which all instructions are prefixed "th.".
      
      Follow this practice in the kernel comments.
      
      Link: https://github.com/T-head-Semi/thead-extension-spec [1]
      Signed-off-by: default avatarIcenowy Zheng <uwu@icenowy.me>
      Reviewed-by: default avatarGuo Ren <guoren@kernel.org>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      27fb2719
  2. 01 Nov, 2023 12 commits
  3. 27 Oct, 2023 6 commits
  4. 26 Oct, 2023 4 commits
  5. 21 Sep, 2023 6 commits
  6. 20 Sep, 2023 3 commits
  7. 12 Sep, 2023 2 commits
  8. 10 Sep, 2023 4 commits
    • Linus Torvalds's avatar
      Linux 6.6-rc1 · 0bb80ecc
      Linus Torvalds authored
      0bb80ecc
    • Linus Torvalds's avatar
      Merge tag 'topic/drm-ci-2023-08-31-1' of git://anongit.freedesktop.org/drm/drm · 1548b060
      Linus Torvalds authored
      Pull drm ci scripts from Dave Airlie:
       "This is a bunch of ci integration for the freedesktop gitlab instance
        where we currently do upstream userspace testing on diverse sets of
        GPU hardware. From my perspective I think it's an experiment worth
        going with and seeing how the benefits/noise playout keeping these
        files useful.
      
        Ideally I'd like to get this so we can do pre-merge testing on PRs
        eventually.
      
        Below is some info from danvet on why we've ended up making the
        decision and how we can roll it back if we decide it was a bad plan.
      
        Why in upstream?
      
         - like documentation, testcases, tools CI integration is one of these
           things where you can waste endless amounts of time if you
           accidentally have a version that doesn't match your source code
      
         - but also like the above, there's a balance, this is the initial cut
           of what we think makes sense to keep in sync vs out-of-tree,
           probably needs adjustment
      
         - gitlab supports out-of-repo gitlab integration and that's what's
           been used for the kernel in drm, but it results in per-driver
           fragmentation and lots of duplicated effort. the simple act of
           smashing an arbitrary winner into a topic branch already started
           surfacing patches on dri-devel and sparking good cross driver team
           discussions
      
        Why gitlab?
      
         - it's not any more shit than any of the other CI
      
         - drm userspace uses it extensively for everything in userspace, we
           have a lot of people and experience with this, including
           integration of hw testing labs
      
         - media userspace like gstreamer is also on gitlab.fd.o, and there's
           discussion to extend this to the media subsystem in some fashion
      
        Can this be shared?
      
         - there's definitely a pile of code that could move to scripts/ if
           other subsystem adopt ci integration in upstream kernel git. other
           bits are more drm/gpu specific like the igt-gpu-tests/tools
           integration
      
         - docker images can be run locally or in other CI runners
      
        Will we regret this?
      
         - it's all in one directory, intentionally, for easy deletion
      
         - probably 1-2 years in upstream to see whether this is worth it or a
           Big Mistake. that's roughly what it took to _really_ roll out solid
           CI in the bigger userspace projects we have on gitlab.fd.o like
           mesa3d"
      
      * tag 'topic/drm-ci-2023-08-31-1' of git://anongit.freedesktop.org/drm/drm:
        drm: ci: docs: fix build warning - add missing escape
        drm: Add initial ci/ subdirectory
      1548b060
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e56b2b60
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Fix preemption delays in the SGX code, remove unnecessarily
        UAPI-exported code, fix a ld.lld linker (in)compatibility quirk and
        make the x86 SMP init code a bit more conservative to fix kexec()
        lockups"
      
      * tag 'x86-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sgx: Break up long non-preemptible delays in sgx_vepc_release()
        x86: Remove the arch_calc_vm_prot_bits() macro from the UAPI
        x86/build: Fix linker fill bytes quirk/incompatibility for ld.lld
        x86/smp: Don't send INIT to non-present and non-booted CPUs
      e56b2b60
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e79dbf03
      Linus Torvalds authored
      Pull x86 perf event fix from Ingo Molnar:
       "Work around a firmware bug in the uncore PMU driver, affecting certain
        Intel systems"
      
      * tag 'perf-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/uncore: Correct the number of CHAs on EMR
      e79dbf03