All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 Zisslpcfi 0/2] Support for zisslpcfi in opensbi
@ 2022-12-21 19:55 Deepak Gupta
  2022-12-21 19:55 ` [PATCH v2 Zisslpcfi 1/2] include: adding support for Zisslpcfi encodings Deepak Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Deepak Gupta @ 2022-12-21 19:55 UTC (permalink / raw)
  To: opensbi

Zisslpcfi [1] extension extends risc-v architecture to mitigate against
control-flow integrity attacks (ROP/JOP/COP).

Zisslpcfi uses bits (b23-b29) in (m/s/vs) status CSR for enabling cfi in
lesser privileged mode and record cfi state. One such state is expected
landing pad (ELP). If forward cfi is enabled, indirect call/jmp updates
hart's ELP state (1bit) to true. ELP state is cleared only by a landing
pad instruction else trap is delivered with ELP state recorded in sstatus
CSR.

This two patch series adds following changes to opensbi
    - Adds support in opensbi to detect zisslpcfi
    - trap redirection updates ELP state accordingly

Qemu implementation for Zisslpcfi can be checked out on github [2]
Strawman linux kernel enabling (still very early) can be checked out on github [3]

[1] - https://github.com/riscv/riscv-cfi
[2] - https://github.com/deepak0414/qemu/tree/gh_Zisslpcfi-0.1
[3] - https://github.com/deepak0414/linux-riscv-cfi/tree/Zisslpcfi-0.1_v6.1-rc2

Deepak Gupta (2):
  include: adding support for Zisslpcfi encodings
  lib: sbi: Zisslpcfi detection and elp cfi state reflect back in status

 include/sbi/riscv_encoding.h |  6 ++++++
 include/sbi/sbi_hart.h       |  2 ++
 lib/sbi/sbi_hart.c           | 21 +++++++++++++++++++++
 lib/sbi/sbi_trap.c           | 18 ++++++++++++++++++
 4 files changed, 47 insertions(+)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-06 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-21 19:55 [PATCH v2 Zisslpcfi 0/2] Support for zisslpcfi in opensbi Deepak Gupta
2022-12-21 19:55 ` [PATCH v2 Zisslpcfi 1/2] include: adding support for Zisslpcfi encodings Deepak Gupta
2022-12-21 19:55 ` [PATCH v2 Zisslpcfi 2/2] lib: sbi: Zisslpcfi detection and elp cfi state reflect back in status Deepak Gupta
2022-12-21 23:38 ` [PATCH v2 Zisslpcfi 0/2] Support for zisslpcfi in opensbi Deepak Gupta
2023-01-06 12:05   ` Anup Patel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.