Skip to content

Fix ptrace software breakpoints

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ARM: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASIDarch/arm/Kconfig arch/arm/include/asm/tlbflush.h+20 -01 reply
1/2ARM: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID+0 -01 reply
2/2ARM: flush_ptrace_access: invalidate all I-cachesarch/arm/mm/flush.c+2 -21 reply
2/2ARM: flush_ptrace_access: invalidate all I-caches+0 -01 reply
2/2ARM: flush_ptrace_access: invalidate all I-caches+0 -00 replies
2/2ARM: flush_ptrace_access: invalidate all I-cachesarch/arm/mm/flush.c+14 -40 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchCatalin MarinasRob Clark
SeriesT-b
1/2A-b
1/2A-b
2/2A-b
2/2A-b
2/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Fix ptrace software breakpoints

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 <[email protected]>
Cc Catalin Marinas <[email protected]>

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(-)