lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <694703AB-68E1-4026-937C-61DBBE08DB4B@paramecium.org>
Date:   Mon, 27 Nov 2017 07:08:51 +0000
From:   Leendert van Doorn <leendert@...amecium.org>
To:     Mimi Zohar <zohar@...ux.vnet.ibm.com>,
        Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        Nayna Jain <nayna@...ux.vnet.ibm.com>
CC:     "Alexander.Steffen@...ineon.com" <Alexander.Steffen@...ineon.com>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
        "linux-security-module@...r.kernel.org" 
        <linux-security-module@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "peterhuewe@....de" <peterhuewe@....de>,
        "tpmdd@...horst.net" <tpmdd@...horst.net>,
        "patrickc@...ibm.com" <patrickc@...ibm.com>,
        "Safford, David (GE Global Research, US)" <david.safford@...com>
Subject: Re: [PATCH v4 2/4] tpm: ignore burstcount to improve tpm_tis send()
 performance

Hmm, this is almost 20 years old code (

I think the original code did a burst write and didn't check for error conditions until the very last byte write. I seem to remember that there was some text in the original standard to that effect (this may have gone back as far as IBM's ESS spec).

The current code does check for error conditions after each write byte(s) so I don't think there is any reason for this anymore. Changing the while condition to count < len and setting burstcnt = min_t(int, burstcnt, len - count) and remove the tpm_tis_write8/wait_for_tpm_stat/tpm_tis_status clauses after the while loop should be sufficient.

	Leendert

On 11/26/17, 8:37 AM, "Mimi Zohar" <zohar@...ux.vnet.ibm.com> wrote:

    [Cc'ing Dave and Leendeert]
    
    Hi Jarkko,
    
    > > It seems that the last byte was sent from the beginning (27084ef
    > > [PATCH] tpm: driver for next generation TPM chips,), does anyone
    > > remember the reason ?
    > 
    > Sent from the beginning?
    
    I went through the commit logs to see if any of the patch descriptions
    have an explanation for sending the last byte separately. Based on
    commit 27084efee0c3 "[PATCH] tpm: driver for next generation TPM
    chips", it seems it's been there since the beginning.
    
    Dave, Leendert, Do either of you remember the reason for
    tpm_tis_send_data() sending the last byte separately?
    
    thanks,
    
    Mimi
    
    
    

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