diff options
-rw-r--r-- | drivers/misc/tegra-profiler/hrt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/tegra-profiler/hrt.c b/drivers/misc/tegra-profiler/hrt.c index 56d8b84ae75d..a260c7522706 100644 --- a/drivers/misc/tegra-profiler/hrt.c +++ b/drivers/misc/tegra-profiler/hrt.c @@ -269,6 +269,10 @@ static void read_source(struct quadd_event_source_interface *source, record_data.cpu_mode = user_mode(regs) ? QUADD_CPU_MODE_USER : QUADD_CPU_MODE_KERNEL; + /* For security reasons, hide IPs from the kernel space. */ + if (record_data.cpu_mode == QUADD_CPU_MODE_KERNEL) + record_data.sample.ip = 0; + record_data.sample.callchain_nr = callchain_nr; if (pid > 0) { |