Avoiding EBUSY on TPM writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We're running into a situation where concurrent TPM accesses can trigger 
EBUSY on write due to there either being a queued command or a response 
not yet having been read. Obviously one approach would be to retry, but 
that involves us either spinning or waiting for an arbitrary amount of 
time between attempts, which doesn't seem ideal. There's a poll 
interface that tells us whether there's a response to read but (a) that 
doesn't help in the enqueued command situation and (b) this would still 
be racy - we could be notified that the response has been read, be 
preempted, and have another process perform a write before we get the 
opportunity to.

What's the right way to fix this? One approach would simply be to 
replace the EBUSY with an interruptible sleep and wake the process when 
the TPM is available, but that feels like it's technically an ABI break.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux