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.
Details
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 26837 Build 25168: arc lint + arc unit
Event Timeline
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.
I would maybe call the hint cppc_notify with the sense being that "1" enables it and "0" disables notifications (we try to avoid "negative" hints/tunables). You would then just want to set the default value to 1 and change the last test to cppcval != 0. I would also perhaps rename cppcval to cppc_notify as well.