Page MenuHomeFreeBSD

link_elf_obj: Invoke fini callbacks
ClosedPublic

Authored by markj on Jul 28 2021, 9:01 PM.
Tags
None
Referenced Files
F81983573: D31339.id92906.diff
Wed, Apr 24, 3:09 AM
Unknown Object (File)
Tue, Apr 9, 4:25 AM
Unknown Object (File)
Feb 28 2024, 3:00 PM
Unknown Object (File)
Feb 5 2024, 1:18 PM
Unknown Object (File)
Jan 8 2024, 1:06 AM
Unknown Object (File)
Dec 23 2023, 3:52 AM
Unknown Object (File)
Dec 12 2023, 1:22 AM
Unknown Object (File)
Nov 20 2023, 6:18 PM
Subscribers

Details

Summary

This is required for KASAN: when a module is unloaded, poisoned regions
(e.g., pad areas between global variables) are left as such, so if they
are reused as KLDs are loaded, false positives can arise.

Reported by: pho
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40732
Build 37621: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jul 28 2021, 9:01 PM

Is the same handling needed for link_elf.c?

This revision is now accepted and ready to land.Jul 29 2021, 12:32 AM
In D31339#706113, @kib wrote:

Is the same handling needed for link_elf.c?

Yes, I just didn't do it since I don't have a good way to test yet. I did not implement .init_array support there yet either. I'll revisit this for link_elf when KASAN is ported to arm64, if that's ok with you.

In D31339#706113, @kib wrote:

Is the same handling needed for link_elf.c?

Yes, I just didn't do it since I don't have a good way to test yet. I did not implement .init_array support there yet either. I'll revisit this for link_elf when KASAN is ported to arm64, if that's ok with you.

Sure I do not consider doing it for link_elf.c right now as a requirement.

This revision was automatically updated to reflect the committed changes.