Skip to content
Commit a74b6584 authored by He Zhe's avatar He Zhe Committed by Bruce Ashfield
Browse files

arm64/perf: Fix wrong cast that may cause wrong truncation



tail is a pointer while buftail.fp is a u32.

arch/arm64/kernel/perf_callchain.c:100:6: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
  100 |  if ((u32)tail + 4 >= buftail.fp)
      |      ^
arch/arm64/kernel/perf_callchain.c:103:9: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]{noformat}
  103 |  return (struct compat_frame_tail __user *)(buftail.fp - 4);
      |         ^

Fixes: 8818670c ("arm64/perf: fix backtrace for AAPCS with FP enabled")
Signed-off-by: default avatarHe Zhe <zhe.he@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
parent b0955ff5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment