diff options
| author | Corvin Köhne <corvink@FreeBSD.org> | 2026-04-02 06:36:40 +0000 |
|---|---|---|
| committer | Corvin Köhne <corvink@FreeBSD.org> | 2026-04-30 09:09:49 +0000 |
| commit | 75909086a45da3c5aeaff8152728111cf798c6bc (patch) | |
| tree | 9f4053d921724ff290dbf31571b532e91f2e0cb4 | |
| parent | 713b4ce8ef46d7df4ffe50ab6733bb128dbe3cbd (diff) | |
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
| -rw-r--r-- | usr.sbin/bhyve/tpm_intf_crb.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 have |
