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
Unknown Object (File)
Jan 6 2024, 6:15 PM
Unknown Object (File)
Dec 29 2023, 1:33 AM
Unknown Object (File)
Nov 5 2023, 5:26 PM
Unknown Object (File)
Oct 7 2023, 11:56 AM
Unknown Object (File)
Jun 3 2023, 5:01 PM
Unknown Object (File)
Apr 6 2023, 9:06 AM
Unknown Object (File)
Dec 26 2022, 12:42 PM
Unknown Object (File)
Dec 10 2022, 1:59 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.