perf tools: set the default length of HW_BREAKPOINT_X as 4 for non X86_64
hulk inclusion category: bugfix bugzilla: 47254 CVE: NA ------------------------------------------------------------------------- Some products may run both 32bit(ILP32) and 64bit APPs on arm64, such as SD5122. And RTOS will only provides 64bit perf tool. At present, if the user did not obviously specify the the length of HW_BREAKPOINT_X, perf will use sizeof(long) as default. For 64bit perf tool, this value is 8. But the ILP32 syscall only accepts the length 2(Thumb) and 4. In fact, the original default length is 4 before below patch, because the length of some instructions is larger than 4 on X86_64. Use macro HAVE_ARCH_X86_64_SUPPORT to make sure that the default length is sizeof(long) on X86_64, and HW_BREAKPOINT_LEN_4 for others. Fixes: aa59a485 ("perf: Don't use 4 bytes as a default instruction breakpoint length") Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com> Reviewed-by: NLi Bin <huawei.libin@huawei.com> Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NLi Huafei <lihuafei1@huawei.com> Reviewed-by: NCheng Jian <cj.chengjian@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录