Prechádzať zdrojové kódy

Kernel: Disable SMAP protection while capturing profile samples

Andreas Kling 5 rokov pred
rodič
commit
9e51291aed
1 zmenil súbory, kde vykonal 1 pridanie a 0 odobranie
  1. 1 0
      Kernel/Scheduler.cpp

+ 1 - 0
Kernel/Scheduler.cpp

@@ -562,6 +562,7 @@ void Scheduler::timer_tick(RegisterDump& regs)
     Process::update_info_page_timestamp(tv);
     Process::update_info_page_timestamp(tv);
 
 
     if (current->process().is_profiling()) {
     if (current->process().is_profiling()) {
+        SmapDisabler disabler;
         auto backtrace = current->raw_backtrace(regs.ebp);
         auto backtrace = current->raw_backtrace(regs.ebp);
         auto& sample = Profiling::next_sample_slot();
         auto& sample = Profiling::next_sample_slot();
         sample.pid = current->pid();
         sample.pid = current->pid();