Page MenuHomeFreeBSD

Add _Static_asserts to check that file system fid structures are not larger than struct fid
ClosedPublic

Authored by rmacklem on Dec 5 2024, 11:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 21, 3:45 PM
Unknown Object (File)
Sat, Apr 19, 5:25 AM
Unknown Object (File)
Mon, Apr 7, 12:33 PM
Unknown Object (File)
Feb 10 2025, 1:39 PM
Unknown Object (File)
Feb 2 2025, 11:21 PM
Unknown Object (File)
Jan 23 2025, 8:49 PM
Unknown Object (File)
Jan 23 2025, 4:52 PM
Unknown Object (File)
Jan 19 2025, 10:30 AM
Subscribers

Details

Summary

File system specific *fid structures are copied into the generic
struct fid defined in sys/mount.h.
As such, they cannot be larger than struct fid.

This patch adds _Static_assert()s to check for this.

ZFS and fuse already have _Static_assert()s.

Test Plan

Compiled the kernel with these _Static_assert()s.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped