This is a note to let you know that I've just added the patch titled arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm64-uprobe-return-eopnotsupp-for-aarch32-instruction-probing.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d47422d953e258ad587b5edf2274eb95d08bdc7d Mon Sep 17 00:00:00 2001 From: He Zhe <zhe.he@xxxxxxxxxxxxx> Date: Tue, 23 Feb 2021 16:25:34 +0800 Subject: arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing From: He Zhe <zhe.he@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20210223082535.48730-1-zhe.he@xxxxxxxxxxxxx Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Will Deacon <will@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/arm64/kernel/probes/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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 /* 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; Patches currently in stable-queue which might be from zhe.he@xxxxxxxxxxxxx are queue-5.11/arm64-uprobe-return-eopnotsupp-for-aarch32-instruction-probing.patch