[Pkg-ofed-commits] [infinipath-psm] 03/11: Fix psm signal hijacking for JVM support. Bump minor ver. Fixes issue reported in https://www.open-mpi.org/community/lists/devel/2015/08/17838.php The minor version is increased by 1 to allow for openmpi to check for java support.

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Sun Apr 3 20:04:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

ana pushed a commit to branch master
in repository infinipath-psm.

commit 225bbc9ab2609868dfbc62f652f5f38f54f68485
Author: Henry Estela <henry.r.estela at intel.com>
Date:   Mon Oct 5 14:18:38 2015 -0700

    Fix psm signal hijacking for JVM support. Bump minor ver.
    Fixes issue reported in
    https://www.open-mpi.org/community/lists/devel/2015/08/17838.php
    The minor version is increased by 1 to allow for openmpi to check for
    java support.
---
 ipath/ipath_debug.c | 32 ++++++++++++++++++++++++++------
 psm.c               |  1 +
 psm.h               |  6 +++---
 3 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/ipath/ipath_debug.c b/ipath/ipath_debug.c
index 5db8df1..b89502f 100644
--- a/ipath/ipath_debug.c
+++ b/ipath/ipath_debug.c
@@ -52,6 +52,7 @@ FILE *__ipath_dbgout;
 static void init_ipath_mylabel(void) __attribute__ ((constructor));
 static void init_ipath_backtrace(void) __attribute__ ((constructor));
 static void init_ipath_dbgfile(void) __attribute__ ((constructor));
+static void fini_ipath_backtrace(void) __attribute__ ((destructor));
 
 static void init_ipath_mylabel(void)
 {
@@ -140,6 +141,13 @@ ipath_sighdlr(int sig, siginfo_t *p1, void *ucv)
     exit(1); // not _exit(), want atexit handlers to get run
 }
 
+static struct sigaction sigsegv_act;
+static struct sigaction sigbus_act;
+static struct sigaction sigill_act;
+static struct sigaction sigabrt_act;
+static struct sigaction sigint_act;
+static struct sigaction sigterm_act;
+
 // we do this as a constructor so any user program that sets signal
 // handlers for these will override our settings, but we still
 // get backtraces if they don't
@@ -152,12 +160,24 @@ static void init_ipath_backtrace(void)
 
     if(!getenv("IPATH_NO_BACKTRACE"))  {// permanent, although probably
         // undocumented way to disable backtraces.
-        (void)sigaction(SIGSEGV, &act, NULL);
-        (void)sigaction(SIGBUS,  &act, NULL);
-        (void)sigaction(SIGILL,  &act, NULL);
-        (void)sigaction(SIGABRT, &act, NULL);
-	(void)sigaction(SIGINT,  &act, NULL);
-	(void)sigaction(SIGTERM, &act, NULL);
+        (void)sigaction(SIGSEGV, &act, &sigsegv_act);
+        (void)sigaction(SIGBUS,  &act, &sigbus_act);
+        (void)sigaction(SIGILL,  &act, &sigill_act);
+        (void)sigaction(SIGABRT, &act, &sigabrt_act);
+        (void)sigaction(SIGINT,  &act, &sigint_act);
+        (void)sigaction(SIGTERM, &act, &sigterm_act);
+    }
+}
+
+static void fini_ipath_backtrace(void)
+{
+    if(!getenv("IPATH_NO_BACKTRACE"))  {
+        (void)sigaction(SIGSEGV, &sigsegv_act, NULL);
+        (void)sigaction(SIGBUS,  &sigbus_act, NULL);
+        (void)sigaction(SIGILL,  &sigill_act, NULL);
+        (void)sigaction(SIGABRT, &sigabrt_act, NULL);
+        (void)sigaction(SIGINT,  &sigint_act, NULL);
+        (void)sigaction(SIGTERM, &sigterm_act, NULL);
     }
 }
 
diff --git a/psm.c b/psm.c
index 6fed28e..f8fa3d8 100644
--- a/psm.c
+++ b/psm.c
@@ -84,6 +84,7 @@ psmi_verno_isinteroperable(uint16_t verno)
     int iscompat = -1;
 
     switch (psmi_verno) {
+       case 0x0110:
        case 0x010f:
 	 /* Multi-rail is supported in this version, since the packet header
 	  * sequence number is shrunk from 24bits to 16bits, old version
diff --git a/psm.h b/psm.h
index feb66c3..558648f 100644
--- a/psm.h
+++ b/psm.h
@@ -67,9 +67,9 @@ typedef struct psm_ep *psm_ep_t;
  * psm_mq_init).  */
 typedef struct psm_mq *psm_mq_t;
 
-#define PSM_VERNO       0x010f 
-#define PSM_VERNO_MAJOR 0x01   
-#define PSM_VERNO_MINOR 0x0f   
+#define PSM_VERNO       0x0110
+#define PSM_VERNO_MAJOR 0x01
+#define PSM_VERNO_MINOR 0x10
 
 enum psm_error {
     

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/infinipath-psm.git



More information about the Pkg-ofed-commits mailing list