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)
Sat, Nov 2, 9:42 PM
Unknown Object (File)
Sep 30 2024, 1:58 PM
Unknown Object (File)
Sep 30 2024, 8:53 AM
Unknown Object (File)
Sep 22 2024, 12:21 PM
Unknown Object (File)
Sep 9 2024, 9:53 AM
Unknown Object (File)
Sep 5 2024, 12:46 PM
Unknown Object (File)
Sep 5 2024, 9:33 AM
Unknown Object (File)
Sep 5 2024, 8:48 AM
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

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

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.