1. 19 3月, 2015 1 次提交
    • J
      tpm: fix: sanitized code paths in tpm_chip_register() · 34d47b63
      Jarkko Sakkinen 提交于
      I started to work with PPI interface so that it would be available
      under character device sysfs directory and realized that chip
      registeration was still too messy.
      
      In TPM 1.x in some rare scenarios (errors that almost never occur)
      wrong order in deinitialization steps was taken in teardown. I
      reproduced these scenarios by manually inserting error codes in the
      place of the corresponding function calls.
      
      The key problem is that the teardown is messy with two separate code
      paths (this was inherited when moving code from tpm-interface.c).
      
      Moved TPM 1.x specific register/unregister functionality to own helper
      functions and added single code path for teardown in tpm_chip_register().
      Now the code paths have been fixed and it should be easier to review
      later on this part of the code.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 7a1d7e6d ("tpm: TPM 2.0 baseline support")
      Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Tested-by: NScot Doyle <lkml14@scotdoyle.com>
      Reviewed-by: NPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      34d47b63
  2. 06 3月, 2015 2 次提交
    • J
      tpm: fix call order in tpm-chip.c · d972b052
      Jarkko Sakkinen 提交于
      - tpm_dev_add_device(): cdev_add() must be done before uevent is
        propagated in order to avoid races.
      - tpm_chip_register(): tpm_dev_add_device() must be done as the
        last step before exposing device to the user space in order to
        avoid races.
      
      In addition clarified description in tpm_chip_register().
      
      Fixes: 313d21ee ("tpm: device class for tpm")
      Fixes: afb5abc2 ("tpm: two-phase chip management functions")
      Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Reviewed-by: NPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      d972b052
    • J
      tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send · 6da2517d
      jmlatten@linux.vnet.ibm.com 提交于
      Problem: When IMA and VTPM are both enabled in kernel config,
      kernel hangs during bootup on LE OS.
      
      Why?: IMA calls tpm_pcr_read() which results in tpm_ibmvtpm_send
      and tpm_ibmtpm_recv getting called. A trace showed that
      tpm_ibmtpm_recv was hanging.
      
      Resolution: tpm_ibmtpm_recv was hanging because tpm_ibmvtpm_send
      was sending CRQ message that probably did not make much sense
      to phype because of Endianness. The fix below sends correctly
      converted CRQ for LE. This was not caught before because it
      seems IMA is not enabled by default in kernel config and
      IMA exercises this particular code path in vtpm.
      
      Tested with IMA and VTPM enabled in kernel config and VTPM
      enabled on both a BE OS and a LE OS ppc64 lpar. This exercised
      CRQ and TPM command code paths in vtpm.
      Patch is against Peter's tpmdd tree on github which included
      Vicky's previous vtpm le patches.
      Signed-off-by: NJoy Latten <jmlatten@linux.vnet.ibm.com>
      Cc: <stable@vger.kernel.org> # eb71f8a5: "Added Little Endian support to vtpm module"
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NAshley Lai <ashley@ahsleylai.com>
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      6da2517d
  3. 16 2月, 2015 1 次提交
  4. 15 2月, 2015 2 次提交
  5. 22 1月, 2015 1 次提交
  6. 21 1月, 2015 1 次提交
  7. 20 1月, 2015 1 次提交
  8. 18 1月, 2015 1 次提交
  9. 17 1月, 2015 30 次提交