1. 07 Nov, 2023 11 commits
  2. 06 Nov, 2023 9 commits
  3. 05 Nov, 2023 17 commits
  4. 02 Nov, 2023 3 commits
    • Andrew Jones's avatar
      RISC-V: hwprobe: Fix vDSO SIGSEGV · e1c05b3b
      Andrew Jones authored
      A hwprobe pair key is signed, but the hwprobe vDSO function was
      only checking that the upper bound was valid. In order to help
      avoid this type of problem in the future, and in anticipation of
      this check becoming more complicated with sparse keys, introduce
      and use a "key is valid" predicate function for the check.
      
      Fixes: aa5af0aa ("RISC-V: Add hwprobe vDSO function and data")
      Signed-off-by: default avatarAndrew Jones <ajones@ventanamicro.com>
      Reviewed-by: default avatarEvan Green <evan@rivosinc.com>
      Link: https://lore.kernel.org/r/20231010165101.14942-2-ajones@ventanamicro.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      e1c05b3b
    • Lad Prabhakar's avatar
      riscv: configs: defconfig: Enable configs required for RZ/Five SoC · 65330107
      Lad Prabhakar authored
      Enable the configs required by the below IP blocks which are
      present on RZ/Five SoC:
      * ADC
      * CANFD
      * DMAC
      * eMMC/SDHI
      * OSTM
      * RAVB (+ Micrel PHY)
      * RIIC
      * RSPI
      * SSI (Sound+WM8978 codec)
      * Thermal
      * USB (PHY/RESET/OTG)
      
      Along with the above some core configs are enabled too,
      -> CPU frequency scaling as RZ/Five does support this.
      -> MTD is enabled as RSPI can be connected to flash chips
      -> Enabled I2C chardev so that it enables userspace to read/write
         i2c devices (similar to arm64)
      -> Thermal configs as RZ/Five SoC does have thermal unit
      -> GPIO regulator as we might have IP blocks for which voltage
         levels are controlled by GPIOs
      -> OTG configs as RZ/Five USB can support host/function
      -> Gadget configs so that we can test USB function (as done in arm64
         all the gadget configs are enabled)
      Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
      Acked-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Link: https://lore.kernel.org/r/20230929000704.53217-6-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      65330107
    • 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