浏览代码

Kernel: Disable SMAP protection while capturing profile samples

Andreas Kling 5 年之前
父节点
当前提交
9e51291aed
共有 1 个文件被更改,包括 1 次插入0 次删除
  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);
 
     if (current->process().is_profiling()) {
+        SmapDisabler disabler;
         auto backtrace = current->raw_backtrace(regs.ebp);
         auto& sample = Profiling::next_sample_slot();
         sample.pid = current->pid();