1. 27 9月, 2016 1 次提交
  2. 16 9月, 2016 1 次提交
  3. 15 9月, 2016 5 次提交
  4. 19 7月, 2016 1 次提交
  5. 25 6月, 2016 7 次提交
  6. 20 12月, 2015 1 次提交
  7. 03 12月, 2015 1 次提交
  8. 19 10月, 2015 1 次提交
  9. 15 2月, 2015 1 次提交
    • J
      tpm: fix suspend/resume paths for TPM 2.0 · 74d6b3ce
      Jarkko Sakkinen 提交于
      Fixed suspend/resume paths for TPM 2.0 and consolidated all the
      associated code to the tpm_pm_suspend() and tpm_pm_resume()
      functions. Resume path should be handled by the firmware, i.e.
      Startup(CLEAR) for hibernate and Startup(STATE) for suspend.
      
      There might be some non-PC embedded devices in the future where
      Startup() is not the handled by the FW but fixing the code for
      those IMHO should be postponed until there is hardware available
      to test the fixes although extra Startup in the driver code is
      essentially a NOP.
      
      Added Shutdown(CLEAR) to the remove paths of TIS and CRB drivers.
      Changed tpm2_shutdown() to a void function because there isn't
      much you can do except print an error message if this fails with
      a system error.
      
      Fixes: aec04cbd ("tpm: TPM 2.0 FIFO Interface")
      Fixes: 30fc8d13 ("tpm: TPM 2.0 CRB Interface")
      [phuewe: both did send TPM_Shutdown on resume which 'disables' the TPM
      and did not send TPM2_Shutdown on teardown which leads some TPM2.0 to
      believe there was an attack (no TPM2_Shutdown = no orderly shutdown =
      attack)]
      Reported-by: NPeter Hüwe <PeterHuewe@gmx.de>
      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>
      74d6b3ce
  10. 17 1月, 2015 7 次提交
  11. 30 7月, 2014 3 次提交
  12. 06 1月, 2014 5 次提交
  13. 23 10月, 2013 5 次提交
    • J
      tpm: Rename tpm.c to tpm-interface.c · 9deb0eb7
      Jason Gunthorpe 提交于
      This is preparation for making the tpm module multi-file. kbuild does
      not like having a .c file with the same name as a module. We wish to
      keep the tpm module name so that userspace doesn't see this change.
      
      tpm-interface.c is chosen because the next several commits in the series
      migrate items into tpm-sysfs.c, tpm-dev.c and tpm-class.c. All that will
      be left is tpm command processing and interfacing code.
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      9deb0eb7
    • P
      tpm: cleanup checkpatch warnings · 0a418269
      Peter Huewe 提交于
      before we rename the file it might be a good idea to cleanup the long
      persisting checkpatch warnings.
      Since everything is really trivial, splitting the patch up would only
      result in noise.
      
      For the interested reader - here the checkpatch warnings:
      (regrouped for easer readability)
      
      ERROR: trailing whitespace
      + * Specifications at www.trustedcomputinggroup.org^I $
      + * $
      +^I/* $
      +^I   parameters (RSA 12->bytes: keybit, #primes, expbit)  $
      
      WARNING: unnecessary whitespace before a quoted newline
      +			"invalid count value %x %zx \n", count, bufsiz);
      
      ERROR: do not use assignment in if condition
      +	if ((rc = chip->vendor.send(chip, (u8 *) buf, count)) < 0) {
      
      ERROR: space required after that ',' (ctx:VxV)
      +	len = tpm_transmit(chip,(u8 *) cmd, len);
       	                       ^
      
      ERROR: "foo * bar" should be "foo *bar"
      +ssize_t tpm_show_enabled(struct device * dev, struct device_attribute * attr,
      +ssize_t tpm_show_enabled(struct device * dev, struct device_attribute * attr,
      +ssize_t tpm_show_active(struct device * dev, struct device_attribute * attr,
      +ssize_t tpm_show_active(struct device * dev, struct device_attribute * attr,
      +ssize_t tpm_show_owned(struct device * dev, struct device_attribute * attr,
      +ssize_t tpm_show_owned(struct device * dev, struct device_attribute * attr,
      +ssize_t tpm_show_temp_deactivated(struct device * dev,
      +				struct device_attribute * attr, char *buf)
      
      WARNING: please, no space before tabs
      + * @chip_num: ^Itpm idx # or ANY$
      + * @res_buf: ^ITPM_PCR value$
      + * ^I^Isize of res_buf is 20 bytes (or NULL if you don't care)$
      + * @chip_num: ^Itpm idx # or AN&$
      + * @hash: ^Ihash value used to extend pcr value$
      
      ERROR: code indent should use tabs where possible
      +^I                                     TPM_ORD_CONTINUE_SELFTEST);$
      
      WARNING: line over 80 characters
      +static bool wait_for_tpm_stat_cond(struct tpm_chip *chip, u8 mask, bool check_cancel,
      
      ERROR: trailing whitespace
      + * Called from tpm_<specific>.c probe function only for devices $
      
      total: 16 errors, 7 warnings, 1554 lines checked
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      0a418269
    • J
      tpm: Remove tpm_show_caps_1_2 · e907481b
      Jason Gunthorpe 提交于
      The version of the TPM should not depend on the bus it is connected
      through. 1.1, 1.2 and soon 2.0 TPMS will be all be able to use the
      same bus interfaces.
      
      Make tpm_show_caps try the 1.2 capability first. If that fails then
      fall back to the 1.1 capability. This effectively auto-detects what
      interface the TPM supports at run-time.
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com>
      Reviewed-by: NPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      e907481b
    • J
      tpm: Use container_of to locate the tpm_chip in tpm_open · 58c09e21
      Jason Gunthorpe 提交于
      misc_open sets the file->private_date to the misc_dev when calling
      open. We can use container_of to go from the misc_dev back to the
      tpm_chip.
      
      Future clean ups will move tpm_open into a new file and this change
      means we do not have to export the tpm_chip list.
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com>
      Reviewed-by: NPeter Huewe <peterhuewe@gmx.de>
      Acked-by: NAshley Lai <adlai@linux.vnet.ibm.com>
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      58c09e21
    • J
      tpm: Store devname in the tpm_chip · 6aff1fdc
      Jason Gunthorpe 提交于
      Just put the memory directly in the chip structure, rather than
      in a 2nd dedicated kmalloc.
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com>
      Reviewed-by: NPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
      Acked-by: NAshley Lai <adlai@linux.vnet.ibm.com>
      6aff1fdc
  14. 28 5月, 2013 1 次提交