HomeFreeBSD

tarfs: Fix the size of struct tarfs_fid and add a static assert

Description

tarfs: Fix the size of struct tarfs_fid and add a static assert

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 packs the structure and checks via a __Static_assert().

Approved by: so
Security: FreeBSD-SA-25:02.fs
Reviewed by: markj
MFC after: 2 weeks

(cherry picked from commit 4db1b113b15158c7d134df83e7a7201cf46d459b)
(cherry picked from commit 155987e2019089a5bd2eef77ed7bcc5cc26c362e)

Details

Provenance
rmacklemAuthored on Dec 6 2024, 2:09 AM
markjCommitted on Wed, Jan 29, 5:12 PM
Parents
rGf2cc3336ad40: ext2fs: Fix the size of struct ufid and add a static assert
Branches
Unknown
Tags
Unknown