]> git.ipfire.org Git - people/arne_f/kernel.git/commit
arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing
authorHe Zhe <zhe.he@windriver.com>
Tue, 23 Feb 2021 08:25:34 +0000 (16:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Mar 2021 17:22:53 +0000 (18:22 +0100)
commitebd65a917eef4859e0067af20d837dfa9e9b6534
treea27b033d27e2715e85623c9e3890611deab9e953
parent3dea563626c5b464b7305c882f2809915030c134
arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing

commit d47422d953e258ad587b5edf2274eb95d08bdc7d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/probes/uprobes.c