From nobody Mon Apr 24 11:34:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q4jhL1nc5z46hxl; Mon, 24 Apr 2023 11:34:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q4jhL0SCCz4TQX; Mon, 24 Apr 2023 11:34:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682336050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zulKl/Au8VApxEXYVkIML7AKMpPEqlStPB+oyl0HW/Q=; b=DT3QvcfKUd1ivMM8Ax/n2j/oxkNFw7kpcwXYX8XfqQHJjv5tu9+tBczBLebDvh3jDS4kJA osLYgGNebG6jiyodtUeH6aniqEACDzCBqn/nUYZpivx2qqjmaG+YbvUTeO49dPqkbtGvmo WfBKlyJZ5FD2xWcZhvTLIKc9Ht7iurzXLn94ONZpkA+5woTyFPUKxw7AZZhxKFWeUzrcFS jHPm8GVwhTAPcu9CxtUOOetiH0/Ny//k3MxxmjiNGE5mbCaeJKwFXLDGUJ7PTSP5yGtqSU jal4NCNLHFpjBqPewhwx7G3TYdmahJVtoh+4dgMtRQHq/jD2/KhKCuCRzS7phQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682336050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zulKl/Au8VApxEXYVkIML7AKMpPEqlStPB+oyl0HW/Q=; b=UKiSMwNX6rGjEPfO6EjpWxtjx04Fb0T2iDhqjsm+Seneu6NwLjKPuOrC2+rLEpRxnF6Lf3 2XklSTLTVqV1PkQ/VngfVgPmwoaN5zmHvaN7WU1IomN+tIbH2n1+2Hulo97p5XA1jh8VyA OyIU7Nb22PDXTQruwJvzGOKN9QbF60ezVdbP59SVD44zVlcG+DXy4LipEaIdTHL+Qt6fhN aVXD9HgLmnKHer5BrpahKpHu2jOrNGLFI7+tTva/263xbRNvd7BOmYPlRlogr5zuDF/0bL /Z0MYdCINqju0CuMuLqSYXXxoQ1PkA0o/8Hga3Rz8Q995kJdbSW8jxaUCXAt4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682336050; a=rsa-sha256; cv=none; b=UYznMC0HBGh36su1aBnFauwQwOX7F3T+7bjqn/6ZDHllwp+PdTGyNfUqdwvQB56hPU+dit C763ZUS9IAbwcND7SQApniz9qQZxLycoiF8wFGUr3WZ5alyQxQs4WAf6pRgHBHj/OwCiY6 k064qft/yLL+HG4YwC4rJxlJ99erWLODisY7si75X1/id4rnIi7NYYFjmTDZpB43xsfvhy RiRLOhVe8x61sexWCnqKqMr3iToG5Lq1ETFCF6Q4VQIcw2lMkZkb/wPXrPhXMeVZj6Z3sG 5QFAVnuha/LrK3LHJvkGZVARMxHMv6ZyY/TT8Ftr21TVrVYf8X8jnybtOPlTGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q4jhK6NRqzP6N; Mon, 24 Apr 2023 11:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33OBY9ef071085; Mon, 24 Apr 2023 11:34:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33OBY9lR071084; Mon, 24 Apr 2023 11:34:09 GMT (envelope-from git) Date: Mon, 24 Apr 2023 11:34:09 GMT Message-Id: <202304241134.33OBY9lR071084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 1bf4991bbc2c - main - Remove unneeded masks from the arm64 KASAN shadow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bf4991bbc2c2fb6c33ce1303eff9c5833538034 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=1bf4991bbc2c2fb6c33ce1303eff9c5833538034 commit 1bf4991bbc2c2fb6c33ce1303eff9c5833538034 Author: Andrew Turner AuthorDate: 2023-04-21 15:28:36 +0000 Commit: Andrew Turner CommitDate: 2023-04-24 11:33:50 +0000 Remove unneeded masks from the arm64 KASAN shadow When mapping the arm64 KASAN shadow map we use Ln_TABLE_MASK to align physical addresses, however these should already be aligned either by rounding to a greater alignment, or the VM subsystem is giving us a correctly aligned page. Remove these extra alignment masks. Reviewed by: kevans Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D39752 --- sys/arm64/arm64/pmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index fc4650c8d449..6bea9cde55b5 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1241,8 +1241,7 @@ pmap_bootstrap_allocate_kasan_l2(vm_paddr_t start_pa, vm_paddr_t end_pa, continue; } - pmap_store(l2, (pa & ~Ln_TABLE_MASK) | PMAP_SAN_PTE_BITS | - L2_BLOCK); + pmap_store(l2, pa | PMAP_SAN_PTE_BITS | L2_BLOCK); } /* @@ -7800,8 +7799,7 @@ pmap_san_enter(vm_offset_t va) MPASS(l1 != NULL); if ((pmap_load(l1) & ATTR_DESCR_VALID) == 0) { m = pmap_san_enter_alloc_l3(); - pmap_store(l1, (VM_PAGE_TO_PHYS(m) & ~Ln_TABLE_MASK) | - L1_TABLE); + pmap_store(l1, VM_PAGE_TO_PHYS(m) | L1_TABLE); } l2 = pmap_l1_to_l2(l1, va); if ((pmap_load(l2) & ATTR_DESCR_VALID) == 0) {