HomeFreeBSD

modules: increase MAXMODNAME and provide backward compat

Description

modules: increase MAXMODNAME and provide backward compat

With various firmware files used by graphics and wireless drivers
we are exceeding the current 32 character module name (file path
in kldxref) length.
In order to overcome this issue bump it to the maximum path length
for the next version.
To be able to MFC provide backward compat support for another version
of the struct as the offsets for the second half change due to the
array size increase.

MAXMODNAME being defined to MAXPATHLEN needs param.h to be
included first. With only 7 modules (or LinuxKPI module.h) not
doing that adjust them rather than including param.h in module.h [1].

Reported by: Greg V (greg unrelenting.technology)
Sponsored by: The FreeBSD Foundation
Suggested by: imp [1]
Reviewed by: imp (and others to different level)
Differential Revision: https://reviews.freebsd.org/D32383

(cherry picked from commit df38ada2931f95d07b65b19fcfb4c9845d656ba9)

Details

Provenance
bzAuthored on Nov 17 2021, 7:35 PM
Reviewer
imp
Differential Revision
D32383: modules: increase MAXMODNAME and provide backward compat
Parents
rGbaf6251f2705: iwlwifi: import Intel's iwlwifi/mvm driver.
Branches
Unknown
Tags
Unknown