WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] VTPM Tools: Fix threading bug in vtpm_manager while usin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] VTPM Tools: Fix threading bug in vtpm_manager while using NPTL. Now
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Feb 2006 01:04:07 +0000
Delivery-date: Fri, 17 Feb 2006 01:17:35 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 2d00d405ef9fe916995f3b0b6cb3d7be65780961
# Parent  761275bcf825fa75f64ac3bbb8748aa1f40c03b8
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@xxxxxxxxx>

diff -r 761275bcf825 -r 2d00d405ef9f tools/vtpm/Makefile
--- a/tools/vtpm/Makefile       Thu Feb 16 21:33:46 2006
+++ b/tools/vtpm/Makefile       Thu Feb 16 21:39:55 2006
@@ -22,10 +22,10 @@
        $(MAKE) -C $(VTPM_DIR) $@
 
 clean:
-       if [ -d $(TPM_EMULATOR_DIR) ]; \
+       @if [ -d $(TPM_EMULATOR_DIR) ]; \
                then $(MAKE) -C $(TPM_EMULATOR_DIR) clean; \
        fi
-       if [ -d $(VTPM_DIR) ]; \
+       @if [ -d $(VTPM_DIR) ]; \
                then $(MAKE) -C $(VTPM_DIR) clean; \
        fi
 
@@ -57,7 +57,7 @@
        patch -p1 <../vtpm.patch
 
 build_sub:
-       if [ -e $(GMP_HEADER) ]; then \
+       @if [ -e $(GMP_HEADER) ]; then \
                $(MAKE) -C $(VTPM_DIR); \
                if [ "$(BUILD_EMULATOR)" = "y" ]; then \
                        $(MAKE) -C $(TPM_EMULATOR_DIR); \
diff -r 761275bcf825 -r 2d00d405ef9f tools/vtpm_manager/Makefile
--- a/tools/vtpm_manager/Makefile       Thu Feb 16 21:33:46 2006
+++ b/tools/vtpm_manager/Makefile       Thu Feb 16 21:39:55 2006
@@ -9,7 +9,7 @@
 all: build
 
 build:
-       if [ -e $(OPENSSL_HEADER) ]; then \
+       @if [ -e $(OPENSSL_HEADER) ]; then \
                @set -e; for subdir in $(SUBDIRS); do \
                        $(MAKE) -C $$subdir $@; \
                done; \
diff -r 761275bcf825 -r 2d00d405ef9f tools/vtpm_manager/manager/Makefile
--- a/tools/vtpm_manager/manager/Makefile       Thu Feb 16 21:33:46 2006
+++ b/tools/vtpm_manager/manager/Makefile       Thu Feb 16 21:39:55 2006
@@ -24,4 +24,4 @@
 
 # libraries
 LIBS += ../tcs/libTCS.a ../util/libTCGUtils.a ../crypto/libtcpaCrypto.a
-LIBS += -lcrypto -lpthread -lrt -lm
+LIBS += -lcrypto -lpthread -lm
diff -r 761275bcf825 -r 2d00d405ef9f tools/vtpm_manager/manager/vtpmd.c
--- a/tools/vtpm_manager/manager/vtpmd.c        Thu Feb 16 21:33:46 2006
+++ b/tools/vtpm_manager/manager/vtpmd.c        Thu Feb 16 21:39:55 2006
@@ -54,21 +54,15 @@
 #ifndef VTPM_MULTI_VM
 
   if (pthread_equal(pthread_self(), vtpm_globals->master_pid)) {
-    if (reason >= 0) { // Reason is a signal
-      vtpmloginfo(VTPM_LOG_VTPM, "VTPM Manager shutting down for signal 
%d.\n", reason);
-    } else  {// Reason is a TPM_RESULT * -1
-      vtpmloginfo(VTPM_LOG_VTPM,"VTPM Manager shuting down for: %s\n", 
tpm_get_error_name(-1 * reason) );
-    }
-    
-    return;
+    vtpmloginfo(VTPM_LOG_VTPM, "VTPM Manager shutting down for signal %d.\n", 
reason);
   } else {
+    // For old Linux Thread machines, signals are delivered to each thread. 
Deal with them.
     vtpmloginfo(VTPM_LOG_VTPM, "Child shutting down\n");
     pthread_exit(NULL);
   }
-#else
+#endif
   VTPM_Stop_Service();
   exit(-1);
-#endif
 }
 
 struct sigaction ctl_c_handler;
@@ -127,8 +121,10 @@
   //Join the other threads until exit time.
   pthread_join(be_thread, NULL);
   pthread_join(dmi_thread, NULL);
-  
+#endif
+ 
+  vtpmlogerror(VTPM_LOG_VTPM, "VTPM Manager shut down unexpectedly.\n");
+ 
   VTPM_Stop_Service();
   return 0;
-#endif
 }
diff -r 761275bcf825 -r 2d00d405ef9f tools/vtpm_manager/util/log.c
--- a/tools/vtpm_manager/util/log.c     Thu Feb 16 21:33:46 2006
+++ b/tools/vtpm_manager/util/log.c     Thu Feb 16 21:39:55 2006
@@ -138,5 +138,5 @@
     if (code == error_msgs[i].code) 
       return error_msgs[i].code_name;
   
-    return "Failed to find code name for given code";
+    return("Unknown Error Code");
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] VTPM Tools: Fix threading bug in vtpm_manager while using NPTL. Now, Xen patchbot -unstable <=