git: 99229e58da67 - stable/15 - bhyve: allow read/write to full CRB buffer
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 Oct 2026 01:18:55 UTC
The branch stable/15 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=99229e58da67a6fa37f2d89fead6b2b5aed0bba7
commit 99229e58da67a6fa37f2d89fead6b2b5aed0bba7
Author: Corvin Köhne <corvink@FreeBSD.org>
AuthorDate: 2026-04-02 06:36:40 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-10-11 01:18:43 +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
Sponsored by: Beckhoff Automation GmbH & Co. KG
Pull Request: https://github.com/freebsd/freebsd-src/pull/2169
(cherry picked from commit 75909086a45da3c5aeaff8152728111cf798c6bc)
---
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 bf5602a87659..7058b47733f3 100644
--- a/usr.sbin/bhyve/tpm_intf_crb.c
+++ b/usr.sbin/bhyve/tpm_intf_crb.c
@@ -421,7 +421,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 have