From nobody Wed Aug 28 19:12:46 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 4WvDZR1fpmz5MZdh; Wed, 28 Aug 2024 19:12:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WvDZQ6dN9z4pwd; Wed, 28 Aug 2024 19:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724872367; 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=5PG3mkA45TK8AF9Teu6YsZv/7yFMRu/CqN8RJ2ZDRBM=; b=Wl7290APk5yWwdgKTVPuJTi8sAyQzbxZlk1+FAFji8uiJy6ernp4b3WYsO76dvj7Fkld2Y KTWuHbpe14xKp4X+KcyEUM2vF3mnRXdHdvDd+RARUuf1Dv8oREMx1vIxuFQe7ZEmbIsY7U U6cLwsUha2NzBqibfkhGPgncX9o1Lj/eJk0VhUER56DK7zvf1Vw/kvBjIGutqrlq05reuj LvuOMGKWVhC4PzUumgPGognjSCIh1y9Lotd1d5/80jRGVCBYe4Ok0cvDxISi5QiM00WrEr SQmWlmxJbkIGGCMXRvCpQg1RTHxGw9WpoVx+F/2w+bipZ7flb1ka92E1UfNXeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724872367; a=rsa-sha256; cv=none; b=J1feLC+1kAoiZveElgaxQzyd44pTU/imxZM0mirXz4tp7PQwAr3XWllGhtv7vHtHVCPBth ddXBgrtbmYcoIyy9dzoOtO5gmN6OLHodiq5e6dRBATGmBPgf9ZPxj8zk1ndK5eU55MM2q3 HmKrvbKajJlUoBsNBYNVjpkblqiUvhDBAb7HCHFm2dHoFBxDRN17sF/r4eVSs8dh6Mmjga WAvfNtd27v6iFrNeseaM57a3SsOforF/8TWkDXPtdElSptuNC0ON1nDSgm+C2I4T+Glcdz XzIxuw0uwwnnHYD8vZNOwMrsKHPLcFEXPYyvyOp7T1zGRC0+5P5ukXXhtGZ6tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724872367; 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=5PG3mkA45TK8AF9Teu6YsZv/7yFMRu/CqN8RJ2ZDRBM=; b=A5yHBdVjqoCTYqvdaIrAlo0XlLL/oSU763B+mQAeGXkj0nnZalVu6IoXfGz9rD7emMZTcX +3y0/uN+drTrr4QS+lGNH24c8xyuwbUf2BNeEfgVEtZjOUoP0f7btr1a5zRHMb270ZKpcp RexBVPayplz5bNQWSWpf6rCXhh/XpUQ/MRPvI0Kl4FGCFGzbkyuKHW4IjJ+9wYH/dbJLLg vnpXmdmMfJw++dl/30CWSlB8deJ8IxcGVGl58QIYSfLkwv+Hj3gdczAL0j9DQJp13ej/0r zbR8p8vCyWNEKWsXw6UZrRXt+w5tMOKNXrj71Uz3ZaEf6eg4IKoTMQQm3ltt9Q== 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 4WvDZQ6CgRzm1f; Wed, 28 Aug 2024 19:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47SJCku0059186; Wed, 28 Aug 2024 19:12:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47SJCkSK059183; Wed, 28 Aug 2024 19:12:46 GMT (envelope-from git) Date: Wed, 28 Aug 2024 19:12:46 GMT Message-Id: <202408281912.47SJCkSK059183@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 72ea8f41e19d - main - vmm: Let devmem devices reference the VM credential 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/main X-Git-Reftype: branch X-Git-Commit: 72ea8f41e19d3e028dd4ab3f9102240e215dbc6d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=72ea8f41e19d3e028dd4ab3f9102240e215dbc6d commit 72ea8f41e19d3e028dd4ab3f9102240e215dbc6d Author: Mark Johnston AuthorDate: 2024-08-28 18:57:38 +0000 Commit: Mark Johnston CommitDate: 2024-08-28 19:12:16 +0000 vmm: Let devmem devices reference the VM credential Otherwise they are globally visible (in jails with allow.vmm set), instead of being restricted to the jail to which the VM belongs. Reviewed by: corvink, jhb Differential Revision: https://reviews.freebsd.org/D46448 --- sys/dev/vmm/vmm_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index 53b4dc8cda91..fa9357b3b566 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -997,7 +997,7 @@ devmem_create_cdev(struct vmmdev_softc *sc, int segid, char *devname) vmname = vm_name(sc->vm); - error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &devmemsw, NULL, + error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &devmemsw, sc->ucred, UID_ROOT, GID_WHEEL, 0600, "vmm.io/%s.%s", vmname, devname); if (error) return (error);