Commit Graph
35 Commits
Author SHA1 Message Date
Ian Campbell 61d0fe74c6 tools: Remove $(CFLAGS) from links lines.
The relevant variable in these circumstances is called $(LDFLAGS).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-31 19:32:18 +01:00
Ian Campbell 7d6a65a4fa tools: blktap2: copy xenstore/hashtable.h into blktap2
hashtable.c has already been copied, forked and modified, there
doesn't seem much point in avoiding the same for the header until
someone feels motivated to properly refactor.

Add comments to the various duplicated files cross-referencing each
other for future reference and as a barrier to forking again...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-31 18:13:50 +01:00
Ian Campbell 904216ffb2 tools: remove unnecessary uses of -I.
It's not needed unless you are including headers in the current
directory _and_ you can't use "" instead of <> because the headers are
to be installed.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-21 17:58:52 +00:00
Ian Campbell 0c42c5bdf5 tools: vtpm: Use $(BINDIR) rather than a privately defined variable
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-21 17:46:28 +00:00
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-17 10:36:25 +00:00
Keir Fraser 63afd80f48 vtpm: Fix hashed-memory file writing.
There is a bug in the vtpm_manager that has to do with hashing and
saving the NVM memory files (vtpm_dm_%d.data). The file is not
truncated when it is written and this results in the hash becoming
invalid because of the extra bits at the end of the file.

This patch adds O_TRUNC to the flags when opening the file.

More details on this issue are in the bug report on bugzilla=20
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=3D1488

Signed-off-by: Matt Fioravante <Matthew.Fioravante@jhuapl.edu>
2009-08-24 08:03:46 +01:00
Keir Fraser 9f8501582f Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything.  This was done
in 19010:275abe1c5d24 for the hypervisor.

In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/.  Specifically:
 * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
 * Remove -Wp,-MD... from every other Makefile
 * Remove setting of DEPS from every other Makefile
 * Ensure that every Makefile says -include $(DEPS)
 * Ensure that every Makefile's clean target removes $(DEPS)

Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP.  The variable name is now standardised in
Rules.mk as DEPS.

I have done a test build with this change, on Debian etch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-12 10:16:05 +00:00
Keir Fraser 461990971f tools: replace sprintf with snprintf where applicable
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-12 15:41:15 +01:00
Keir Fraser 55d2bad440 tools/vtpm_manager build: Use generic subdirs rules.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-03-25 09:49:49 +00:00
Keir Fraser 663966a277 tools/vtpm_manager build: Cleanup makefiles.
Remove unnecessary openssl check. Use VPATH. Make clean remove all
generated files.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-03-25 09:49:27 +00:00
kfraser@localhost.localdomain 3edb495707 [VTPM] VTPM manager -- Fix parameter check
If vtpm_managed is started with the same vtpm instance, the following
error occurs.

++++++++++++
 Loading NVM.
         Sending LoadNVM command
 INFO[VTSP]: Unbinding 256 bytes of data.
 ERROR in VTSP_Unbind at vtsp.c:719 code: TPM_BAD_PARAMETER.
 ERROR in envelope_decrypt at securestorage.c:156
 code:TPM_BAD_PARAMETER.
 ERROR[VTPM]: Failed to envelope decrypt data
 .ERROR in VTPM_Handle_Load_NVM at securestorage.c:284 code:
 TPM_BAD_PARAMETER.
 ERROR[VTPM]: Failed to load NVM
 .INFO[VTPM]: [VTPM Listener]: VTPM Listener waiting for messages.
         Reading LoadNVM header
++++++++++++

Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
2007-09-18 15:06:20 +01:00
kfraser@localhost.localdomain 929990b940 [VTPM] Fixed typo in VTPM manager.
Replaces an instance of pthread_mutex_lock() that should be
pthreaad_mutex_unlock(). With thanks to our OpenTC partners at the
Technical University of Sofia, whose static analysis found this bug.

Signed-off-by: Derek G. Murray <Derek.Murray@cl.cam.ac.uk>
2007-07-11 10:56:52 +01:00
kfraser@localhost.localdomain 39a368aba9 VTPM_TOOLS: Added support for QEMU to communicate with vTPM over UNIX
socket for HVM guests.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2007-01-22 15:59:41 +00:00
kfraser@localhost.localdomain 6311dc03da Clean up duplication of 'install' macros in the Makefiles.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 15:57:05 +01:00
kfraser@localhost.localdomain 3fc05fdad8 VTPM_TOOLS: Updated vtpm for new release of tpm_emulator 0.4, and set
up easier tracking of the emulator. Also fixed a few minor bugs in the
manager.

Signed-off-by: Vincent Scarlata <vincent.r.scarlata@intel.com>
2006-07-25 11:30:30 +01:00
kfraser@localhost.localdomain 6b900ffb50 [VTPM_Tools] Support for (non-local) Migration added. Local migration
works provided that the hotplug scripts deliver the "suspend" before
the "resume," but this is not always true.
Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-07-10 15:38:49 +01:00
kaf24@firebug.cl.cam.ac.uk 110b2784a3 [VTPM_TOOLS] Hotplug script enabled the vtpm manager and removed the
control messages from the BE.

