Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108593548
D38101.id121153.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
D38101.id121153.diff
View Options
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -44,6 +44,7 @@
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
+#include <sys/msan.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/protosw.h>
@@ -908,6 +909,7 @@
if (m == NULL)
return;
+ kmsan_check_mbuf(m, "sbappend");
sbm_clrprotoflags(m, flags);
SBLASTRECORDCHK(sb);
n = sb->sb_mb;
@@ -1022,6 +1024,8 @@
KASSERT(m->m_nextpkt == NULL,("sbappendstream 0"));
+ kmsan_check_mbuf(m, "sbappend");
+
#ifdef KERN_TLS
/*
* Decrypted TLS records are appended as records via
@@ -1170,7 +1174,10 @@
if (m0 == NULL)
return;
+
+ kmsan_check_mbuf(m0, "sbappend");
m_clrprotoflags(m0);
+
/*
* Put the first mbuf on the queue. Note this permits zero length
* records.
@@ -1207,6 +1214,12 @@
struct mbuf *m0, struct mbuf *control, struct mbuf *ctrl_last)
{
struct mbuf *m, *n, *nlast;
+
+ if (m0 != NULL)
+ kmsan_check_mbuf(m0, "sbappend");
+ if (control != NULL)
+ kmsan_check_mbuf(control, "sbappend");
+
#if MSIZE <= 256
if (asa->sa_len > MLEN)
return (0);
@@ -1317,6 +1330,9 @@
{
struct mbuf *m, *mlast;
+ kmsan_check_mbuf(m0, "sbappend");
+ kmsan_check_mbuf(control, "sbappend");
+
sbm_clrprotoflags(m0, flags);
m_last(control)->m_next = m0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 6:10 PM (6 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16203192
Default Alt Text
D38101.id121153.diff (1 KB)
Attached To
Mode
D38101: sockbuf: Add KMSAN checks to sbappend*()
Attached
Detach File
Event Timeline
Log In to Comment