From nobody Mon Feb 19 16:45:28 2024 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 4TdpLc6Sptz5C9JH; Mon, 19 Feb 2024 16:45:28 +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 4TdpLc4BBlz4cG5; Mon, 19 Feb 2024 16:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708361128; 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=dw6t8aetYbIkVzF6AjeuksO/kJI1ZGhuIDh9jWRmNgQ=; b=YbUWoEGFBJkYfHCDnsPpRRzWr9Z7YqVc6GmcoMzoZIpAZMZ0utmRv+gOftIZ+N7IkqNSf3 r1vIOWQxLWdYk2HOQhld0bo60IzbHXx2bRpgcSe55TdidgOGfNHfsWuaS3afaqEClcP+ns BJ5GgENoQuE/uHmQCkM+cz/CV0IgDH9Mx/mhD2yZORw6JeW1wtynP4vOdNo06MLwMNFFTc YfZjGT6baXc1BxPxhqGVD9cshuVLHlXhKM8bkHlozwuX0nExk0VfQJWUhNv9P4jCZTZhu/ N/cQik+qcS8mIepLKhxPhpSKHsgkABVDkutj+SiWe1WHjE70R3j+B6jXs7zUXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708361128; 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=dw6t8aetYbIkVzF6AjeuksO/kJI1ZGhuIDh9jWRmNgQ=; b=wi4tlv1LNkjokL9K8GoPtyMxEcVX7E1OSUiFj5c/P2eZyeB8zvznRvvzl+A2X+fgyEeccK JpAheC9qUyYPfDTY2vTx3kMf7jOcVqko+snSH0SN2XtlTnUG6nPNkECzp3JfYMDLBjlRFY UVfXoN7j9AoSqYGQlT7t3jmbu5iKakIPA6358qkhafBLLTI4O/tIMoGFv1NQLcc5LSwYqL +o9DYEL1OEZBtpli2LDD/kOwDwOP8rSfm95bY9omEk6K3FPGcYGuxgX2D8xuA616TokHEX oesAUQ7r9WQmdc2GlXKp066XKGkZqQM0dcnlLUjFCkmGXjps56a+ANqXfVER5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708361128; a=rsa-sha256; cv=none; b=KP5Enejhj2IAqoemvE0NR3K9IQfTlMLZlUqQO8jO4lKJAYRiKv806sbtjrRnQHb6teS686 PmF4cYkYSyKxfaCFV6r3JiWoBq3GivRX83LLjrxduo385219O+DYMw1NNIQXHsChy/CUnH hXvLZuV2NNeEc5xMYOxb/BNKpw8MhuZIuK7IuT9Zo6LHtJ2PCQNPRj9DGpgYAo5jSEemJL bF6cdXMH8cViQBZiNu/oCIqQsXDQEQTJNJ3QkUo7nUkcSZ5XwYNsvvW/R71ytrMdAqsBUt DXUTxrE1qwnqJELqdvBY80h/aMLgXsReeGbpCSthfqiL+RGwaIuVqpkTRGH34g== 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 4TdpLc3Hjyzj6h; Mon, 19 Feb 2024 16:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41JGjS3w096480; Mon, 19 Feb 2024 16:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41JGjSB3096477; Mon, 19 Feb 2024 16:45:28 GMT (envelope-from git) Date: Mon, 19 Feb 2024 16:45:28 GMT Message-Id: <202402191645.41JGjSB3096477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 88227ddc7536 - stable/14 - arm64: Use pmap_early_vtophys in pmap_bootstrap_san 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 88227ddc7536db86a8dd8896061c5e2e8da84cb3 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=88227ddc7536db86a8dd8896061c5e2e8da84cb3 commit 88227ddc7536db86a8dd8896061c5e2e8da84cb3 Author: Andrew Turner AuthorDate: 2023-11-13 16:34:56 +0000 Commit: Andrew Turner CommitDate: 2024-02-19 13:14:59 +0000 arm64: Use pmap_early_vtophys in pmap_bootstrap_san Use pmap_early_vtophys to find the physical address of the kernel base rather than using the calculated offset as it will be removed in a latter commit. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42566 (cherry picked from commit 5fae53589eacbf65855419922c881b3a25a68e03) --- sys/arm64/arm64/machdep.c | 2 +- sys/arm64/arm64/pmap.c | 5 ++++- sys/arm64/include/pmap.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index bb7689c19101..7aa20357acf4 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -973,7 +973,7 @@ initarm(struct arm64_bootparams *abp) * segments also get excluded from phys_avail. */ #if defined(KASAN) - pmap_bootstrap_san(KERNBASE - abp->kern_delta); + pmap_bootstrap_san(); #endif physmem_init_kernel_globals(); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 9849a58dd070..d9d224f44fb6 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1365,11 +1365,14 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) * - Map that entire range using L2 superpages. */ void -pmap_bootstrap_san(vm_paddr_t kernstart) +pmap_bootstrap_san(void) { vm_offset_t va; + vm_paddr_t kernstart; int i, shadow_npages, nkasan_l2; + kernstart = pmap_early_vtophys(KERNBASE); + /* * Rebuild physmap one more time, we may have excluded more regions from * allocation since pmap_bootstrap(). diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index bb226df2099c..e7d23dfb2844 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -192,7 +192,7 @@ pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) #if defined(KASAN) || defined(KMSAN) struct arm64_bootparams; -void pmap_bootstrap_san(vm_paddr_t); +void pmap_bootstrap_san(void); void pmap_san_enter(vm_offset_t); #endif