[adding Tadeusz Struk to CC list] On 9/13/18 4:31 PM, Martin Galvan wrote: > Hi James, thanks for your answer. > > El jue., 13 sept. 2018 a las 11:22, James Bottomley > (<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>) escribió: >> >> On Thu, 2018-09-13 at 10:14 -0300, Martin Galvan wrote: >> Exact buffer size hasn't been thought to be an issue since you know >> that any response will fit into MAX_RESPONSE_SIZE which the current >> implementation defines to be 4096. > > Interesting, I didn't know about this max. I guess you're referring to > enum tpm_const's TPM_BUFSIZE constant, since I can't find this max in > the spec. In any case, what would be the effect of removing this > limitation and allowing a user to read the response in chunks rather > than having to allocate 4k every time? I don't think things would > break, though maybe I'm missing something. > There was an attempt to add partial reads support some time ago [0], but it was nacked due being an ABI break IIRC. [0]: https://lkml.org/lkml/2018/7/19/618 Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat