Message ID | 20180509175458.15642-7-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | 5c433a7aac1a34c199ed5a7a07f4f71349562a8f |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp60842lji; Wed, 9 May 2018 11:08:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZruEib/rW+bFoZq+EHhoCiL9QejzVelG1LokAwHXGdhV3EVnep+fkzRKxwfxwyTzRe9ItmO X-Received: by 2002:ac8:3431:: with SMTP id u46-v6mr42353412qtb.193.1525889303987; Wed, 09 May 2018 11:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525889303; cv=none; d=google.com; s=arc-20160816; b=rlJ5XlqxI2hMTWWDTFLMZGz2OFIOrysOXORx8T5EWuvJW6Rdn0tleSvaSr4U/52Wu/ CxvWryX+nUJLVpdRk4cC6LVvfQcuXjJiNgcuMBpMZg+EWSmSKLtFXNXUItpPFy7dNZdz AXp1kI6pku1aU+uyg8DK7RKQWuj6BSPLhfrrDnqi91gyDaPO+jhWPvZqN/NX0TgYJmAG fANzlctb85fdfLNwuMap6zoeuYgIXDDLIYYVT/09Ga6FUO24CgSwfzn80QjSkJK+6z+T kz6bQJQz0r39PGFXnkbfUuP39r0b1FtlpVmsyQpNZbeIdOq5WQC/87wwpvuJ1WSn7lq6 HNaA== 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:arc-authentication-results; bh=UdW6ZcuE9nsn1byu2ubWFKPxBVxEQbHx4DVNMO8t0cA=; b=LQsBtol/GTJtOQ8ELoILX7tItohkbGWq8SThIFeWrVCBC/Z2dsR2FUIKtR8Qz6zg0/ C9AtIXT9G8+GBvGON+/Dx+gdK0lUEKQEqfv1oRGgTwCeMzcsphsLyao/WM6kWviRPyXn 3zOzHwSgY9vROch8JC2nHxM6D+zRddkMJ7kLaXVdSStComcxAnUsxjX5XtEtJFJWws9k qBB3yJpq5RcvEcGYLg3molGlUhZCQSFPTziud0S2eUKQirazNupXrW5axshUblUT+18f +SKbAY/PfVH3ZDDJu2Hkf/C/UsmgHzMWc7qRgq7/tOWcyfUurVy+ftWWoacFpZW8jbGN Qz2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LXbzOvV/; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 20-v6si352652qtu.375.2018.05.09.11.08.23 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 09 May 2018 11:08:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LXbzOvV/; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:58189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fGTVn-0002HY-DS for patch@linaro.org; Wed, 09 May 2018 14:08:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fGTJ3-0004SV-O7 for qemu-devel@nongnu.org; Wed, 09 May 2018 13:55:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fGTJ2-0005IG-DJ for qemu-devel@nongnu.org; Wed, 09 May 2018 13:55:13 -0400 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:33908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fGTJ2-0005Gf-3g for qemu-devel@nongnu.org; Wed, 09 May 2018 13:55:12 -0400 Received: by mail-pg0-x242.google.com with SMTP id g20-v6so16326547pgv.1 for <qemu-devel@nongnu.org>; Wed, 09 May 2018 10:55: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; bh=UdW6ZcuE9nsn1byu2ubWFKPxBVxEQbHx4DVNMO8t0cA=; b=LXbzOvV/S1or2tZ8TmYpdrvWHRGS4NEqbkH8bSzGg1IVt0GA82wflB1h+ACn5Rh/bw LGqF6MluIciO74vcZcFm4aD4TwAhjakuyAHvJNJHpmZ04o73ZK+RaJ9mdUFHgILf+/F2 aUDkWnhMplRWN9Amg+EsCw0Ae9F8MQBBuyanM= 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=UdW6ZcuE9nsn1byu2ubWFKPxBVxEQbHx4DVNMO8t0cA=; b=CujMMQA32qagf/Wbv5dyaiIV95ZjgeKkNdWj7ZfpFzxx37r/mlQUwCl7/96iEva0Ss w9UjyeLgo7ZKljfGV5pjywBxPysRR2sZlfqb9v6Rfrm0taDI29xCqopNajuD0RfmP1sK F44+ZAqyNus/WPk3C6MWXzOtQhpRrLbxylUOMHOTbEuqN2KXH7S3oEyEeISMc93qU3o0 AxVJ6VVy0Q2Wu6jopj8QiM84+CaIHST7bHqao9hjMX/7dyN5XVPvWeUiBaZzgGtZ2u5J +CxXlOmzYvTz1MDWOPAgdoLH9QTVev6pD1Aish+5gse2ovMkQyhcpdAEJ/doNlLMeGzN K2ug== X-Gm-Message-State: ALQs6tAP7i/ZEAd9NsmLwuq7i4ifS8NLi+mgtweNkQ+nabmUBZZ5Kbqj GKDZiegKVRqaBE7k2SoCGl1aCvwcJ1Y= X-Received: by 10.98.192.220 with SMTP id g89mr44768695pfk.223.1525888510676; Wed, 09 May 2018 10:55:10 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id l90sm60332813pfb.149.2018.05.09.10.55.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 10:55:09 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Wed, 9 May 2018 10:54:36 -0700 Message-Id: <20180509175458.15642-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509175458.15642-1-richard.henderson@linaro.org> References: <20180509175458.15642-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::242 Subject: [Qemu-devel] [PULL 06/28] target/tilegx: avoid integer overflow in next_page PC check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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: <http://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, Sagar Karandikar <sagark@eecs.berkeley.edu>, David Hildenbrand <david@redhat.com>, Palmer Dabbelt <palmer@sifive.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Max Filippov <jcmvbkbc@gmail.com>, Michael Clark <mjc@sifive.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Yongbok Kim <yongbok.kim@mips.com>, Alexander Graf <agraf@suse.de>, "Emilio G. Cota" <cota@braap.org>, Richard Henderson <rth@twiddle.net>, Artyom Tarasenko <atar4qemu@gmail.com>, Eduardo Habkost <ehabkost@redhat.com>, qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne <shorne@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Cornelia Huck <cohuck@redhat.com>, Michael Walle <michael@walle.cc>, qemu-ppc@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno <aurelien@aurel32.net> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
Bulk target patches
|
expand
|
diff --git a/target/tilegx/translate.c b/target/tilegx/translate.c index d63bf5bba3..6c53c5e767 100644 --- a/target/tilegx/translate.c +++ b/target/tilegx/translate.c @@ -2375,7 +2375,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) DisasContext ctx; DisasContext *dc = &ctx; uint64_t pc_start = tb->pc; - uint64_t next_page_start = (pc_start & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE; + uint64_t page_start = pc_start & TARGET_PAGE_MASK; int num_insns = 0; int max_insns = tb_cflags(tb) & CF_COUNT_MASK; @@ -2415,7 +2415,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) } dc->pc += TILEGX_BUNDLE_SIZE_IN_BYTES; if (num_insns >= max_insns - || dc->pc >= next_page_start + || (dc->pc - page_start >= TARGET_PAGE_SIZE) || tcg_op_buf_full()) { /* Ending the TB due to TB size or page boundary. Set PC. */ tcg_gen_movi_tl(cpu_pc, dc->pc);