Re: [PATCH v2 7/7] arm64: uprobes - ARM32 instruction probing

2018-10-01 Thread Maciej Slodczyk
Hi Robin, Thank you for having a look at my patchset. On 27.09.2018 19:01, Robin Murphy wrote: > On 26/09/18 13:12, Maciej Slodczyk wrote: > [...] >> @@ -38,16 +78,44 @@ int arch_uprobe_analyze_insn(struct arch_uprobe >> *auprobe, struct mm_struct *mm, >>

Re: [PATCH v2 5/7] arm64: make arm uprobes code reusable by arm64

2018-10-01 Thread Maciej Slodczyk
Hi, Thank you for the review. > I think that it would be good to move the renaming changes out of this > patch. > So, as I understand, you suggest separating renaming from moving and putting it in separate patches, right? >>   }) >> +#define ARM_COMPAT_LR_OFFSET    0 > > Not sure this shoul

Re: [PATCH v2 1/7] arm64: move arm uprobes code to be reused by arm64

2018-10-01 Thread Maciej Slodczyk
On 29.09.2018 11:37, Suzuki K Poulose wrote: > following nit: > > The subject tag looks incorrect. Since this patch moves the ARM > code around and has nothing to do with arm64 (yet). So, the subject > could be : > > ARM: move uprobes code to be reused by arm64 > > which could allow the conce

[PATCH v2 5/7] arm64: make arm uprobes code reusable by arm64

2018-09-26 Thread Maciej Slodczyk
to be accessible by ARM64 code. Signed-off-by: Maciej Slodczyk --- arch/arm/include/asm/probes.h| 8 ++ arch/arm/include/asm/ptrace.h| 32 arch/arm/include/asm/uprobes.h | 2 +- arch/arm/probes/uprobes/core.c | 6 +- arch/arm64/include

[PATCH v2 7/7] arm64: uprobes - ARM32 instruction probing

2018-09-26 Thread Maciej Slodczyk
Detect what kind of instruction is being probed and depending on the result: - if an A64 instruction handle it the old way, using existing A64 instructions probing code, - if an A32 instruction decode it and handle using the new code, moved from 32 bit arm kernel tree. Signed-off-by: Maciej

[PATCH v2 3/7] arm64: introduce get_swbp_insn() instead of static assignment

2018-09-26 Thread Maciej Slodczyk
get_swbp_insn() with weak attribute that will allow to be redefined in ARM64 uprobes code. Signed-off-by: Maciej Slodczyk --- include/linux/uprobes.h | 1 + kernel/events/uprobes.c | 12 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/linux/uprobes.h b/include/linux

[PATCH v2 4/7] arm64: change arm64 probes handler prototype

2018-09-26 Thread Maciej Slodczyk
A probes_handler_t() handler function prototype differ between ARM32 and ARM64 arch subtrees. Make ARM64 prototype the same as ARM32 prototype and adjust the ARM64 code to work with the new prototype. Signed-off-by: Maciej Slodczyk --- arch/arm64/include/asm/probes.h | 6 +- arch

[PATCH v2 2/7] arm64: uprobes - fix checkpatch issues

2018-09-26 Thread Maciej Slodczyk
Fix checkpatch issues in moved arm uprobes code. Signed-off-by: Maciej Slodczyk --- lib/probes/arm/actions-arm.c | 4 ++-- lib/probes/arm/decode-arm.c | 1 + lib/probes/arm/decode-arm.h | 4 ++-- lib/probes/arm/decode.c | 6 ++ lib/probes/arm/decode.h | 7 +-- 5 files

[PATCH v2 1/7] arm64: move arm uprobes code to be reused by arm64

2018-09-26 Thread Maciej Slodczyk
Move ARM32 uprobes code from arch/arm/probes/ to a more common location - lib/probes/arm/. This code will be used by ARM64 code when uprobing 32-bit applications. Signed-off-by: Maciej Slodczyk --- arch/arm/probes/Makefile | 8 arch/arm/probes/kprobes

[PATCH v2 6/7] arm64: change arm_probe_decode_insn() function name

