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: <20121121172929.GA6406@obsidianresearch.com>
Date:	Wed, 21 Nov 2012 10:29:29 -0700
From:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To:	Peter.Huewe@...ineon.com
Cc:	key@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	tpmdd-devel@...ts.sourceforge.net
Subject: Re: [PATCH resend] TPM: Issue TPM_STARTUP at driver load if the TPM
 has not been started

On Wed, Nov 21, 2012 at 08:59:24AM +0000, Peter.Huewe@...ineon.com wrote:

> I just gave the new version a run on my beagleboard with our Infineon SLB9635 TT 1.2 Soft I2C TPM
> and it seems to work as expected. (Tested with and without previous startup).
> 
> Tested-by: Peter Huewe <peter.huewe@...ineon.com>

Great, I'll send an updated version, thanks!
 
> >+++ b/drivers/char/tpm/tpm.c
> >+#define TPM_ORD_STARTUP cpu_to_be32(153)
> >+#define TPM_ST_CLEAR cpu_to_be16(1)
> >+#define TPM_ST_STATE cpu_to_be16(2)
> >+#define TPM_ST_DEACTIVATED cpu_to_be16(3)
> >+static const struct tpm_input_header tpm_startup_header = {
> >+	.tag = TPM_TAG_RQU_COMMAND,
> >+	.length = cpu_to_be32(12),
> >+	.ordinal = TPM_ORD_STARTUP
> >+};
> >+
> > ssize_t tpm_getcap(struct device *dev, __be32 subcap_id, cap_t *cap,
> > 		   const char *desc)
> > {

> Purely cosmetic question, but why did you define this before the
> tpm_getcap and not tpm_startup?  All the other definitions are made
> before they are used - so this should perhaps better be moved
> directly before tpm_startup.  (Maybe we should move out these
> definitions to a common location? Header?)

Hmm, When I first read through this I thought all these definitions were
being grouped together, easy to move.

> >+struct tpm_startup_in {
> >+	__be16	startup_type;
> >+} __packed;
> 
> 
> All the other user
> __attribute__((packed));
> Care to change to be consistent?

I used to __packed to avoid a checkpatch warning, they should probably
all be changed?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