Page MenuHomeFreeBSD

Set permissions appropriately on preloaded DSOs.
ClosedPublic

Authored by markj on Oct 1 2019, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2024, 10:34 AM
Unknown Object (File)
Dec 25 2023, 9:21 PM
Unknown Object (File)
Dec 20 2023, 4:46 AM
Unknown Object (File)
Nov 3 2023, 5:57 AM
Unknown Object (File)
Oct 27 2023, 2:54 AM
Unknown Object (File)
Sep 21 2023, 8:36 AM
Unknown Object (File)
Sep 18 2023, 2:11 AM
Unknown Object (File)
Sep 15 2023, 5:36 PM
Subscribers

Details

Summary

Now that we map preloaded data with NX by default on amd64, the kernel
linker must upgrade protections to allow execution of preloaded kernel
modules. Upgrade to VM_PROT_ALL when applying relocations, then use the
permissions requested by the loadable segment descriptors.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26863
Build 25182: arc lint + arc unit

Event Timeline

  • We need to upgrade protections on preloaded .o files as well.
This revision is now accepted and ready to land.Oct 2 2019, 7:15 PM
This revision now requires review to proceed.Oct 4 2019, 4:14 PM

Stop checking for errors from pmap_change_prot(). In this usage, it
can only fail if we fail to allocate a page during demotion. However,
we only use pmap_change_prot() to set protections for preloaded modules,
and this happens early during boot, so a page shortage should not be
possible.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 18 2019, 1:57 PM
This revision was automatically updated to reflect the committed changes.