From patchwork Fri May 8 15:43:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186397 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp105041ill; Fri, 8 May 2020 08:51:42 -0700 (PDT) X-Google-Smtp-Source: APiQypIeC8INyJRWo9YevJfyrWml5Z6aXh/f3/dvFL18igrgJLDg7twtmkzHrvZWUYBF/d+oz7bF X-Received: by 2002:a37:5102:: with SMTP id f2mr3396159qkb.18.1588953102019; Fri, 08 May 2020 08:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588953102; cv=none; d=google.com; s=arc-20160816; b=gTEagEt6M2ZpCG2goR0HZLUWhDg6x1hmPXCRVPvk1JcCfBJx3fb/3JaF3JOVgRqV6H qm43SjMQGhYDWnKOb9yJaTC+/9P5gJeymbT5Wk8Fp0FAmMedkXL49VaF0ibe1O5uH2Pn CzwYMyZzPBJIp8Ztfk5vEj0cPS2gMcj9lnY7SB4u89gwBC89YHDLL5SSg+UAaBnJDMGz L5+Ttw3LFaM31HrSGceWzzN9vEPLlSrtYW2uUouHxjVjovSTcUlGjc6bfelIdPF1kGGz 2CIBcnqdKQH916Dl5soTTLebilzK1IZa6Y+LF7FzB8uJLDPtwV48CPNSJw/WuYS6OuaR d8sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=NN/QLBosnfSE6MOjBuSmBLZSNupnPgsxwETGi0A5VuM=; b=wNw9VZBRVGvjMk3qQpqiVtzWsPg0RkiWHrNQgRszHsXVVbqIeOKnxirEzr9r+cgnSb 5OwMo7CNNDzT/qYHvce4pROPBL/hUCn8KAA5cgHl2TJ1O3o0GT9wJ4Eno+9Mz+j9RYYs PfvraTqcIN4XBf8GkH3KPgvf5iNpaO4+tIVg/5FhrUmjqAndvgaboZrpXpdNzenA9GxW uzEw29z9Yap8txI46UUJEfP+L+hd2c5uHyKRCZzKqeL0bV7wx9M9cFGPIplE1BlBRaGG m8fp6sEb1IV73QMwWloYSoRbpsYa4U3FGpszRg14V1C8eA3LLpy8r4/Rn91gw+FV/v9o 5VDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YSTkmNdP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id k69si1206964qke.211.2020.05.08.08.51.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 May 2020 08:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YSTkmNdP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX5Hp-0001kN-EZ for patch@linaro.org; Fri, 08 May 2020 11:51:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX5Aa-0007Zg-GR for qemu-devel@nongnu.org; Fri, 08 May 2020 11:44:12 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:39054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX5AZ-00055t-N0 for qemu-devel@nongnu.org; Fri, 08 May 2020 11:44:12 -0400 Received: by mail-pf1-x443.google.com with SMTP id 18so1129445pfx.6 for ; Fri, 08 May 2020 08:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NN/QLBosnfSE6MOjBuSmBLZSNupnPgsxwETGi0A5VuM=; b=YSTkmNdPAb6KWVnRXBQOb9kH/kZiOxMSfb0NNfEwvv02MVv+Pqr48jnlkNBSdwnNmY TExxZ2xg10NLDylQc9LxuZ0eiqO6RPkST+QpMw1o+9WgsHrzGigAXskLlqM+MFz4/dHy Hd5b6BL+dsdLy0qH5dIpP9WWmeNAcxBnkqxycn41K8FM+EgYlu4CcBAhLFGsDIp6xCjd ID5/noCtmQrM13DOntYHdOIyiS5+er4T8aHmZkve0IQG5CiCLx81PaBGuSdNQhxKoGyd qHcQiRGNLAeRsAhFQcX06nynr2z/9HpvnunjFZTgENG6a0VbHqeV1qtL59MxZq0I1tuh zfgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NN/QLBosnfSE6MOjBuSmBLZSNupnPgsxwETGi0A5VuM=; b=VA1t2R8wcjl2XayR1EgKUzb3BCCv9OsliAh3bhc8zz9SZ8ZzcTYUZf1XZVgAUYFJsL BiqoQl8xgjPXSiOVG3uobmT5zDeabpLx4zY8TcgchN1blOGFtx84i9tJF36NGDHpqamu skAoOh6Gw6uaDlFTINt5NeGoOmV1jR9dtgfh9GwwNCk6KcYutfHpzOtZBv9qzxXq+nqD jOURQaidgPomkZ1wKt7nS1LDEhNIKvS4bKFm+97wfweVd865Khju/1yuT7OK20ESKlPF kZ9Ocvj82seK5J/0hvVVSD9bUHLEZ/bG2H6FWxIP10LjL7Z3EmQhLcvT7yFiodIn9ddA /BlA== X-Gm-Message-State: AGi0PuZSL3wnAQz0+gm4ahZPn655TTOnZRYBAAN2PULGiZ7msdY7gcHA e0lcukh8UnXsBsLK91Xddh28DqfiPVU= X-Received: by 2002:a62:7c16:: with SMTP id x22mr3458266pfc.267.1588952650069; Fri, 08 May 2020 08:44:10 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id o99sm2727662pjo.8.2020.05.08.08.44.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 08:44:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 02/19] exec: Fix cpu_watchpoint_address_matches address length Date: Fri, 8 May 2020 08:43:42 -0700 Message-Id: <20200508154359.7494-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200508154359.7494-1-richard.henderson@linaro.org> References: <20200508154359.7494-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The only caller of cpu_watchpoint_address_matches passes TARGET_PAGE_SIZE, so the bug is not currently visible. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/exec.c b/exec.c index 2874bb5088..5162f0d12f 100644 --- 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; } }