HomeFreeBSD

vfs: Add an assertion around name length limits

Description

vfs: Add an assertion around name length limits

Some filesystems assume that they can copy a name component, with length
bounded by NAME_MAX, into a dirent buffer of size MAXNAMLEN. These
constants have the same value; add a compile-time assertion to that
effect.

Reported by: Alexey Kulaev <alex.qart@gmail.com>
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29431

(cherry picked from commit 71c160a8f614fa4812838002ba9d266af3cf988c)

Details

Provenance
markjAuthored on Mar 27 2021, 5:42 PM
Reviewer
kib
Differential Revision
D29431: vfs: Add some assertions around various name length limits
Parents
rGe3b1b9d625ca: libctf: Adjust logic to match upstream after 410556f1f
Branches
Unknown
Tags
Unknown