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)
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
Unknown Object (File)
Sep 22 2024, 11:44 PM
Unknown Object (File)
Sep 20 2024, 5:04 AM
Unknown Object (File)
Sep 19 2024, 8:42 PM
Unknown Object (File)
Sep 18 2024, 5:16 PM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.