ARM hardware supports setting watchpoints on adresses which are not word-aligned. However, the current kernel implementation does not support this feature due to the need to convert the watchpoint data to a generic format. See arch_bp_generic_fields (https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/kernel/hw_breakpoint.c#n347), which ignores any more complicated bit sequences. It would be great if we could get unaligned watchpoints working as well.
Created attachment 217691 [details] A test program demonstrating the issue. Output of the test program on my device is: Setting address to fffc5470 Setting control to 00000031 Test 0 OK. Setting address to fffc5470 Setting control to 00000051 ptrace.c:36: set_watchpoint: assertion "0 == ptrace(PTRACE_SETHBPREGS, child, -2, &control)" failed