OSDN Git Service

powerpc/ptrace: Fix enforcement of DAWR constraints
authorMichael Neuling <mikey@neuling.org>
Thu, 17 May 2018 05:37:14 +0000 (15:37 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:21:29 +0000 (11:21 +0200)
commit76dcdfe3f6e5d800c97c3c3cb96af2421fb53a0d
treee31d301314eaff3f1889d33baa9bd86228d1d220
parentb3d0e0f07eea2aec0e189cf4d2ca95020c48b516
powerpc/ptrace: Fix enforcement of DAWR constraints

commit cd6ef7eebf171bfcba7dc2df719c2a4958775040 upstream.

Back when we first introduced the DAWR, in commit 4ae7ebe9522a
("powerpc: Change hardware breakpoint to allow longer ranges"), we
screwed up the constraint making it a 1024 byte boundary rather than a
512. This makes the check overly permissive. Fortunately GDB is the
only real user and it always did they right thing, so we never
noticed.

This fixes the constraint to 512 bytes.

Fixes: 4ae7ebe9522a ("powerpc: Change hardware breakpoint to allow longer ranges")
Cc: stable@vger.kernel.org # v3.9+
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/hw_breakpoint.c