Page MenuHomeFreeBSD

Fix the signature for zone_import and zone_release
ClosedPublic

Authored by andrew on Dec 4 2019, 2:52 PM.
Tags
None
Referenced Files
F110677379: D22671.id65228.diff
Fri, Feb 21, 7:28 PM
Unknown Object (File)
Jan 16 2025, 2:41 PM
Unknown Object (File)
Jan 12 2025, 4:48 PM
Unknown Object (File)
Dec 11 2024, 6:21 PM
Unknown Object (File)
Oct 3 2024, 5:44 AM
Unknown Object (File)
Sep 30 2024, 1:39 AM
Unknown Object (File)
Sep 27 2024, 2:21 AM
Unknown Object (File)
Sep 23 2024, 1:13 AM
Subscribers

Details

Summary

These are cast to uma_import and uma_release functions. Use the signature
for these in the zone fucntions.

This was found with an experimental Kernel CFI. It will complaid if the
signature is different than what a function pointer expects. The
simplest way to fix these is to correct the signature.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27936
Build 26102: arc lint + arc unit

Event Timeline

Looks fine.

Is this going to identify all casting of function pointers? These ones
here seem pretty innocuous.

This revision is now accepted and ready to land.Dec 4 2019, 4:53 PM

It will find all pointers that are used, however I exclude a few functions that may call different, but compatible types e.g. SYSINITS should be void func(const void *), but many don't include the const so I mark mi_startup with a no-cfi attribute.

This revision was automatically updated to reflect the committed changes.