Message ID | 20190903160858.5296-32-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | ca86cf328ce216bb304bbf09a43614613f945d86 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp98905ily; Tue, 3 Sep 2019 09:43:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSPmrPuvcLMEIWaW+jSiP6nZub1FD2S2aRKkzCoKFm2B4DvJsqx2tG5fSJl6ZFtCbqjF1b X-Received: by 2002:aa7:c508:: with SMTP id o8mr37009371edq.123.1567529027481; Tue, 03 Sep 2019 09:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567529027; cv=none; d=google.com; s=arc-20160816; b=pwYQzrCHgBZtV0Vaf/R2gdv0r8z03bAe7Ge2hMnWtzsMxqKhjVgA9IQs+7dnodGo1X V+X1lzGE+5LdqkBs742rlfuB58Sr70EyZV70hfluMW0UnZP2pLbB6lX2Tqo9CQKwbRX9 EDIqxQ8WLSP7MOUKhjRXYvw4fK7LpO54JICcEHrHPuv16uGua6v3V2O9pJOXvQuYKcHN apzXyi048t/iF9VpgoSz+ZM+6anXB9qLptVcR3New5+c1S4qZ0gehY5Y2+KrLdruuIYm 2ZAkVvxJKQcGbSS5kUcypcMorf7tg14daNue+KaHGKvCXO1/S0Txm/UPshtcZGNef2Yx d7Lw== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=C13i/X6uJZDwcnVhjZoMCIfnOZdw0d+2p6DUGgXSKUw=; b=tr62rpoY4nfSf5hzssjkhaRAwPbqlh5hNjcHoVuhxzt/PVqZOsoYdNAKOzm+n3NJ4z Xdrv6W9XpDsG23EjNYgHdGzBfZ5guYfWgJb6zpOfkPmfPngckmKLRUlDSU+rJMsLX0Xj H62zEc+tYPvri9S88toBin/WGrh/w6E+5jJnZwBn2Ex3Iunp5VRzOFYoI5H2MC8NelJO Wprs7CG7NXyCCXLPpu65jv9TFrHNiRbQAkE8nf62G91NwwTHQSgi0B+TUWj2ir14H0sC 0DmxyxaWZtHFK75fm5DIH4/x/u0mjTqS8zy3VzIim1xMVGQ7xcNoMe8GKi7f9tJRDTaW cYug== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uPGdGnGV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o31si11827655edc.142.2019.09.03.09.43.47 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Sep 2019 09:43:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uPGdGnGV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1i5BuE-0005OB-41 for patch@linaro.org; Tue, 03 Sep 2019 12:43:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37460) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1i5BNF-0001hJ-7j for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1i5BND-00042T-Hk for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:41 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:44179) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1i5BND-00041P-Bt for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:39 -0400 Received: by mail-pg1-x52b.google.com with SMTP id i18so9387712pgl.11 for <qemu-devel@nongnu.org>; Tue, 03 Sep 2019 09:09:39 -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; bh=C13i/X6uJZDwcnVhjZoMCIfnOZdw0d+2p6DUGgXSKUw=; b=uPGdGnGVygXv9BzXdeIe2EVY6OOzHRjNpUxhXHc8ddGvW6GmqKQ6eP78f/wLS/7Fno uNeN+Wqo2Sj02wkqFurAy80j/2A4aSMOzP+I7EscwNgucUiXHNXjmv68ohFYOBkXQXaJ tUirD72KsiddYIr6Kx9jiv439MvO/2H53tc55/RYu7VpaPzSAA7jTbvDjvs3FHT4pHqD 0NH8FvSUkRvZ3VxbVtaAw4Mijt/OQcnR5q1J/AKjo1P04PTrVNYxX87qsweu4jAleXGe SnV9boh8y7Z/w5zup6CbNzV27JO8yKy7RREgH4fH4CtQQ+afjRSpQYwsw9UsAaZ2/UEE AA1g== 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; bh=C13i/X6uJZDwcnVhjZoMCIfnOZdw0d+2p6DUGgXSKUw=; b=tcx0mV2utUcjZxoYZqsjjQfofH4yIW1NBnGL6eriCFpy78Ap3UtcQbYUzxQFuDc4yO HCU0OhRop1/zhsXlWPITFo6DIwjY7bN6VzxXIHKKWF3Pu+LFYmXwPUrD1ebyZWKhph+3 Y51piLimDYnq+kP5DcU2+Pvrj9Kj/ykNlh+O2oLUCx+7z0iWqJanfZugX/8kKHWgtLb8 BbTvx8WH6gAIRP/4SJyypf//XKgVMfiE+bIgpyXpKv9xzfL0ebxYrjI/sTkN3dyvR0dG Nok3aZAl2D0S1kV3GN4EsAZ0anyoj/6h2lSTKDaXr+AmyNN7cl7BlPCPTXKxx234jYf9 yRVw== X-Gm-Message-State: APjAAAVCbNE31TmgkzMtmalfgN4lWyA7bp0KjsbvL5UOLbM60BVvsbZ9 1L+VtDJdJviGM+w7VeuvpHuix5gbrUw= X-Received: by 2002:a62:e205:: with SMTP id a5mr41561506pfi.137.1567526978092; Tue, 03 Sep 2019 09:09:38 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 127sm28089711pfy.56.2019.09.03.09.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 09:09:37 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2019 09:08:53 -0700 Message-Id: <20190903160858.5296-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903160858.5296-1-richard.henderson@linaro.org> References: <20190903160858.5296-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52b Subject: [Qemu-devel] [PATCH 31/36] tcg: Enforce single page access in probe_write() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: peter.maydell@linaro.org, David Hildenbrand <david@redhat.com> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg patch queue
|
expand
|
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 010c4c6e3c..707adf7631 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1088,6 +1088,8 @@ void probe_write(CPUArchState *env, target_ulong addr, int size, int mmu_idx, CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr); target_ulong tlb_addr = tlb_addr_write(entry); + g_assert(-(addr | TARGET_PAGE_MASK) >= size); + if (unlikely(!tlb_hit(tlb_addr, addr))) { if (!VICTIM_TLB_HIT(addr_write, addr)) { tlb_fill(env_cpu(env), addr, size, MMU_DATA_STORE, diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 86e6827201..625c33f893 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -191,6 +191,8 @@ static inline int handle_cpu_signal(uintptr_t pc, siginfo_t *info, void probe_write(CPUArchState *env, target_ulong addr, int size, int mmu_idx, uintptr_t retaddr) { + g_assert(-(addr | TARGET_PAGE_MASK) >= size); + if (!guest_addr_valid(addr) || page_check_range(addr, size, PAGE_WRITE) < 0) { CPUState *cpu = env_cpu(env);