diff options
author | Andrey Trachenko <atrachenko@nvidia.com> | 2013-08-15 23:02:23 +0400 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2013-08-16 13:04:25 -0700 |
commit | 586ad7330f03aa776f13f5b509724468b8c6cd95 (patch) | |
tree | 609ffbe43d4fefd6eeec2f38fda1786ea9f849b0 | |
parent | 3413dc838fb2075779708d39c37acd60ba662c99 (diff) |
ARM: tegra: Do not expose kernel-space IPsdaily-2013.09.09.0_rel-roth-ota-1-partner
In Tegra Profiler misc driver, do not expose kernel-space IPs
for security purposes.
Bug 1312406
Bug 1349673
Change-Id: I07f1ee2036b62dbf7195f3fac4f9632f07933616
Signed-off-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-on: http://git-master/r/262013
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Daniel Horowitz <dhorowitz@nvidia.com>
Tested-by: Daniel Horowitz <dhorowitz@nvidia.com>
Reviewed-by: Anshul Jain (SW) <anshulj@nvidia.com>
GVS: Gerrit_Virtual_Submit
-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) { |