Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-28 Thread Jarkko Sakkinen
On Wed, May 27, 2020 at 09:40:25PM -0700, Tadeusz Struk wrote: > On 5/27/20 5:30 PM, Jarkko Sakkinen wrote: > >> This won't help if the message is read by an async tcti. If the problem > >> lies > >> in the chip get locality code, perhaps this could help to debug the > >> root-cause > >> instead

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-28 Thread Jarkko Sakkinen
On Thu, May 28, 2020 at 12:59:59AM +, mario.limoncie...@dell.com wrote: > > > > [EXTERNAL EMAIL] > > > > What is this? > > Something my employer's mail system automatically tags in external email. > > My mistakes in forgetting to remove it on the response. NP, just asking :-) > > > > On

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-27 Thread Tadeusz Struk
On 5/27/20 5:30 PM, Jarkko Sakkinen wrote: >> This won't help if the message is read by an async tcti. If the problem lies >> in the chip get locality code, perhaps this could help to debug the >> root-cause >> instead of masking it out in the upper layer code: > What is TCTI and async TCTI? Not

RE: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-27 Thread Mario.Limonciello
> > > [EXTERNAL EMAIL] > > What is this? Something my employer's mail system automatically tags in external email. My mistakes in forgetting to remove it on the response. > > > > On Tue, 2020-05-26 at 12:38 -0700, James Bottomley wrote: > > > > On Tue, 2020-05-26 at 19:23 +,

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-27 Thread Jarkko Sakkinen
t; > Cc: a...@arndb.de; gre...@linuxfoundation.org; > > linux-integr...@vger.kernel.org; > > linux-kernel@vger.kernel.org; jeff...@rajagiritech.edu.in; a...@guzman.io > > Subject: Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING > > mode" > > > >

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-27 Thread Jarkko Sakkinen
On Tue, May 26, 2020 at 12:39:37PM -0700, Tadeusz Struk wrote: > On 5/26/20 12:14 PM, James Bottomley wrote: > > + /* atomic tpm command send and result receive. We only hold the ops > > +* lock during this period so that the tpm can be unregistered even if > > +* the char dev is held

RE: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-27 Thread Mario.Limonciello
vger.kernel.org; jeff...@rajagiritech.edu.in; a...@guzman.io > Subject: Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING > mode" > > > [EXTERNAL EMAIL] > > On Tue, 2020-05-26 at 12:38 -0700, James Bottomley wrote: > > On Tue, 2020-05-26 at 19:23 +00

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-27 Thread Jarkko Sakkinen
On Tue, 2020-05-26 at 12:38 -0700, James Bottomley wrote: > On Tue, 2020-05-26 at 19:23 +, mario.limoncie...@dell.com wrote: > > > On Tue, 2020-05-26 at 13:32 -0500, Mario Limonciello wrote: > > > > This reverts commit d23d12484307b40eea549b8a858f5fffad913897. > > > > > > > > This commit has

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread James Bottomley
On Tue, 2020-05-26 at 16:31 -0700, Alex Guzman wrote: > On Tue, May 26, 2020 at 4:06 PM James Bottomley > wrote: > > > > On Tue, 2020-05-26 at 15:19 -0700, Alex Guzman wrote: > > [...] > > > When using your patch, I get a hang when trying to use > > > tpm2_getcap, and dmesg shows some info. > >

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread Alex Guzman
On Tue, May 26, 2020 at 4:06 PM James Bottomley wrote: > > On Tue, 2020-05-26 at 15:19 -0700, Alex Guzman wrote: > [...] > > When using your patch, I get a hang when trying to use tpm2_getcap, > > and dmesg shows some info. > > Are you sure it's all applied? This > > > [ 570.913803]

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread James Bottomley
On Tue, 2020-05-26 at 15:19 -0700, Alex Guzman wrote: [...] > When using your patch, I get a hang when trying to use tpm2_getcap, > and dmesg shows some info. Are you sure it's all applied? This > [ 570.913803] tpm_tcg_write_bytes+0x2f/0x40 > [ 570.913805] release_locality+0x49/0x220 > [

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread Alex Guzman
On Tue, 2020-05-26 at 14:33 -0700, Tadeusz Struk wrote: > On 5/26/20 1:00 PM, James Bottomley wrote: > > I don't think there is a root cause other than a TIS TPM is getting > > annoyed by us cycling localities too rapidly because we don't do an > > actual TPM operation between request and

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread Alex Guzman
On Tue, 2020-05-26 at 12:38 -0700, James Bottomley wrote: > On Tue, 2020-05-26 at 19:23 +, mario.limoncie...@dell.com wrote: > > > On Tue, 2020-05-26 at 13:32 -0500, Mario Limonciello wrote: > > > > This reverts commit d23d12484307b40eea549b8a858f5fffad913897. > > > > > > > > This commit has

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread Tadeusz Struk
On 5/26/20 1:00 PM, James Bottomley wrote: > I don't think there is a root cause other than a TIS TPM is getting > annoyed by us cycling localities too rapidly because we don't do an > actual TPM operation between request and relinquish. Since the first > request/relinquish seems unnecessary for

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread James Bottomley
On Tue, 2020-05-26 at 12:39 -0700, Tadeusz Struk wrote: > On 5/26/20 12:14 PM, James Bottomley wrote: > > + /* atomic tpm command send and result receive. We only > > hold the ops > > +* lock during this period so that the tpm can be > > unregistered even if > > +* the char dev is held

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread Tadeusz Struk
On 5/26/20 12:14 PM, James Bottomley wrote: > + /* atomic tpm command send and result receive. We only hold the ops > + * lock during this period so that the tpm can be unregistered even if > + * the char dev is held open. > + */ > + if (tpm_try_get_ops(priv->chip)) { > +

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread James Bottomley
On Tue, 2020-05-26 at 19:23 +, mario.limoncie...@dell.com wrote: > > On Tue, 2020-05-26 at 13:32 -0500, Mario Limonciello wrote: > > > This reverts commit d23d12484307b40eea549b8a858f5fffad913897. > > > > > > This commit has caused regressions for the XPS 9560 containing > > > a Nuvoton TPM.

RE: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread Mario.Limonciello
> On Tue, 2020-05-26 at 13:32 -0500, Mario Limonciello wrote: > > This reverts commit d23d12484307b40eea549b8a858f5fffad913897. > > > > This commit has caused regressions for the XPS 9560 containing > > a Nuvoton TPM. > > Presumably this is using the tis driver? Correct. > > > As mentioned by

Re: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"

2020-05-26 Thread James Bottomley
On Tue, 2020-05-26 at 13:32 -0500, Mario Limonciello wrote: > This reverts commit d23d12484307b40eea549b8a858f5fffad913897. > > This commit has caused regressions for the XPS 9560 containing > a Nuvoton TPM. Presumably this is using the tis driver? > As mentioned by the reporter all TPM2