Public bug reported:

[Impact]
It has been reported that some TIS based TPMs are giving unexpected errors when 
using the O_NONBLOCK path of the TPM device. The problem is that some TPMs 
don't like it when you get and then relinquish a locality (as the 
tpm_try_get_ops()/tpm_put_ops() pair does) without sending a command. This 
currently happens all the time in the O_NONBLOCK write path. This affects 
Nuvoton TPMs and was a regression caused by the patch d23d12484307 ("tpm: fix 
invalid locking in NONBLOCKING mode").
Link: https://patchwork.kernel.org/patch/11576453/

[Fix]
Fix this by moving the tpm_try_get_ops()
further down the code to after the O_NONBLOCK determination is made.
This is safe because the priv->buffer_mutex still protects the priv
state being modified.

[Regression Risk]
Low. This patch only for fix the patch d23d12484307 ("tpm: fix invalid locking 
in NONBLOCKING mode").

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: Incomplete

** Affects: linux-oem-5.6 (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux-oem-osp1 (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

- Link: https://patchwork.kernel.org/patch/11576453/
  
  [Impact]
-    It has been reported that some TIS based TPMs are giving unexpected errors 
when using the O_NONBLOCK path of the TPM device. The problem is that some TPMs 
don't like it when you get and then relinquish a locality (as the 
tpm_try_get_ops()/tpm_put_ops() pair does) without sending a command. This 
currently happens all the time in the O_NONBLOCK write path. This affects 
Nuvoton TPMs and was a regression caused by the patch d23d12484307 ("tpm: fix 
invalid locking in NONBLOCKING mode"). 
+    It has been reported that some TIS based TPMs are giving unexpected errors 
when using the O_NONBLOCK path of the TPM device. The problem is that some TPMs 
don't like it when you get and then relinquish a locality (as the 
tpm_try_get_ops()/tpm_put_ops() pair does) without sending a command. This 
currently happens all the time in the O_NONBLOCK write path. This affects 
Nuvoton TPMs and was a regression caused by the patch d23d12484307 ("tpm: fix 
invalid locking in NONBLOCKING mode").
  Link: https://patchwork.kernel.org/patch/11576453/
  
  [Fix]
  Fix this by moving the tpm_try_get_ops()
  further down the code to after the O_NONBLOCK determination is made.
  This is safe because the priv->buffer_mutex still protects the priv
  state being modified.
  
  [Regression Risk]
  Low. This patch only for fix the patch d23d12484307 ("tpm: fix invalid 
locking in NONBLOCKING mode").

** Description changed:

- 
  [Impact]
-    It has been reported that some TIS based TPMs are giving unexpected errors 
when using the O_NONBLOCK path of the TPM device. The problem is that some TPMs 
don't like it when you get and then relinquish a locality (as the 
tpm_try_get_ops()/tpm_put_ops() pair does) without sending a command. This 
currently happens all the time in the O_NONBLOCK write path. This affects 
Nuvoton TPMs and was a regression caused by the patch d23d12484307 ("tpm: fix 
invalid locking in NONBLOCKING mode").
+ It has been reported that some TIS based TPMs are giving unexpected errors 
when using the O_NONBLOCK path of the TPM device. The problem is that some TPMs 
don't like it when you get and then relinquish a locality (as the 
tpm_try_get_ops()/tpm_put_ops() pair does) without sending a command. This 
currently happens all the time in the O_NONBLOCK write path. This affects 
Nuvoton TPMs and was a regression caused by the patch d23d12484307 ("tpm: fix 
invalid locking in NONBLOCKING mode").
  Link: https://patchwork.kernel.org/patch/11576453/
  
  [Fix]
  Fix this by moving the tpm_try_get_ops()
  further down the code to after the O_NONBLOCK determination is made.
  This is safe because the priv->buffer_mutex still protects the priv
  state being modified.
  
  [Regression Risk]
  Low. This patch only for fix the patch d23d12484307 ("tpm: fix invalid 
locking in NONBLOCKING mode").

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1881710

Title:
  tpm: fix TIS locality timeout problems

Status in linux package in Ubuntu:
  Incomplete
Status in linux-oem-5.6 package in Ubuntu:
  New
Status in linux-oem-osp1 package in Ubuntu:
  New

Bug description:
  [Impact]
  It has been reported that some TIS based TPMs are giving unexpected errors 
when using the O_NONBLOCK path of the TPM device. The problem is that some TPMs 
don't like it when you get and then relinquish a locality (as the 
tpm_try_get_ops()/tpm_put_ops() pair does) without sending a command. This 
currently happens all the time in the O_NONBLOCK write path. This affects 
Nuvoton TPMs and was a regression caused by the patch d23d12484307 ("tpm: fix 
invalid locking in NONBLOCKING mode").
  Link: https://patchwork.kernel.org/patch/11576453/

  [Fix]
  Fix this by moving the tpm_try_get_ops()
  further down the code to after the O_NONBLOCK determination is made.
  This is safe because the priv->buffer_mutex still protects the priv
  state being modified.

  [Regression Risk]
  Low. This patch only for fix the patch d23d12484307 ("tpm: fix invalid 
locking in NONBLOCKING mode").

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1881710/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to