git: 1c25a7f1cb29 - main - amd64 FRED: mark trap frame as initialized for KASAN/KMSAN
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 29 Oct 2026 01:34:59 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=1c25a7f1cb2986901957cc1cdf7a0c0f99748a35
commit 1c25a7f1cb2986901957cc1cdf7a0c0f99748a35
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-28 14:28:01 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-10-29 01:33:47 +0000
amd64 FRED: mark trap frame as initialized for KASAN/KMSAN
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
---
sys/amd64/amd64/trap.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index f6b595d85af7..480728e9749f 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -1602,6 +1602,9 @@ trap_fred_u(struct trapframe_fred *frame)
u_int type, vec;
bool do_trapsig;
+ kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0);
+ kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED);
+
td = curthread;
type = frame->tf_idt.tf_fred_evinfo2 & TF_FRED_EVINFO2_TYPEMASK;
vec = frame->tf_idt.tf_fred_evinfo2 & TF_FRED_EVINFO2_VECMASK;
@@ -1865,6 +1868,9 @@ trap_fred_k(struct trapframe_fred *frame)
struct thread *td;
u_int vec;
+ kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0);
+ kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED);
+
td = curthread;
vec = frame->tf_idt.tf_fred_evinfo2 & TF_FRED_EVINFO2_VECMASK;
switch (frame->tf_idt.tf_fred_evinfo2 & TF_FRED_EVINFO2_TYPEMASK) {