Skip to content

Commit 9abfdda

Browse files
Ravi Bangoriagregkh
authored andcommitted
powerpc/watchpoint: Fix handling of vector instructions
[ Upstream commit 4441eb0 ] Vector load/store instructions are special because they are always aligned. Thus unaligned EA needs to be aligned down before comparing it with watch ranges. Otherwise we might consider valid event as invalid. Fixes: 74c6881 ("powerpc/watchpoint: Prepare handler to handle more than one watchpoint") Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200902042945.129369-3-ravi.bangoria@linux.ibm.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 69a94e5 commit 9abfdda

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/powerpc/kernel/hw_breakpoint.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ static void get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr,
644644
if (*type == CACHEOP) {
645645
*size = cache_op_size();
646646
*ea &= ~(*size - 1);
647+
} else if (*type == LOAD_VMX || *type == STORE_VMX) {
648+
*ea &= ~(*size - 1);
647649
}
648650
}
649651

0 commit comments

Comments
 (0)