From nobody Sun Dec 29 01:55:51 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1719579180; cv=none; d=zohomail.com; s=zohoarc; b=QoY6GvY+HqDbzEK0wtTtlgHigMVOGUgjhXaY7Oyq6HKKVD7IMP+kmbDXcXx5n5IXuiw5v3WaLzH/o1WL+UzQbkHvAc2BESIiyxEIJmvUuUiSVSdjrkNTI7hf/KY52dQBkAmyJeJgPk6iIKMbUtx+kwc5Ry2Sn3AQEHm1zXbmVus= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719579180; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=t7j8q068F+/YM+zRjDrDncqLYLrDba9m1UpS3/LlFks=; b=fgTgiAFCIfmtsN88o50kr/WTTXVvqKKZjCRPpfs6YgqoNMjhnOesgQ9RVEbKRfWFEv6kFgl9zv153nWC0AFUkF4iS35j74lFmglJ7HsiOFZOktyeq9MyV4rc5PgmgurcmVbgtAXuxPnMfgZvNEtHNBaHYRiDhTB4TUnXIHZTl9o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719579180101312.0696616514507; Fri, 28 Jun 2024 05:53:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNB56-0002lI-Pa; Fri, 28 Jun 2024 08:52:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNB55-0002k7-6p for qemu-devel@nongnu.org; Fri, 28 Jun 2024 08:51:59 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNB51-0007iI-D5 for qemu-devel@nongnu.org; Fri, 28 Jun 2024 08:51:58 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a729d9d7086so302960166b.0 for ; Fri, 28 Jun 2024 05:51:54 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aaf18c83sm77927866b.4.2024.06.28.05.51.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 05:51:53 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8697C5FA3D; Fri, 28 Jun 2024 13:43:00 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719579114; x=1720183914; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t7j8q068F+/YM+zRjDrDncqLYLrDba9m1UpS3/LlFks=; b=NAzBslSEdyIdKgahTOdpSBSsNjh3TS354Dif6k43+W2aTTK8NPpkZqHNztSdfLFEsU rDwcXx1mV79ktZ5Bju2Z9S8mdOZoV9Az8YJSTlDyTzNTFE2JFGJoUF4GMFHnwaG5k+Dt 4t6pcFkWwFZK5O/8Vb5i5dbnA1UC1EY8S98UmQaHyLZTXXIWBO9qcraNoPo70ReqDp9P FG8wU8YTGkOWb6VaRPDu62HxV9ixdwL5L54z9mDghwGVHRySs5lgjuQE+2ZenupTfWof XzWxpOdTjCt4b5LSW6zIv9dcAuc+vxk77ONF13S8vldhTsaGLdJSv04DcTBeDnceRsHS 08tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719579114; x=1720183914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t7j8q068F+/YM+zRjDrDncqLYLrDba9m1UpS3/LlFks=; b=V2J2RHBrCxDGQxs+YUSC5+fls022OUbKDxnwdB51TJJ9/a2qNnqdXh2livyCVyQWf+ eqtjV/p02VqmED6N/p1GSBg+WZhXh9kl6X1JHlM+yfeqU+qE6yfw+r+FfLncvOsbtxbd /DjwVbNgiNj93NYAUpRfedemwby+WEGJUD6nnfFIeA4I0oeRzk/LlzgXBfOF0AqoKuc/ 1Vkgeb8X97dVM0f2exNyM/WjTIkoqdkF2uXAfMBvZGQ5WEoFEWwgTbpOhLfiuEO+2vZ8 RNvwfLECpe8YVZNSnGhP9PvbzGRVWVT/VVxSTVUpurTWx1hVzlSFWde8rnQ7PxdzoCMu vMTQ== X-Gm-Message-State: AOJu0YwZCKLKUq6S7i8g/rz5BRlLiH2fgwngWJjMFa/cGim/YBJNm24A 0LY+v6oTIAf8kbJwWxD8+D3wt/CGdcsNgb1Ni5n0W3ay3C/39abrirBxNi/PhtM= X-Google-Smtp-Source: AGHT+IFGC+e7plvD10robakGGvwWeiAffjysjrX3dtoYdRs7FI+vwojxi0N6vXogyJSbTS9mIXRY9A== X-Received: by 2002:a17:907:2688:b0:a6f:1d4e:734f with SMTP id a640c23a62f3a-a72aef685e2mr147980166b.36.1719579113643; Fri, 28 Jun 2024 05:51:53 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Beraldo Leal , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Peter Xu , Mads Ynddal , Mahmoud Mandour , Pierrick Bouvier , Laurent Vivier , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Stefan Hajnoczi , Peter Maydell , Richard Henderson , Thomas Huth , Gustavo Romero Subject: [PATCH 16/23] target/arm: Fix exception case in allocation_tag_mem_probe Date: Fri, 28 Jun 2024 13:42:51 +0100 Message-Id: <20240628124258.832466-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240628124258.832466-1-alex.bennee@linaro.org> References: <20240628124258.832466-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719579180586100002 From: Gustavo Romero If page in 'ptr_access' is inaccessible and probe is 'true' allocation_tag_mem_probe should not throw an exception, but currently it does, so fix it. Signed-off-by: Gustavo Romero Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-Id: <20240628050850.536447-5-gustavo.romero@linaro.org> --- target/arm/tcg/mte_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index 037ac6dd60..a50d576294 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -96,6 +96,9 @@ static uint8_t *allocation_tag_mem_probe(CPUARMState *env= , int ptr_mmu_idx, assert(!(probe && ra)); =20 if (!(flags & (ptr_access =3D=3D MMU_DATA_STORE ? PAGE_WRITE_ORG : PAG= E_READ))) { + if (probe) { + return NULL; + } cpu_loop_exit_sigsegv(env_cpu(env), ptr, ptr_access, !(flags & PAGE_VALID), ra); } --=20 2.39.2