Date: Thu, 30 Apr 2026 09:14:38 +0000 From: Corvi=?utf-8?Q?n K=C3=B6h?=ne <corvink@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 75909086a45d - main - bhyve: allow read/write to full CRB buffer Message-ID: <69f31d7e.415c7.3acd1b51@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=75909086a45da3c5aeaff8152728111cf798c6bc commit 75909086a45da3c5aeaff8152728111cf798c6bc Author: Corvin Köhne <corvink@FreeBSD.org> AuthorDate: 2026-04-02 06:36:40 +0000 Commit: Corvin Köhne <corvink@FreeBSD.org> CommitDate: 2026-04-30 09:09:49 +0000 bhyve: allow read/write to full CRB buffer For some reason, we've incorrectly calculated the size of the CRB data buffer register. There's no need to divide the CRB data buffer size by 4. We should allow access to the whole buffer instead. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Pull Request: https://github.com/freebsd/freebsd-src/pull/2169 --- usr.sbin/bhyve/tpm_intf_crb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/tpm_intf_crb.c b/usr.sbin/bhyve/tpm_intf_crb.c index 9b44d1d133b0..d571e89bb5ae 100644 --- a/usr.sbin/bhyve/tpm_intf_crb.c +++ b/usr.sbin/bhyve/tpm_intf_crb.c @@ -414,7 +414,7 @@ tpm_crb_mem_handler(struct vcpu *vcpu __unused, const int dir, 4: case offsetof(struct tpm_crb_regs, data_buffer) ... offsetof(struct tpm_crb_regs, data_buffer) + - TPM_CRB_DATA_BUFFER_SIZE / 4: + sizeof(((struct tpm_crb_regs *)NULL)->data_buffer) - 1: /* * Those fields are used to execute a TPM command. The * crb_thread will access them. For that reason, we havehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f31d7e.415c7.3acd1b51>
