Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174017307
D60132.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60132.diff
View Options
diff --git a/sys/riscv/include/pcpu.h b/sys/riscv/include/pcpu.h
--- a/sys/riscv/include/pcpu.h
+++ b/sys/riscv/include/pcpu.h
@@ -47,7 +47,8 @@
uint32_t pc_pending_ipis; /* IPIs pending to this CPU */ \
uint32_t pc_hart; /* Hart ID */ \
uint64_t pc_clock; \
- char __pad[48] /* Pad to factor of PAGE_SIZE */
+ uintptr_t pc_canary; \
+ char __pad[40] /* Pad to factor of PAGE_SIZE */
#ifdef _KERNEL
diff --git a/sys/riscv/include/proc.h b/sys/riscv/include/proc.h
--- a/sys/riscv/include/proc.h
+++ b/sys/riscv/include/proc.h
@@ -34,6 +34,7 @@
struct mdthread {
int md_spinlock_count; /* (k) */
register_t md_saved_sstatus_ie; /* (k) */
+ register_t md_canary; /* (k) */
};
struct mdproc {
diff --git a/sys/riscv/riscv/genassym.c b/sys/riscv/riscv/genassym.c
--- a/sys/riscv/riscv/genassym.c
+++ b/sys/riscv/riscv/genassym.c
@@ -75,6 +75,7 @@
ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
+ASSYM(PC_CANARY, offsetof(struct pcpu, pc_canary));
ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
@@ -82,6 +83,7 @@
ASSYM(TD_PROC, offsetof(struct thread, td_proc));
ASSYM(TD_FRAME, offsetof(struct thread, td_frame));
ASSYM(TD_MD, offsetof(struct thread, td_md));
+ASSYM(TD_MD_CANARY, offsetof(struct thread, td_md.md_canary));
ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
ASSYM(TF_SIZE, TF_SIZE);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 1, 12:17 AM (5 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39975838
Default Alt Text
D60132.diff (1 KB)
Attached To
Mode
D60132: WIP: riscv: Implement per-thread kernel stack canaries
Attached
Detach File
Event Timeline
Log In to Comment