jan.kratochvil at redhat dot com
2016-06-05 15:40:47 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=20207
Bug ID: 20207
Summary: kernel RFE: aarch64: ptrace: BAS: Support any
contiguous range
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: external
Assignee: unassigned at sourceware dot org
Reporter: jan.kratochvil at redhat dot com
Target Milestone: ---
A tracker for Linux kernel RFE:
https://bugzilla.redhat.com/show_bug.cgi?id=1342821
GDB currently misses some unaligned watchpoints. GDB can be modified not to
miss then but then it will have some unaligned watchpoints false positives.
Aarch64: watchpoints set on non-8-byte-aligned addresses are always missed
https://sourceware.org/bugzilla/show_bug.cgi?id=19806
With this proposed kernel change GDB could be changed to support unaligned
watchpoints without misses and without false positives.
ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile
The valid values for BAS are 0b0000000 , or a binary number all of whose set
bits are contiguous.
But current: linux-2.6/arch/arm64/kernel/hw_breakpoint.c
arch_bp_generic_fields()
permits only these 4 combinations:
#define ARM_BREAKPOINT_LEN_1 0x1
#define ARM_BREAKPOINT_LEN_2 0x3
#define ARM_BREAKPOINT_LEN_4 0xf
#define ARM_BREAKPOINT_LEN_8 0xff
Therefore Linux kernel should support arbitrary contiguous LEN value, not just
those 4 values above.
wget https://bugzilla.redhat.com/attachment.cgi?id=1164917;gcc -o
aarch64-watchpoint aarch64-watchpoint.c -Wall -g;./aarch64-watchpoint
./aarch64-watchpoint: PTRACE_SETREGSET: NT_ARM_HW_WATCH: Invalid argument
Bug ID: 20207
Summary: kernel RFE: aarch64: ptrace: BAS: Support any
contiguous range
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: external
Assignee: unassigned at sourceware dot org
Reporter: jan.kratochvil at redhat dot com
Target Milestone: ---
A tracker for Linux kernel RFE:
https://bugzilla.redhat.com/show_bug.cgi?id=1342821
GDB currently misses some unaligned watchpoints. GDB can be modified not to
miss then but then it will have some unaligned watchpoints false positives.
Aarch64: watchpoints set on non-8-byte-aligned addresses are always missed
https://sourceware.org/bugzilla/show_bug.cgi?id=19806
With this proposed kernel change GDB could be changed to support unaligned
watchpoints without misses and without false positives.
ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile
The valid values for BAS are 0b0000000 , or a binary number all of whose set
bits are contiguous.
But current: linux-2.6/arch/arm64/kernel/hw_breakpoint.c
arch_bp_generic_fields()
permits only these 4 combinations:
#define ARM_BREAKPOINT_LEN_1 0x1
#define ARM_BREAKPOINT_LEN_2 0x3
#define ARM_BREAKPOINT_LEN_4 0xf
#define ARM_BREAKPOINT_LEN_8 0xff
Therefore Linux kernel should support arbitrary contiguous LEN value, not just
those 4 values above.
wget https://bugzilla.redhat.com/attachment.cgi?id=1164917;gcc -o
aarch64-watchpoint aarch64-watchpoint.c -Wall -g;./aarch64-watchpoint
./aarch64-watchpoint: PTRACE_SETREGSET: NT_ARM_HW_WATCH: Invalid argument
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.