All of lore.kernel.org
 help / color / mirror / Atom feed
From: rob@ti.com (Rob Clark)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] Fix ptrace software breakpoints
Date: Mon, 26 Jul 2010 20:30:54 -0500	[thread overview]
Message-ID: <4C4E36CE.3080108@ti.com> (raw)
In-Reply-To: <1279209238-16234-1-git-send-email-will.deacon@arm.com>

On 07/15/2010 10:53 AM, Will Deacon wrote:
> When using GDB on a quad-core Cortex-A9 (Versatile Express) board, software
> breakpoints do not work if the inferior is scheduled onto a different CPU from
> the debugger.
>
> When GDB changes the code of another context via the ptrace POKETEXT mechanism,
> the I-cache must be invalidated before the inferior is allowed to resume. If a
> copy-on-write is triggered by the copy_to_user_page function, the new page
> mappings must be used by the inferior in order to pick up the new instructions.
>
> This patch series addresses this problem by:
>
> (a) Providing a workaround for a known TLB issue on some revisions of the Cortex-A9.
> (b) Performing correct I-cache invalidation in the flush_ptrace_access code.
>
> All feedback/comments/tested-bys welcome.
>
> Cc: Rob Clark<rob@ti.com>
> Cc: Catalin Marinas<catalin.marinas@arm.com>
>
> Will Deacon (2):
>    ARM: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a
>      faulty ASID
>    ARM: flush_ptrace_access: invalidate all I-caches
>
>   arch/arm/Kconfig                |   12 ++++++++++++
>   arch/arm/include/asm/tlbflush.h |    8 ++++++++
>   arch/arm/mm/flush.c             |    4 ++--
>   3 files changed, 22 insertions(+), 2 deletions(-)
>    

Tested on omap4430 (cortex-a9 SMP).. with this patchset I have yet to 
see it fail, in regular use nor in the test case I wrote to show the 
problem (git://github.com/robclark/gdb-test.git).  Without these 
patches, I'd see SIGILL and missed breakpoints 90+% of the time in 
regular use of gdb (basically gdb was unusable unless I booted with 
nosmp or disabled cache), and 100% of the time in my gdb-test.

Tested-by: Rob Clark<rob@ti.com>

  parent reply	other threads:[~2010-07-27  1:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15 15:53 [PATCH 0/2] Fix ptrace software breakpoints Will Deacon
2010-07-15 15:53 ` [PATCH 1/2] ARM: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID Will Deacon
2010-07-15 15:53   ` [PATCH 2/2] ARM: flush_ptrace_access: invalidate all I-caches Will Deacon
2010-07-15 16:32     ` Russell King - ARM Linux
2010-07-15 16:43       ` Will Deacon
2010-07-15 16:54         ` Catalin Marinas
2010-07-19 16:23         ` Will Deacon
2010-08-04 11:24       ` Will Deacon
2010-07-15 16:21   ` [PATCH 1/2] ARM: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID Shilimkar, Santosh
2010-07-15 16:32     ` Will Deacon
2010-07-15 16:43       ` Shilimkar, Santosh
2010-07-16  4:15 ` [PATCH 0/2] Fix ptrace software breakpoints Rob Clark
2010-07-20 17:23   ` Will Deacon
2010-07-27  1:30 ` Rob Clark [this message]
2010-07-27  9:43   ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4E36CE.3080108@ti.com \
    --to=rob@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.