From nobody Thu May 11 15:04:26 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 4QHFY71sgBz4BLSB; Thu, 11 May 2023 15:04:27 +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 4QHFY71LBBz4YBG; Thu, 11 May 2023 15:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683817467; 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=L4o4/83hSALBLvaG1wIw8H5M2OPxZ4M77U7T9Vg/wx4=; b=iZOFC1/QedsOMjN/H8Hdnd8gksjFo4ZLhdp58LlFQeexNoci2OCR6To6PXHsUPGQBsw8sD NaYWr0oD/k8v5+OkgmjgVr6i7mjeNwfaJZgBvMUvaKA1cfhBV/C0UYKEQk/dZua1TmXos6 PJjRwe/GSTn2bfCj5DfrRNUrBcvB2OWHJp6BHxhD/lunK0DAYO3eaRpWK+IBBwvNfGVANI VlqPjSUHYroSTVrpgVClBNc1hGG0cVlZGqVmZzmxoRoXndhb+NK69pt3+4Fyf7GtMS59UE uYxTx8vVe0HTOv3qiLVZkS89zpNilOB0kbjnMgfzJCDgjCnLjUlFFktfKdBBBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683817467; 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=L4o4/83hSALBLvaG1wIw8H5M2OPxZ4M77U7T9Vg/wx4=; b=je4SNApD4ORgVWP5cEe51cbLxjQ5izjkIcInzOV8LFRSk6Ks9GStMk5F2aqHdXdi17FRR1 gEQMBnCqi2OFVvzGtMF4iHzEfCzyy6JyTuec5WwdR8HlBK7kgM1BF8cjH+4O0Cb+CJ1KWX p+IPGuqlWkPLOc+Cm1EhC7eF5A/E2SJ9EAMmqLnMlz2kSPHsV4ct5SCzic+kyAw+lKOSUg WE9ejoH3llo9fLCijcc+52XGkX8sJZXvOaZRYT0qs79a0jz9OCP/N7dCujxPacGWKSrTbC AjOltYOad38PG8912AcMYLDkkv6Ifj5rI4LtvQRWnoBVwH9B3VtwD4HTRIAfUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683817467; a=rsa-sha256; cv=none; b=EzD3TDp1xo+lcpQfFs+eunDWOHOQls6g3Se+UfCs7EOPyf4Wsm1P/8I/bG7sgT6QNMl6k8 B73bhYvGYUMpADkue9nm3Kg7FXNXcVKPMCYN9Ovis35sMUwHiKSTF3xbsVaFQNe7hQwkny 0PdSXYX4+z+wYrqxkg3/hLWztZdv4AnL7K7ZOAnsOrtSGJ5zqvjO8VMHPJpDEjuHlKkgyW OujnUCq4ZMy/TjOBOhcHdbEVHuMN2IPG+MNFa+Emi3zGWv5DSPXo6QiiN6VRs9DqefTWGM xyZr1/Ox5N4tsYc/7fYrDrVh4wLU+N9hCSb5/c78dYtqDEvOqUrxhc3EBGDrpg== 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 4QHFY70NxyzxTD; Thu, 11 May 2023 15:04:27 +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 34BF4QA2025871; Thu, 11 May 2023 15:04:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34BF4QNg025870; Thu, 11 May 2023 15:04:26 GMT (envelope-from git) Date: Thu, 11 May 2023 15:04:26 GMT Message-Id: <202305111504.34BF4QNg025870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 272525b73b65 - stable/13 - vmm: Fix casts around kmem_malloc/free() calls 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 272525b73b6548d84b3cea84579c6dd9a1e0a961 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=272525b73b6548d84b3cea84579c6dd9a1e0a961 commit 272525b73b6548d84b3cea84579c6dd9a1e0a961 Author: Mark Johnston AuthorDate: 2023-05-11 15:00:53 +0000 Commit: Mark Johnston CommitDate: 2023-05-11 15:00:53 +0000 vmm: Fix casts around kmem_malloc/free() calls This is a direct commit to stable/13. Reported by: Jenkins --- sys/amd64/vmm/amd/svm.c | 4 ++-- sys/amd64/vmm/intel/vmx.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index d295401a9043..bd0c4db20b3d 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -168,7 +168,7 @@ svm_modcleanup(void) smp_rendezvous(NULL, svm_disable, NULL, NULL); if (hsave != NULL) - kmem_free(hsave, (mp_maxid + 1) * PAGE_SIZE); + kmem_free((vm_offset_t)hsave, (mp_maxid + 1) * PAGE_SIZE); return (0); } @@ -272,7 +272,7 @@ svm_modinit(int ipinum) svm_npt_init(ipinum); /* Enable SVM on all CPUs */ - hsave = kmem_malloc((mp_maxid + 1) * PAGE_SIZE, M_WAITOK | M_ZERO); + hsave = (void *)kmem_malloc((mp_maxid + 1) * PAGE_SIZE, M_WAITOK | M_ZERO); smp_rendezvous(NULL, svm_enable, NULL, NULL); return (0); diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 8b8f8fe6cb25..fe8f9b40a7d0 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -621,7 +621,7 @@ vmx_modcleanup(void) smp_rendezvous(NULL, vmx_disable, NULL, NULL); if (vmxon_region != NULL) - kmem_free(vmxon_region, (mp_maxid + 1) * PAGE_SIZE); + kmem_free((vm_offset_t)vmxon_region, (mp_maxid + 1) * PAGE_SIZE); return (0); } @@ -957,7 +957,7 @@ vmx_modinit(int ipinum) vmx_msr_init(); /* enable VMX operation */ - vmxon_region = kmem_malloc((mp_maxid + 1) * PAGE_SIZE, + vmxon_region = (void *)kmem_malloc((mp_maxid + 1) * PAGE_SIZE, M_WAITOK | M_ZERO); smp_rendezvous(NULL, vmx_enable, NULL, NULL);