提交 61247358 编写于 作者: Y Ye Bin 提交者: Zheng Zengkai

arm32: kaslr: Fix clock_gettime and gettimeofday performance degradation when...

arm32: kaslr: Fix clock_gettime and gettimeofday performance degradation when configure CONFIG_RANDOMIZE_BASE

hulk inclusion
category: feature
feature: ARM kaslr support
bugzilla: 47952
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: NYe Bin <yebin10@huawei.com>
Reviewed-by: NJason Yan <yanaijie@huawei.com>
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Signed-off-by: NCui GaoSheng <cuigaosheng1@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f59d4739
......@@ -4,6 +4,11 @@
*
* Copyright 2015 Mentor Graphics Corporation.
*/
#ifdef CONFIG_RANDOMIZE_BASE
#pragma GCC visibility pop
#endif
#include <linux/time.h>
#include <linux/types.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册