diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-27 14:01:51 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-09-01 18:24:46 +0000 |
| commit | 5319035afacceaa267792ec193eb03fa51c972f7 (patch) | |
| tree | 5b5efe63fb9102b96f902f14f6c1a3631344b99b /packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile | |
| parent | 4e0f283fb97a7b0903adc7bc3ef2f6e07167c73e (diff) | |
The character-device paths held the transaction and lifecycle lock while
uiomove() accessed user memory. A user page fault could therefore delay
suspend or detach, and a copyout failure occurred while the TPM response
was still active.
Copy commands into the bounded stack buffer before taking the lock. For
reads, validate the response header, buffer the complete response while
the lock is held, finish the TPM transaction, and copy it to userspace
after unlocking. Use a non-blocking allocation so memory pressure
cannot turn response buffering into another lifecycle wait.
NetBSD uses the same separation but limits responses to its fixed 1 KiB
buffer. Allocate the TPM-advertised response length to preserve the
existing FreeBSD support for larger streamed responses.
On a ThinkPad T440p with an STMicro TPM 1.2, a PCR read into a 4 KiB
userspace buffer returned the expected 30-byte response. A deliberately
short five-byte read failed cleanly, relinquished locality zero, and the
next PCR read succeeded.
Reviewed by: kevans
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59238
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile')
0 files changed, 0 insertions, 0 deletions
