diff options
author | He Zhe <zhe.he@windriver.com> | 2021-02-23 09:25:34 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-02-23 11:38:27 +0100 |
commit | d47422d953e258ad587b5edf2274eb95d08bdc7d (patch) | |
tree | 5bdae6ea1498aaa47c24049d03633b37908980a2 | |
parent | kexec: move machine_kexec_post_load() to public interface (diff) | |
download | linux-d47422d953e258ad587b5edf2274eb95d08bdc7d.tar.xz linux-d47422d953e258ad587b5edf2274eb95d08bdc7d.zip |
arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing
As stated in linux/errno.h, ENOTSUPP should never be seen by user programs.
When we set up uprobe with 32-bit perf and arm64 kernel, we would see the
following vague error without useful hint.
The sys_perf_event_open() syscall returned with 524 (INTERNAL ERROR:
strerror_r(524, [buf], 128)=22)
Use EOPNOTSUPP instead to indicate such cases.
Signed-off-by: He Zhe <zhe.he@windriver.com>
Link: https://lore.kernel.org/r/20210223082535.48730-1-zhe.he@windriver.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | arch/arm64/kernel/probes/uprobes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/probes/uprobes.c b/arch/arm64/kernel/probes/uprobes.c index a412d8edbcd2..2c247634552b 100644 --- a/arch/arm64/kernel/probes/uprobes.c +++ b/arch/arm64/kernel/probes/uprobes.c @@ -38,7 +38,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, /* TODO: Currently we do not support AARCH32 instruction probing */ if (mm->context.flags & MMCF_AARCH32) - return -ENOTSUPP; + return -EOPNOTSUPP; else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE)) return -EINVAL; |