Thread (16 messages) 16 messages, 2 authors, 2025-10-23
STALE263d REVIEWED: 3 (0M)
Revisions (26)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v1 [diff vs current]
  6. v6 [diff vs current]
  7. v7 [diff vs current]
  8. v8 [diff vs current]
  9. v10 [diff vs current]
  10. v11 [diff vs current]
  11. v12 [diff vs current]
  12. v13 [diff vs current]
  13. v14 [diff vs current]
  14. v15 [diff vs current]
  15. v16 [diff vs current]
  16. v17 [diff vs current]
  17. v18 [diff vs current]
  18. v19 [diff vs current]
  19. v20 [diff vs current]
  20. v21 [diff vs current]
  21. v22 [diff vs current]
  22. v22 [diff vs current]
  23. v22 current
  24. v22 [diff vs current]
  25. v24 [diff vs current]
  26. v25 [diff vs current]

[PATCH v22 01/28] mm: VM_SHADOW_STACK definition for riscv

From: Deepak Gupta <hidden>
Date: 2025-10-22 23:29:39
Also in: linux-arch, linux-doc, linux-fsdevel, linux-kselftest, linux-mm, linux-riscv, lkml, rust-for-linux
Subsystem: memory management - core, the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

VM_HIGH_ARCH_5 is used for riscv

Reviewed-by: Zong Li <redacted>
Reviewed-by: Alexandre Ghiti <redacted>
Acked-by: David Hildenbrand <redacted>
Signed-off-by: Deepak Gupta <redacted>
---
 include/linux/mm.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index d16b33bacc32..2032d3f195f1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -380,6 +380,13 @@ extern unsigned int kobjsize(const void *objp);
 # define VM_SHADOW_STACK	VM_HIGH_ARCH_6
 #endif
 
+#if defined(CONFIG_RISCV_USER_CFI)
+/*
+ * Following x86 and picking up the same bitpos.
+ */
+# define VM_SHADOW_STACK	VM_HIGH_ARCH_5
+#endif
+
 #ifndef VM_SHADOW_STACK
 # define VM_SHADOW_STACK	VM_NONE
 #endif
-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help