Page MenuHomeFreeBSD

amd64: Fix two typos of loader tunables
ClosedPublic

Authored by zlei on Oct 17 2023, 8:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 23 2024, 8:34 AM
Unknown Object (File)
Sep 22 2024, 1:38 PM
Unknown Object (File)
Sep 18 2024, 3:17 AM
Unknown Object (File)
Sep 17 2024, 9:20 AM
Unknown Object (File)
Sep 16 2024, 10:12 PM
Unknown Object (File)
Sep 16 2024, 1:05 PM
Unknown Object (File)
Sep 15 2024, 4:02 AM
Unknown Object (File)
Sep 8 2024, 5:37 PM
Subscribers

Details

Summary

To match the sysctl MIBs and security(7).

Fixes: 2dec2b4a34b4 amd64: flush L1 data cache on syscall return with an error
Fixes: 17edf152e556 Control for Special Register Buffer Data Sampling mitigation

MFC after: 1 day

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Oct 17 2023, 8:42 AM

I guess this one is also typo, but not quite sure.

static int pmap_allow_2m_x_ept;
SYSCTL_INT(_vm_pmap, OID_AUTO, allow_2m_x_ept, CTLFLAG_RWTUN | CTLFLAG_NOFETCH,
    &pmap_allow_2m_x_ept, 0,
    "Allow executable superpage mappings in EPT");
...
---TUNABLE_INT_FETCH("hw.allow_2m_x_ept", &pmap_allow_2m_x_ept);
+++TUNABLE_INT_FETCH("vm.pmap.allow_2m_x_ept", &pmap_allow_2m_x_ept);
This revision is now accepted and ready to land.Oct 18 2023, 4:52 PM
In D42249#963817, @zlei wrote:

I guess this one is also typo, but not quite sure.

static int pmap_allow_2m_x_ept;
SYSCTL_INT(_vm_pmap, OID_AUTO, allow_2m_x_ept, CTLFLAG_RWTUN | CTLFLAG_NOFETCH,
    &pmap_allow_2m_x_ept, 0,
    "Allow executable superpage mappings in EPT");
...
---TUNABLE_INT_FETCH("hw.allow_2m_x_ept", &pmap_allow_2m_x_ept);
+++TUNABLE_INT_FETCH("vm.pmap.allow_2m_x_ept", &pmap_allow_2m_x_ept);

This one is certainly inconsistency, I have no opinion which one (hw or vm.pmap) the tunable should be. The sysctl knob must be under vm.pmap of course.

This revision was automatically updated to reflect the committed changes.