]> git.proxmox.com Git - mirror_qemu.git/commitdiff
exec: Fix cpu_watchpoint_address_matches address length
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 8 May 2020 15:43:42 +0000 (08:43 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 11 May 2020 10:14:02 +0000 (11:14 +0100)
The only caller of cpu_watchpoint_address_matches passes
TARGET_PAGE_SIZE, so the bug is not currently visible.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200508154359.7494-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
exec.c

diff --git a/exec.c b/exec.c
index 2874bb508853d353bca3b9790e5db2aa24c3d371..5162f0d12f997804af14e8fd846f2a3b06043115 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1127,7 +1127,7 @@ int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len)
     int ret = 0;
 
     QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
-        if (watchpoint_address_matches(wp, addr, TARGET_PAGE_SIZE)) {
+        if (watchpoint_address_matches(wp, addr, len)) {
             ret |= wp->flags;
         }
     }