From: Ye Bin
ohos inclusion
category: bugfix
issue: #I3ZXZF
CVE: NA
-----------------------------------------------
When we configure CONFIG_RANDOMIZE_BASE we find that:
[XX]$arm-linux-gnueabihf-readelf -s ./arch/arm/vdso/vdso.so
Symbol table '.dynsym' contains 5 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000278 0 SECTION LOCAL DEFAULT 8
2: 00000000 0 OBJECT GLOBAL DEFAULT ABS LINUX_2.6
We can't find __vdso_gettimeofday and __vdso_clock_gettime symbol. So call
clock_gettime and gettimeofday will call system call. This results in
performance degradation.
Signed-off-by: Ye Bin
Reviewed-by: Jason Yan
Signed-off-by: yangerkun
Signed-off-by: Cui GaoSheng
Reviewed-by: Xiu Jianfeng
Signed-off-by: Chen Jun
Signed-off-by: Yu Changchun
---
arch/arm/vdso/vgettimeofday.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c
index 1976c6f325a4..425e4f2458ec 100644
--- a/arch/arm/vdso/vgettimeofday.c
+++ b/arch/arm/vdso/vgettimeofday.c
@@ -4,6 +4,11 @@
*
* Copyright 2015 Mentor Graphics Corporation.
*/
+
+#ifdef CONFIG_RANDOMIZE_BASE
+#pragma GCC visibility pop
+#endif
+
#include
#include
--
2.22.0