Page MenuHomeFreeBSD

mbuf: add m_dataptr() for length-checked access to mbuf data
DraftPublic

Authored by abhijeetsharma2002_gmail.com on Sun, Oct 18, 1:45 AM.
Tags
None
Referenced Files
F176369235: D60831.diff
Sun, Oct 18, 7:28 AM
F176360095: D60831.id190166.diff
Sun, Oct 18, 5:37 AM
F176356074: D60831.id190166.diff
Sun, Oct 18, 4:43 AM
F176355677: D60831.diff
Sun, Oct 18, 4:36 AM
F176348998: D60831.diff
Sun, Oct 18, 3:09 AM
F176344661: D60831.diff
Sun, Oct 18, 2:15 AM
Subscribers
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
rpaulo
emaste
Summary

m_dataptr(m, off, len) returns a pointer to len bytes at off in m, or
NULL if m does not hold them, in every build. Under -fbounds-safety the
result is bounded to len. debug.bounds_dataptr_test exercises it.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 78327
Build 75210: arc lint + arc unit