lkml.org 
[lkml]   [2017]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] kcov: remove #ifdef CONFIG_RANDOMIZE_BASE
Date
There is no need to surround kaslr_offset() with CONFIG_RANDOMIZE_BASE ifdef.
kaslr_offset() will just return 0 if CONFIG_RANDOMIZE_BASE isn't set.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
kernel/kcov.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/kernel/kcov.c b/kernel/kcov.c
index 3f693a0f6f3e..2f0e7a7c7afc 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -69,9 +69,7 @@ void notrace __sanitizer_cov_trace_pc(void)
unsigned long pos;
unsigned long ip = _RET_IP_;

-#ifdef CONFIG_RANDOMIZE_BASE
ip -= kaslr_offset();
-#endif

/*
* There is some code that runs in interrupts but for which
--
2.13.5
\
 
 \ /
  Last update: 2017-09-19 14:45    [W:0.143 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site