Message ID | 20210402214217.422585-3-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1728155jai; Fri, 2 Apr 2021 14:46:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsYz4EzQaE1kFPYf84INCz2rQA4ecKq9Xe0y2eCIjbq19H7ria96lyVquWihebjg3wwsoN X-Received: by 2002:a92:d483:: with SMTP id p3mr12460784ilg.28.1617399960539; Fri, 02 Apr 2021 14:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617399960; cv=none; d=google.com; s=arc-20160816; b=M72rCtlBrSN61+8jvUD2vxy3gWSdZTtoilperIz0DWtHfz0/2JProzesAKCeyMDk4q 5cbCVl6g5UKY8wvXrUj0vuS4mU71EbBI0tRrZknS9b6XCm6fJ/7xpkCJPGzgyaa/lRrk OdcnOC1qttHp3YFeksSV8DaTtMqA77R+x6JymrlTE5fA6El+/TbTIrUVPbnYSn0O65KS 9uNiQNj60BJ/CVHzeN6dy9WbSUhbQj9dcFZCXmYpcPBiBJGXZPeJXoDAZwGU6s5133Tx 37+tQWt8qNv+JZGYrejLHnJbbKG7AsiVPlHPoV4n3ThNAFBlK6iaPDpH5r7wwHD8AzOk L15w== 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=fmCgzHtzk5qDGe2eGqNAc4vF9R/bc/UzkhnNYf8s1aw=; b=LhMadn6Z5k+iLTrv0auYYiglFCysx8a51Fp5euV2nGt02dWjbsvNyrImp7uUS1cp20 xOjd2O5o6hy4EZM7aur114DiA3/xlap6MRDQgHKB80K6dyPOvM02sYL2RzI7LoDAs7f1 0goohRi8dDHulekUNO9e7gbqQv4T27ioo7OCkOjAO8nOEKjBkrg5KOMZwKOk7puFXUfS u2xyCxcdyx7f5NgQ0LN6vYXpSquXsQeGmfVrsYMZTYFEdO1clRpcQIrVG5zeNSftViF+ yXdppFlBnlah+qwaTeyb0HUZmcG6IZvtBl7rVVlba+KnfZ4Ng87S9VG7AF5Vvor2RWQX 13Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hLAgx1JV; 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=pass (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 c5si9198180jam.17.2021.04.02.14.46.00 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Apr 2021 14:46:00 -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=pass header.i=@linaro.org header.s=google header.b=hLAgx1JV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44528 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 1lSRc7-0004XY-UZ for patch@linaro.org; Fri, 02 Apr 2021 17:45:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lSRYf-0000D8-Us for qemu-devel@nongnu.org; Fri, 02 Apr 2021 17:42:25 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:37535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lSRYe-0007gG-9v for qemu-devel@nongnu.org; Fri, 02 Apr 2021 17:42:25 -0400 Received: by mail-pl1-x62b.google.com with SMTP id h20so3029064plr.4 for <qemu-devel@nongnu.org>; Fri, 02 Apr 2021 14:42:23 -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=fmCgzHtzk5qDGe2eGqNAc4vF9R/bc/UzkhnNYf8s1aw=; b=hLAgx1JVOhYAcJL9otyWbmwpWTmOyjSybBwxjW5y6nQJNKCYJEFEm4yPcTfRTdd8ch 76w/7QBUQxbJLa/NbOAG4Lzq7UdeJ1yHFOCcAVANZx/IxUXx5p9m00yu5S1+LeqcvfT1 LNzl+goP+LXE8QlqdjLnlbmh7f9lqnjm2HGwgxnB2CggfNamhp/UZ0lfJu+ixkiY3nfN qNWh2C6XfCJS5s4rtotaUIvKfaRpUigVs4xlZWAgxwV+U8TPjpGyh9CbWebluUfeQyTy dqBol5D/NhtnsIJL/BfK4KXYnsCKrexcK8MQAtKBPNOqjTiCGxXVk6EYWJFgm6TvN1fF Mnfg== 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=fmCgzHtzk5qDGe2eGqNAc4vF9R/bc/UzkhnNYf8s1aw=; b=sXhHsj7nKanO9K3dXbixOISU7vD49YtyYCo/gLaB/xILfKysf5OVjdlGfyTDecULoD G8YzJb+ACEOHJW4QbNAJ8/YRW6gHm5OMZIjOLm+F2fT7UdIsZ6zNGvRN8tFnBWw6WGgE LSNB/QJW6DFH71XGra/cuZctf7pOEQeNJxntfKH06LCITgRAnht5/z/iUqiptznOLBBE SKhyElRFZXaSIzVx9lqtNAlA1sT5QcDGpaJ8IIftFADo31z7ySt4WXlIKQtrgBh6ivzB OElIot+G5Y7aTwNFVEjskTVZSI0xvMlNIR2yorhJjK8Xe3pZHiegDSuyc7bV/S2rwLgS RbEg== X-Gm-Message-State: AOAM532rwoVaL33cPrpZRCjq5NnfxCMm2lyfwlOBa4pEaJBE3BFoP5Ws IAiPwTPF/bwGAeSvzNbP2QFYYyYOlIN4ng== X-Received: by 2002:a17:90a:1f49:: with SMTP id y9mr16122803pjy.69.1617399742926; Fri, 02 Apr 2021 14:42:22 -0700 (PDT) Received: from localhost.localdomain (h216-228-167-147.bendor.dedicated.static.tds.net. [216.228.167.147]) by smtp.gmail.com with ESMTPSA id f16sm7923329pfj.220.2021.04.02.14.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 14:42:22 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v3 02/11] target/arm: Check PAGE_WRITE_ORG for MTE writeability Date: Fri, 2 Apr 2021 14:42:08 -0700 Message-Id: <20210402214217.422585-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210402214217.422585-1-richard.henderson@linaro.org> References: <20210402214217.422585-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/arm mte fixes
|
expand
|
diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index 0bbb9ec346..8be17e1b70 100644 --- a/target/arm/mte_helper.c +++ b/target/arm/mte_helper.c @@ -83,7 +83,7 @@ static uint8_t *allocation_tag_mem(CPUARMState *env, int ptr_mmu_idx, uint8_t *tags; uintptr_t index; - if (!(flags & (ptr_access == MMU_DATA_STORE ? PAGE_WRITE : PAGE_READ))) { + if (!(flags & (ptr_access == MMU_DATA_STORE ? PAGE_WRITE_ORG : PAGE_READ))) { /* SIGSEGV */ arm_cpu_tlb_fill(env_cpu(env), ptr, ptr_size, ptr_access, ptr_mmu_idx, false, ra);
We can remove PAGE_WRITE when (internally) marking a page read-only because it contains translated code. This can be triggered by tests/tcg/aarch64/bti-2, after having serviced SIGILL trampolines on the stack. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/arm/mte_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1