1. 10 1月, 2019 1 次提交
  2. 14 11月, 2018 2 次提交
    • J
      tpm: fix response size validation in tpm_get_random() · c6d2e202
      Jarkko Sakkinen 提交于
      commit 84b59f6487d82d3ab4247a099aba66d4d17e8b08 upstream.
      
      When checking whether the response is large enough to be able to contain
      the received random bytes in tpm_get_random() and tpm2_get_random(),
      they fail to take account the header size, which should be added to the
      minimum size. This commit fixes this issue.
      
      Cc: stable@vger.kernel.org
      Fixes: c659af78 ("tpm: Check size of response before accessing data")
      Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c6d2e202
    • J
      tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated · f4b5f439
      Javier Martinez Canillas 提交于
      [ Upstream commit 0d6d0d62d9505a9816716aa484ebd0b04c795063 ]
      
      For TPM 1.2 chips the system setup utility allows to set the TPM device in
      one of the following states:
      
        * Active: Security chip is functional
        * Inactive: Security chip is visible, but is not functional
        * Disabled: Security chip is hidden and is not functional
      
      When choosing the "Inactive" state, the TPM 1.2 device is enumerated and
      registered, but sending TPM commands fail with either TPM_DEACTIVATED or
      TPM_DISABLED depending if the firmware deactivated or disabled the TPM.
      
      Since these TPM 1.2 error codes don't have special treatment, inactivating
      the TPM leads to a very noisy kernel log buffer that shows messages like
      the following:
      
        tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
        tpm tpm0: A TPM error (6) occurred attempting to read a pcr value
        tpm tpm0: TPM is disabled/deactivated (0x6)
        tpm tpm0: A TPM error (6) occurred attempting get random
        tpm tpm0: A TPM error (6) occurred attempting to read a pcr value
        ima: No TPM chip found, activating TPM-bypass! (rc=6)
        tpm tpm0: A TPM error (6) occurred attempting get random
        tpm tpm0: A TPM error (6) occurred attempting get random
        tpm tpm0: A TPM error (6) occurred attempting get random
        tpm tpm0: A TPM error (6) occurred attempting get random
      
      Let's just suppress error log messages for the TPM_{DEACTIVATED,DISABLED}
      return codes, since this is expected when the TPM 1.2 is set to Inactive.
      
      In that case the kernel log is cleaner and less confusing for users, i.e:
      
        tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
        tpm tpm0: TPM is disabled/deactivated (0x6)
        ima: No TPM chip found, activating TPM-bypass! (rc=6)
      Reported-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com>
      Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4b5f439
  3. 28 7月, 2018 4 次提交
  4. 14 5月, 2018 1 次提交
  5. 09 5月, 2018 1 次提交
  6. 23 3月, 2018 7 次提交
  7. 27 2月, 2018 1 次提交
  8. 08 1月, 2018 4 次提交
  9. 17 12月, 2017 1 次提交
  10. 24 9月, 2017 1 次提交
  11. 07 7月, 2017 2 次提交
  12. 14 6月, 2017 7 次提交
  13. 04 4月, 2017 5 次提交
  14. 16 2月, 2017 1 次提交
  15. 15 2月, 2017 1 次提交
  16. 04 2月, 2017 1 次提交