Signed-off-by: Vincent Scarlata <vincent.r.scarlata@intel.com>
2006-06-27 11:15:48 +01:00
kaf24@firebug.cl.cam.ac.uk f8b88793c5 [VTPM_TOOLS] Moved the developement tpm_emulator down to ring 3, which
should make debugging easier as well as fix the emulator for x86_64

Signed-off-by: Vincent Scarlata <vincent.r.scarlata@intel.com>
2006-06-27 11:13:24 +01:00
kaf24@firebug.cl.cam.ac.uk 559aac4666 VTPM_TOOLS: Restructured handlers for better clearity and created an ipc
abstraction needed for expansion to hot plug and migration support. Also
fixed a bug in savestate.

Signed-off-by: Vinnie Scarlata <Vincent.r.scarlata@intel.com>
2006-05-17 23:23:26 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
kaf24@firebug.cl.cam.ac.uk 945758df89 More build config changes:
- Build -O2 rather than -O3
 - Build with -Wstrict-prototypes
 - Move target-specific generic compiler switches to Config.mk

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-10 17:32:04 +01:00
kaf24@firebug.cl.cam.ac.uk 326450f67e Clean up the usage of CFLAGS. This is nice for packagers, who would
like to control the base compilation flags from a central place.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-03-09 21:17:45 +01:00
kaf24@firebug.cl.cam.ac.uk b8d1d84a4f VTPM_Tools: Fix error when closing only vtpm, and fix restore bug when
no dmis exist

The first bug prevented the TPM tests from running successfully more
than once in a row.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-03-03 10:46:06 +01:00
kaf24@firebug.cl.cam.ac.uk 666c2a019b Fix bugs related to the virtual TPM. Also make the vTPM
manager listen on /dev/vtpm.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-16 23:00:00 +01:00
kaf24@firebug.cl.cam.ac.uk 8a61bdcadb VTPM Tools: Fix threading bug in vtpm_manager while using NPTL. Now
supports Linux Threads and NPTL threads. Also clean up vtpm Makefile.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-02-16 22:39:55 +01:00
kaf24@firebug.cl.cam.ac.uk 55d921d433 Fix a bug that causes storage key auth to be generated twice.
Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-01-19 20:04:53 +01:00
kaf24@firebug.cl.cam.ac.uk 71e8ec899a Adds a check to vtpm_manager and vtpm Makefiles to verify openssl and
gmp dev files are installed. If files are missing, Makefile exits with a
message indicating that these tools will not be built, rather than an
error, which prevents Xen from building.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-01-12 14:27:20 +01:00
kaf24@firebug.cl.cam.ac.uk f890ca8bcd This patch adds TPM_Seal support to the VTSP. On measured platforms
this can be use to better protect secrets in the VTPM System

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2006-01-04 11:37:41 +01:00
kaf24@firebug.cl.cam.ac.uk aafd5e14e1 Virtual TPM persistent states contain VTPM secrets, which are encrypted
using symmetric keys and stored on disk along with those symmetric keys.
The attached patch uses the TPM to encrypt the symmetric keys and other
global secrets before saving them to disk.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2005-12-30 11:31:12 +01:00
kaf24@firebug.cl.cam.ac.uk 41a6310c5e Move some useful cryptographic enveloping code into their own
functions so they can be used by other parts of the VTPM code.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2005-12-16 18:54:57 +01:00
kaf24@firebug.cl.cam.ac.uk 4b3fd3a9f3 Removes the carriage returns from some of the vtpm
source files that were edited in windows at some point.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
2005-11-30 12:07:28 +01:00
kaf24@firebug.cl.cam.ac.uk f8e8438eef Remove unnecessary NULL checks before freeing memory blocks.
The following functions check for NULL internally:
 free, kfree, xfree, free_xenheap_page[s]

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-11 12:55:47 +01:00
kaf24@firebug.cl.cam.ac.uk a108cd0052 The attached patch to 1) fix a 64-bit bug with some of the data packing,
and 2) adds a workaround for an Infineon TPM hardware bug.

Signed-off-by: Vinnie Scarlata, Joseph Cihula (@intel.com)
2005-11-02 11:21:46 +01:00
kaf24@firebug.cl.cam.ac.uk 20e8ba075b Add 64 bit support to the VTPM Tools plus do some minor cleanups.
The VTPM manager and VTPMs fully support both 32 and 64 bit OSes. The
tpm_emulator (provided for debugging on TPM-less machines) does not
support 64-bit kernels by default though. See the README for details on
how to use it on 64-bit kernels.

(Vinnie Scarlata, Intel Corporation)

Signed-off-by: Joe Cihula <joe.cihula@intel.com>
2005-09-20 09:08:26 +00:00
shand@ubuntu.eng.hq.xensource.com f2a4d188c4 vTPM manager - Intel/IBM joint TPM Virtualization implementation for Xen.
This is a software implementation for people without h/w vTPM support. 

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-30 11:39:25 -08:00