Page MenuHomeFreeBSD

mbuf: add bounds-checked mtod() accessors under bounds-safety
DraftPublic

Authored by abhijeetsharma2002_gmail.com on Sun, Oct 18, 1:41 AM.
Tags
None
Referenced Files
F176369223: D60829.diff
Sun, Oct 18, 7:27 AM
F176359119: D60829.id190162.diff
Sun, Oct 18, 5:24 AM
F176355355: D60829.id.diff
Sun, Oct 18, 4:31 AM
F176348995: D60829.diff
Sun, Oct 18, 3:09 AM
F176342859: D60829.diff
Sun, Oct 18, 1:55 AM
Subscribers
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
rpaulo
emaste
Summary

Under -fbounds-safety mtod() and mtodo() return a pointer bounded by the
mbuf's storage, and mtod_len() narrows that to m_len. Without the flag
nothing changes. debug.bounds_mtod_test checks which reads trap.

Sponsored by: The FreeBSD Foundation

Diff Detail

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