From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753048AbcJZDRV (ORCPT ); Tue, 25 Oct 2016 23:17:21 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:35434 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbcJZDRT (ORCPT ); Tue, 25 Oct 2016 23:17:19 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Pratyush Anand Date: Wed, 26 Oct 2016 08:47:18 +0530 Message-ID: Subject: Re: [PATCH V2 0/6] ARM64: Uprobe support added To: linux-arm-kernel , Catalin Marinas Cc: Russell King - ARM Linux , Will Deacon , open list , William Cohen , Oleg Nesterov , David Long , Steve Capper , srikar@linux.vnet.ibm.com, vijaya.kumar@caviumnetworks.com, Pratyush Anand Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Catalin, Please let me know if everything else other than is_trap_insn() looks fine to you. May be I can work well in time. It would be great if we can make it into v4.9. ~Pratyush On Tue, Sep 27, 2016 at 1:17 PM, Pratyush Anand wrote: > Changes since v1: > * Exposed sync_icache_aliases() and used that in stead of flush_uprobe_xol_access() > * Assigned 0x0005 to BRK64_ESR_UPROBES in stead of 0x0008 > * moved uprobe_opcode_t from probes.h to uprobes.h > * Assigned 4 to TIF_UPROBE instead of 5 > * Assigned AARCH64_INSN_SIZE to UPROBE_SWBP_INSN_SIZE instead of hard code 4. > * Removed saved_fault_code from struct arch_uprobe_task > * Removed preempt_dis(en)able() from arch_uprobe_copy_ixol() > * Removed case INSN_GOOD from arch_uprobe_analyze_insn() > * Now we do check that probe point is not for a 32 bit task. > * Return a false positive from is_tarp_insn() > * Changes for rebase conflict resolution > > V1 was here: https://lkml.org/lkml/2016/8/2/29 > Patches have been rebased on next-20160927, so that there would be no > conflicts with other arm64/for-next/core patches. > > Patches have been tested for following: > 1. Step-able instructions, like sub, ldr, add etc. > 2. Simulation-able like ret, cbnz, cbz etc. > 3. uretprobe > 4. Reject-able instructions like sev, wfe etc. > 5. trapped and abort xol path > 6. probe at unaligned user address. > 7. longjump test cases > > aarch32 task probing is not yet supported. > > Pratyush Anand (6): > arm64: kprobe: protect/rename few definitions to be reused by uprobe > arm64: kgdb_step_brk_fn: ignore other's exception > arm64: Handle TRAP_TRACE for user mode as well > arm64: Handle TRAP_BRKPT for user mode as well > arm64: introduce mm context flag to keep 32 bit task information > arm64: Add uprobe support > > arch/arm64/Kconfig | 3 + > arch/arm64/include/asm/cacheflush.h | 1 + > arch/arm64/include/asm/debug-monitors.h | 3 + > arch/arm64/include/asm/elf.h | 12 +- > arch/arm64/include/asm/mmu.h | 1 + > arch/arm64/include/asm/probes.h | 19 +-- > arch/arm64/include/asm/ptrace.h | 8 ++ > arch/arm64/include/asm/thread_info.h | 5 +- > arch/arm64/include/asm/uprobes.h | 36 ++++++ > arch/arm64/kernel/debug-monitors.c | 40 +++--- > arch/arm64/kernel/kgdb.c | 3 + > arch/arm64/kernel/probes/Makefile | 2 + > arch/arm64/kernel/probes/decode-insn.c | 32 ++--- > arch/arm64/kernel/probes/decode-insn.h | 8 +- > arch/arm64/kernel/probes/kprobes.c | 36 +++--- > arch/arm64/kernel/probes/uprobes.c | 221 ++++++++++++++++++++++++++++++++ > arch/arm64/kernel/signal.c | 3 + > arch/arm64/mm/flush.c | 2 +- > 18 files changed, 371 insertions(+), 64 deletions(-) > create mode 100644 arch/arm64/include/asm/uprobes.h > create mode 100644 arch/arm64/kernel/probes/uprobes.c > > -- > 2.7.4 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: panand@redhat.com (Pratyush Anand) Date: Wed, 26 Oct 2016 08:47:18 +0530 Subject: [PATCH V2 0/6] ARM64: Uprobe support added In-Reply-To: References: Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Catalin, Please let me know if everything else other than is_trap_insn() looks fine to you. May be I can work well in time. It would be great if we can make it into v4.9. ~Pratyush On Tue, Sep 27, 2016 at 1:17 PM, Pratyush Anand wrote: > Changes since v1: > * Exposed sync_icache_aliases() and used that in stead of flush_uprobe_xol_access() > * Assigned 0x0005 to BRK64_ESR_UPROBES in stead of 0x0008 > * moved uprobe_opcode_t from probes.h to uprobes.h > * Assigned 4 to TIF_UPROBE instead of 5 > * Assigned AARCH64_INSN_SIZE to UPROBE_SWBP_INSN_SIZE instead of hard code 4. > * Removed saved_fault_code from struct arch_uprobe_task > * Removed preempt_dis(en)able() from arch_uprobe_copy_ixol() > * Removed case INSN_GOOD from arch_uprobe_analyze_insn() > * Now we do check that probe point is not for a 32 bit task. > * Return a false positive from is_tarp_insn() > * Changes for rebase conflict resolution > > V1 was here: https://lkml.org/lkml/2016/8/2/29 > Patches have been rebased on next-20160927, so that there would be no > conflicts with other arm64/for-next/core patches. > > Patches have been tested for following: > 1. Step-able instructions, like sub, ldr, add etc. > 2. Simulation-able like ret, cbnz, cbz etc. > 3. uretprobe > 4. Reject-able instructions like sev, wfe etc. > 5. trapped and abort xol path > 6. probe at unaligned user address. > 7. longjump test cases > > aarch32 task probing is not yet supported. > > Pratyush Anand (6): > arm64: kprobe: protect/rename few definitions to be reused by uprobe > arm64: kgdb_step_brk_fn: ignore other's exception > arm64: Handle TRAP_TRACE for user mode as well > arm64: Handle TRAP_BRKPT for user mode as well > arm64: introduce mm context flag to keep 32 bit task information > arm64: Add uprobe support > > arch/arm64/Kconfig | 3 + > arch/arm64/include/asm/cacheflush.h | 1 + > arch/arm64/include/asm/debug-monitors.h | 3 + > arch/arm64/include/asm/elf.h | 12 +- > arch/arm64/include/asm/mmu.h | 1 + > arch/arm64/include/asm/probes.h | 19 +-- > arch/arm64/include/asm/ptrace.h | 8 ++ > arch/arm64/include/asm/thread_info.h | 5 +- > arch/arm64/include/asm/uprobes.h | 36 ++++++ > arch/arm64/kernel/debug-monitors.c | 40 +++--- > arch/arm64/kernel/kgdb.c | 3 + > arch/arm64/kernel/probes/Makefile | 2 + > arch/arm64/kernel/probes/decode-insn.c | 32 ++--- > arch/arm64/kernel/probes/decode-insn.h | 8 +- > arch/arm64/kernel/probes/kprobes.c | 36 +++--- > arch/arm64/kernel/probes/uprobes.c | 221 ++++++++++++++++++++++++++++++++ > arch/arm64/kernel/signal.c | 3 + > arch/arm64/mm/flush.c | 2 +- > 18 files changed, 371 insertions(+), 64 deletions(-) > create mode 100644 arch/arm64/include/asm/uprobes.h > create mode 100644 arch/arm64/kernel/probes/uprobes.c > > -- > 2.7.4 >