Hi,

We don't have RNG instructions, and calling _sparcv9_random() causes 
SIGILL and debug tools (i.e. gdb and mdb) stops when libcrypto.so is 
loaded (at _init()).
% mdb `which openssl`
 > ::run
mdb: stop on SIGILL
mdb: target stopped at:
libcrypto.so.1.0.0`_sparcv9_random+4:   random    %d8


Without those debugging tools, it's very hard to do any debugging, and 
we would like the call to be removed.

The following suggested fix seems to fix the problem we are having with 
the debugging tools.


*--- sparc_arch.h.orig   Thu Dec 19 14:37:27 2013
+++ sparc_arch.h        Thu Dec 19 14:37:45 2013*
@@ -8,7 +8,6 @@
  #define        SPARCV9_FMADD           (1<<4)  /* reserved for SPARC64 
V */
  #define        SPARCV9_BLK             (1<<5)  /* VIS1 block copy */
  #define        SPARCV9_VIS3            (1<<6)
-#define        SPARCV9_RANDOM          (1<<7)
  #define        SPARCV9_64BIT_STACK     (1<<8)

  /*

*--- sparccpuid.S.orig     Thu Dec 19 14:34:25 2013
+++ sparccpuid.S        Thu Dec 19 14:34:25 2013*
@@ -341,14 +341,6 @@
  .type  _sparcv9_vis3_probe,#function
  .size  _sparcv9_vis3_probe,.-_sparcv9_vis3_probe

-.global        _sparcv9_random
-.align 8
-_sparcv9_random:
-       retl
-       .word   0x91b002a0      !random %o0
-.type  _sparcv9_random,#function
-.size  _sparcv9_random,.-_sparcv9_vis3_probe
-
  .global        OPENSSL_cleanse
  .align 32
  OPENSSL_cleanse:

*--- sparcv9cap.c.orig     Thu Dec 19 14:34:25 2013
+++ sparcv9cap.c        Thu Dec 19 14:34:25 2013*
@@ -62,7 +62,6 @@
  void           _sparcv9_fmadd_probe(void);
  unsigned long  _sparcv9_rdcfr(void);
  void           _sparcv9_vis3_probe(void);
-unsigned long  _sparcv9_random(void);
  #ifndef _BOOT
  size_t         _sparcv9_vis1_instrument_bus(unsigned int *,size_t);
  size_t         _sparcv9_vis1_instrument_bus2(unsigned int 
*,size_t,size_t);
@@ -305,12 +304,6 @@
                 OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS3;
                 }

-       if (sigsetjmp(common_jmp,1) == 0)
-               {
-               (void)_sparcv9_random();
-               OPENSSL_sparcv9cap_P[0] |= SPARCV9_RANDOM;
-               }
-
         /*
          * In wait for better solution _sparcv9_rdcfr is masked by
          * VIS3 flag, because it goes to uninterruptable endless



Thank you

-- misaki


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to