2018-09-26 Thread Maciej Slodczyk
ARM probe decoding function has similar name in arm32 - arm_probes_decode_insn(), and arm64 - arm_probe_decode_insn(). Change arm64 probes decoding function name from arm_probe_decode_insn() to arm64_probes_decode_insn() to minimize the risk of confusion. Signed-off-by: Maciej Slodczyk --- arch

[PATCH v2 0/7] arm64: uprobes - ARM32 instruction probing

2018-09-26 Thread Maciej Slodczyk
against it - Fixed build errors reported by kbuild test robot Maciej Slodczyk (7): arm64: move arm uprobes code to be reused by arm64 arm64: uprobes - fix checkpatch issues arm64: introduce get_swbp_insn() instead of static assignment arm64: change arm64 probes handler prototype arm64: make a

[PATCH 5/7 RESEND] arm64: make arm uprobes code reusable by arm64

2018-02-16 Thread Maciej Slodczyk
to be accessible by ARM64 code. Signed-off-by: Maciej Slodczyk --- arch/arm/include/asm/probes.h| 8 ++ arch/arm/include/asm/ptrace.h| 32 arch/arm/include/asm/uprobes.h | 2 +- arch/arm/probes/uprobes/core.c | 6 +- arch/arm64/include

[PATCH 4/7 RESEND] arm64: change arm64 probes handler prototype

2018-02-16 Thread Maciej Slodczyk
A probes_handler_t() handler function prototype differ between ARM32 and ARM64 arch subtrees. Make ARM64 prototype the same as ARM32 prototype and adjust the ARM64 code to work with the new prototype. Signed-off-by: Maciej Slodczyk --- arch/arm64/include/asm/probes.h | 6 +- arch

[PATCH 3/7 RESEND] arm64: introduce get_swbp_insn() instead of static assignment

2018-02-16 Thread Maciej Slodczyk
get_swbp_insn() with weak attribute that will allow to be redefined in ARM64 uprobes code. Signed-off-by: Maciej Slodczyk --- include/linux/uprobes.h | 1 + kernel/events/uprobes.c | 12 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/linux/uprobes.h b/include/linux

[PATCH 7/7 RESEND] arm64: uprobes - ARM32 instruction probing

2018-02-16 Thread Maciej Slodczyk
Detect what kind of instruction is being probed and depending on the result: - if an A64 instruction handle it the old way, using existing A64 instructions probing code, - if an A32 instruction decode it and handle using the new code, moved from 32 bit arm kernel tree. Signed-off-by: Maciej

[PATCH 2/7 RESEND] arm64: uprobes - fix checkpatch.pl issues

2018-02-16 Thread Maciej Slodczyk
Fix checkpatch.pl issues in moved arm uprobes code. Signed-off-by: Maciej Slodczyk --- lib/probes/arm/actions-arm.c | 4 ++-- lib/probes/arm/decode-arm.c | 1 + lib/probes/arm/decode-arm.h | 4 ++-- lib/probes/arm/decode.c | 6 ++ lib/probes/arm/decode.h | 7 +-- 5 files

[PATCH 1/7 RESEND] arm64: move arm uprobes code to be reused by arm64

2018-02-16 Thread Maciej Slodczyk
Move ARM32 uprobes code from arch/arm/probes/ to a more common location - lib/probes/arm/. This code will be used by ARM64 code when uprobing 32-bit applications. Signed-off-by: Maciej Slodczyk --- arch/arm/probes/Makefile | 8 arch/arm/probes/kprobes

[PATCH 6/7 RESEND] arm64: change arm_probe_decode_insn() function name

2018-02-16 Thread Maciej Slodczyk
ARM probe decoding function has similar name in arm32 - arm_probes_decode_insn(), and arm64 - arm_probe_decode_insn(). Change arm64 probes decoding function name from arm_probe_decode_insn() to arm64_probes_decode_insn() to minimize the risk of confusion. Signed-off-by: Maciej Slodczyk --- arch

[PATCH 0/7 RESEND] arm64: uprobes - ARM32 instruction probing

2018-02-16 Thread Maciej Slodczyk
: - simulation-able instructions, like: STM, LDM, BLX, BL - xol-able instructions, like: STR, LDR, ADD, CMN, CMP - branching - uretprobes. This patchset does not implement T32 (Thumb) instructions probing (which is also unsupported on "native" ARM32 arch). Maciej Slodczyk (7): arm64: move arm up