diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-05-05 18:33:29 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-07-08 22:27:38 +0000 |
commit | 7d3f71a6485791f9fb87621c5a15571889f6c687 (patch) | |
tree | 99bba95d30bafc900d5ce96e09174bfe1fc0b762 | |
parent | 9e8c698ae84d7fa70bb404c6e8deda6a47e88ac7 (diff) | |
download | serenity-7d3f71a6485791f9fb87621c5a15571889f6c687.zip |
Kernel: Do not disable userland access to the RDTSC instruction
Access to RDTSC is occasionally restricted to give malware one less
option to accurately time attacks (side-channels, etc.).
However, QEMU requires access to the timestamp counter for the exact
same reason (which is accurately timing its CPU ticks), so lets just
enable it for now.
-rw-r--r-- | Kernel/Arch/x86/common/Processor.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp index a34e489ea8..ff388b22a8 100644 --- a/Kernel/Arch/x86/common/Processor.cpp +++ b/Kernel/Arch/x86/common/Processor.cpp @@ -551,10 +551,6 @@ UNMAP_AFTER_INIT void Processor::cpu_setup() write_cr4(read_cr4() | 0x800); } - if (has_feature(CPUFeature::TSC)) { - write_cr4(read_cr4() | 0x4); - } - if (has_feature(CPUFeature::XSAVE)) { // Turn on CR4.OSXSAVE write_cr4(read_cr4() | 0x40000); |