1.1.1 pre1 tests failing on Solaris SPARC

classic Classic list List threaded Threaded
60 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Erik Forsberg-11

>-- Original Message --
>
>On 20/02/18 12:47 PM, Norm Green wrote:
>> On 2/20/2018 5:43 AM, Michael Wojcik wrote:
>>> Not by default. The comments in /usr/include/sys/feature_tests.h (on a
>>> Solaris system) explain this in excruciating detail, but in short you
>>> need either -DPOSIX_C_SOURCE=200112L or -D_XOPEN_SOURCE=600 (or the
>>> equivalent in the code) to compile with XPG6 (aka IEEE 1003.1-2001).
>> Thanks for the suggestions Michael.  Neither resolves the problem. In
>> fact, adding -D_XOPEN_SOURCE=600 causes a new problem:
>>
>> /opt/solarisstudio12.3/bin/c99  -I. -Icrypto/include -Iinclude -m64
>> -xtarget=ultra2 -D_XOPEN_SOURCE=600 -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W
>> -KPIC -xildoff -mt -xcode=pic32 -g -DDSO_DLFCN -DHAVE_DLFCN_H
>> -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ
>> -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
>> -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
>> -DPOLY1305_ASM -DFILIO_H -DB_ENDIAN -DBN_DIV2W -D_REENTRANT
>> -DOPENSSLDIR="\"/hamburg4/users/normg/gs64trunk/slow10/openssl_1.1/install10/ssl\""
>> -DENGINESDIR="\"/hamburg4/users/normg/gs64trunk/slow10/openssl_1.1/install10/lib/engines-1.1\""
>> -c -o crypto/bio/b_addr.o crypto/bio/b_addr.c
>> "crypto/bio/b_addr.c", line 198: undefined symbol: NI_MAXHOST
>> "crypto/bio/b_addr.c", line 198: variable length array can not be
>> initialized: host
>> "crypto/bio/b_addr.c", line 198: undefined symbol: NI_MAXSERV
>> "crypto/bio/b_addr.c", line 198: variable length array can not be
>> initialized: serv
>> c99: acomp failed for crypto/bio/b_addr.c
>> Makefile:881: recipe for target 'crypto/bio/b_addr.o' failed
>>
>>
>> I also tried building with c99 instead of cc, without success.
>>
>

I build my Solaris OpenSSL binaries using studo compiler 12.4 cc -xc99
Havent tried latest 1.1.1 snapshot yet though, probably a good time


--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Viktor Dukhovni
In reply to this post by Norm Green


> On Feb 20, 2018, at 11:36 AM, Norm Green <[hidden email]> wrote:
>
> Your patch tests clean, however there is an easier way which avoids malloc:

Great, so it was the unaligned "buf".  Great.  As for malloc vs. tricks to
align the stack-based array, I see little need to avoid malloc() this is a
test function, not a performance-critical library function.  Exercising
OPENSSL_malloc() is arguably a feature. :-)

That said, I have no religion on which approach is taken to align "buf".
I prefer "malloc" because it unasks the question of which type to use
in an array or union to ensure the "proper" alignment.  Using any of
"long" or "long long" is likely good enough, but could prove more fragile
as the code evolves.

--
        Viktor.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

OpenSSL - User mailing list
I agree, let's just use malloc for the reasons you said.  PR later today.

On 2/20/18, 2:08 PM, "Viktor Dukhovni" <[hidden email]> wrote:

   
   
    > On Feb 20, 2018, at 11:36 AM, Norm Green <[hidden email]> wrote:
    >
    > Your patch tests clean, however there is an easier way which avoids malloc:
   
    Great, so it was the unaligned "buf".  Great.  As for malloc vs. tricks to
    align the stack-based array, I see little need to avoid malloc() this is a
    test function, not a performance-critical library function.  Exercising
    OPENSSL_malloc() is arguably a feature. :-)
   
    That said, I have no religion on which approach is taken to align "buf".
    I prefer "malloc" because it unasks the question of which type to use
    in an array or union to ensure the "proper" alignment.  Using any of
    "long" or "long long" is likely good enough, but could prove more fragile
    as the code evolves.
   
    --
    Viktor.
   
    --
    openssl-users mailing list
    To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
   

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Dennis Clarke-2
In reply to this post by Erik Forsberg-11
On 20/02/18 02:06 PM, Erik Forsberg wrote:
>
>> -- Original Message --
>>
>> On 20/02/18 12:47 PM, Norm Green wrote:
>>> On 2/20/2018 5:43 AM, Michael Wojcik wrote:
<... snippage ...>
>>>
>>> I also tried building with c99 instead of cc, without success.
>>>
>>
>
> I build my Solaris OpenSSL binaries using studo compiler 12.4 cc -xc99
> Havent tried latest 1.1.1 snapshot yet though, probably a good time
>

working on it now .. gimme a few coffee cups to dig into this.

Dennis


--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Dennis Clarke-2
In reply to this post by OpenSSL - User mailing list
On 20/02/18 01:52 PM, Salz, Rich via openssl-users wrote:
>  
>>      So ... this will be fun.
>    
> :)
>
> Thanks for poking at this, folks.  Please take a look at the INSTALL and README files which do cover some of this prerequisites.  And then once you've "fixed" it, let us  know what we need to change!!
>

fixed? .. well .. hacked at for sure.

getting there .. hitting little snags as I go :

/opt/developerstudio12.6/bin/c99  -I. -Icrypto/include -Iinclude
-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64
-xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc
-ftrap=%none -Qy -xs -g -xbuiltin=%none -xdebugformat=dwarf -xunroll=1
-xtarget=sparc64viiplus -xarch=sparcima -xchip=sparc64viiplus
-xcache=64/64/2:11264/256/11 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS
-D_LARGEFILE64_SOURCE -KPIC -DDSO_DLFCN -DHAVE_DLFCN_H -DZLIB -DNDEBUG
-DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ
-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
-DPOLY1305_ASM -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS
-D_LARGEFILE64_SOURCE -D_TS_ERRNO -DOPENSSLDIR="\"/usr/local/ssl\""
-DENGINESDIR="\"/usr/local/lib/engines-1.1\""  -c -o crypto/sparcv9cap.o
crypto/sparcv9cap.c
"crypto/sparcv9cap.c", line 132: warning: no explicit type given
"crypto/sparcv9cap.c", line 132: error: syntax error before or at:
common_jmp
"crypto/sparcv9cap.c", line 132: warning: old-style declaration or
incorrect type for: common_jmp
"crypto/sparcv9cap.c", line 135: warning: implicit function declaration:
siglongjmp
"crypto/sparcv9cap.c", line 214: warning: implicit function declaration:
sigfillset
"crypto/sparcv9cap.c", line 215: warning: implicit function declaration:
sigdelset
"crypto/sparcv9cap.c", line 223: warning: implicit function declaration:
sigprocmask
"crypto/sparcv9cap.c", line 229: warning: implicit function declaration:
sigaction
"crypto/sparcv9cap.c", line 233: warning: implicit function declaration:
sigsetjmp
c99: acomp failed for crypto/sparcv9cap.c
gmake[1]: *** [Makefile:6253: crypto/sparcv9cap.o] Error 2
gmake[1]: Leaving directory
'/usr/local/build/openssl-1.1.1-pre1_SunOS5.10_sparcv9.001'
gmake: *** [Makefile:143: all] Error 2
corv $

yep .


Dennis
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Dennis Clarke-2
In reply to this post by Norm Green
On 20/02/18 01:36 PM, Norm Green wrote:
> Hi Dennis,
>
> You're right, I did modify the config file...
<snip>

I have managed to get to the link stage here and ran into some odd
  syntax issue.

Have to dig around and see what LDCMD was intended to be.

${LDCMD:-/opt/developerstudio12.6/bin/cc} -errfmt=error -erroff=%none
-errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc
-xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -Qy -xs -g
-xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=sparc64viiplus
-xarch=sparcima -xchip=sparc64viiplus -xcache=64/64/2:11264/256/11
-D_TS_ERRNO -D__EXTENSIONS__ -D_POSIX_C_SOURCE
-D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE  -L. -mt  \
         -o apps/openssl apps/asn1pars.o apps/ca.o apps/ciphers.o
apps/cms.o apps/crl.o apps/crl2p7.o apps/dgst.o apps/dhparam.o
apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o apps/enc.o
apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o
apps/nseq.o apps/ocsp.o apps/openssl.o apps/passwd.o apps/pkcs12.o
apps/pkcs7.o apps/pkcs8.o apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o
apps/prime.o apps/rand.o apps/rehash.o apps/req.o apps/rsa.o
apps/rsautl.o apps/s_client.o apps/s_server.o apps/s_time.o
apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o
apps/storeutl.o apps/ts.o apps/verify.o apps/version.o apps/x509.o \
           apps/libapps.a -lssl -lcrypto -lz -lsocket -lnsl -ldl -lpthread
Undefined                       first referenced
  symbol                             in file
OPENSSL_LH_stats_bio                apps/asn1pars.o
SSL_stateless                       apps/s_server.o
BN_GENCB_free                       apps/dhparam.o
SSL_CTX_set_ctlog_list_file         apps/libapps.a(apps.o)
TLS_client_method                   apps/ocsp.o
SSL_SESSION_get0_cipher             apps/s_client.o
OPENSSL_strlcpy                     apps/ca.o
OPENSSL_strlcat                     apps/ca.o
OPENSSL_sk_pop_free                 apps/asn1pars.o
SSL_CTX_set_options                 apps/s_time.o
BN_is_zero                          apps/ca.o
BIO_ADDRINFO_free                   apps/libapps.a(s_socket.o)
BIO_ADDRINFO_next                   apps/libapps.a(s_socket.o)
SSL_is_dtls                         apps/libapps.a(s_cb.o)
BIO_sock_info                       apps/s_client.o
OpenSSL_version                     apps/speed.o
PKCS12_SAFEBAG_get0_attrs           apps/pkcs12.o
PKCS12_SAFEBAG_get_nid              apps/pkcs12.o
PKCS12_SAFEBAG_get0_safes           apps/pkcs12.o
PKCS12_SAFEBAG_get0_p8inf           apps/pkcs12.o
PKCS12_SAFEBAG_get0_pkcs8           apps/pkcs12.o
SSL_get0_dane_authority             apps/libapps.a(s_cb.o)
PEM_write_bio_PrivateKey_traditional apps/pkcs8.o
CRYPTO_clear_free                   apps/dgst.o
SSL_CTX_set_default_read_buffer_len apps/s_client.o
SSL_write_early_data                apps/s_client.o
RSA_check_key_ex                    apps/rsa.o
SSL_get1_supported_ciphers          apps/ciphers.o
SSL_SESSION_get_max_early_data      apps/s_client.o
EVP_PKEY_meth_get0                  apps/openssl.o
X509_STORE_CTX_set0_trusted_stack   apps/verify.o
PKCS12_SAFEBAG_get0_attr            apps/pkcs12.o
PKCS12_SAFEBAG_get0_type            apps/pkcs12.o
PKCS12_SAFEBAG_get1_cert            apps/pkcs12.o
ASN1_TIME_set_string_X509           apps/ca.o
OPENSSL_sk_dup                      apps/asn1pars.o
OPENSSL_sk_pop                      apps/asn1pars.o
OPENSSL_sk_num                      apps/asn1pars.o
OPENSSL_sk_new                      apps/asn1pars.o
OPENSSL_sk_set                      apps/asn1pars.o
EVP_PKEY_meth_get_count             apps/openssl.o
BIO_ADDRINFO_protocol               apps/libapps.a(s_socket.o)
SCT_validation_status_string        apps/s_client.o
SSL_ct_is_enabled                   apps/s_client.o
IDEA_options                        apps/speed.o
IDEA_set_encrypt_key                apps/speed.o
PKCS8_pkey_get0_attrs               apps/pkcs12.o
RSA_generate_multi_prime_key        apps/genrsa.o
X509_STORE_CTX_get_obj_by_subject   apps/crl.o
X509_CRL_get0_nextUpdate            apps/crl.o
X509_CRL_get0_lastUpdate            apps/crl.o
ASN1_ITEM_lookup                    apps/asn1pars.o
SSL_get0_peer_CA_list               apps/libapps.a(s_cb.o)
X509_CRL_set1_nextUpdate            apps/ca.o
X509_CRL_set1_lastUpdate            apps/ca.o
SSL_CTX_dane_enable                 apps/s_client.o
SSL_CTX_set_default_ctlog_list_file apps/libapps.a(apps.o)
SSL_CTX_set_keylog_callback         apps/libapps.a(s_cb.o)
X509_CRL_get0_signature             apps/crl.o
PKCS8_set0_pbe                      apps/pkcs8.o
EVP_MD_CTX_new                      apps/ocsp.o
PKCS12_get0_mac                     apps/pkcs12.o
SSL_set_options                     apps/s_client.o
ASYNC_WAIT_CTX_free                 apps/speed.o
SSL_get_options                     apps/s_server.o
OPENSSL_sk_free                     apps/asn1pars.o
OPENSSL_sk_find                     apps/asn1pars.o
OPENSSL_sk_push                     apps/asn1pars.o
OPENSSL_sk_sort                     apps/asn1pars.o
OPENSSL_sk_zero                     apps/asn1pars.o
PKCS12_mac_present                  apps/pkcs12.o
OPENSSL_LH_get_down_load            apps/asn1pars.o
BIO_lookup_ex                       apps/libapps.a(s_socket.o)
HMAC_CTX_free                       apps/speed.o
OCSP_basic_sign_ctx                 apps/ocsp.o
OPENSSL_sk_is_sorted                apps/asn1pars.o
TS_RESP_CTX_set_signer_digest       apps/ts.o
OPENSSL_sk_shift                    apps/asn1pars.o
OPENSSL_sk_value                    apps/asn1pars.o
SSL_has_pending                     apps/s_client.o
OSSL_STORE_LOADER_get0_engine       apps/engine.o
X509_get0_extensions                apps/ca.o
EVP_PKEY_param_check                apps/pkeyparam.o
BIO_meth_set_callback_ctrl          apps/libapps.a(bf_prefix.o)
SSL_get0_peer_scts                  apps/s_client.o
SSL_CTX_set_max_early_data          apps/s_server.o
SSL_CTX_set_default_verify_dir      apps/libapps.a(apps.o)
TS_VERIFY_CTX_set_data              apps/ts.o
BN_GENCB_set                        apps/dhparam.o
BN_GENCB_new                        apps/dhparam.o
TS_VERIFY_CTX_set_imprint           apps/ts.o
BN_is_odd                           apps/s_client.o
OSSL_STORE_LOADER_get0_scheme       apps/engine.o
X509_get_X509_PUBKEY                apps/x509.o
BIO_listen                          apps/libapps.a(s_socket.o)
EVP_PKEY_check                      apps/pkey.o
X509_SIG_get0                       apps/pkcs12.o
SSL_get0_peername                   apps/libapps.a(s_cb.o)
BN_GENCB_get_arg                    apps/dhparam.o
BIO_socket                          apps/libapps.a(s_socket.o)
ASYNC_start_job                     apps/speed.o
PKCS5_pbe2_set_scrypt               apps/pkcs8.o
OPENSSL_uni2utf8                    apps/pkcs12.o
SSL_CTX_get0_ctlog_store            apps/s_client.o
ASYNC_WAIT_CTX_get_all_fds          apps/speed.o
OSSL_STORE_INFO_free                apps/storeutl.o
X509_OBJECT_free                    apps/crl.o
SSL_dane_enable                     apps/s_client.o
BIO_ADDR_rawaddress                 apps/libapps.a(s_cb.o)
SCRYPT_PARAMS_it                    apps/pkcs12.o
OPENSSL_die                         apps/ocsp.o
OSSL_STORE_INFO_get0_CERT           apps/storeutl.o
OSSL_STORE_INFO_get0_NAME           apps/storeutl.o
OSSL_STORE_INFO_get0_PKEY           apps/storeutl.o
ASYNC_WAIT_CTX_new                  apps/speed.o
SSL_is_init_finished                apps/s_client.o
OpenSSL_version_num                 apps/version.o
OPENSSL_init_ssl                    apps/errstr.o
OPENSSL_hexchar2int                 apps/enc.o
OPENSSL_LH_set_down_load            apps/asn1pars.o
OPENSSL_LH_new                      apps/asn1pars.o
BIO_meth_new                        apps/libapps.a(bf_prefix.o)
EVP_PKEY_get0_RSA                   apps/req.o
EVP_PKEY_get0_DSA                   apps/x509.o
DSA_set0_pqg                        apps/speed.o
DSA_get0_pqg                        apps/dsaparam.o
DSA_get0_key                        apps/dsa.o
DSA_set0_key                        apps/speed.o
DH_bits                             apps/dhparam.o
OPENSSL_sk_delete_ptr               apps/asn1pars.o
BIO_read_ex                         apps/s_client.o
RSA_get0_key                        apps/genrsa.o
BIO_set_init                        apps/libapps.a(bf_prefix.o)
BIO_get_data                        apps/libapps.a(bf_prefix.o)
BIO_set_data                        apps/libapps.a(bf_prefix.o)
OSSL_STORE_error                    apps/storeutl.o
OSSL_STORE_close                    apps/storeutl.o
X509_REQ_get0_pubkey                apps/ca.o
X509_get0_pubkey                    apps/ca.o
OPENSSL_sk_unshift                  apps/asn1pars.o
EVP_PKEY_public_check               apps/pkey.o
SSL_dane_tlsa_add                   apps/s_client.o
OSSL_STORE_do_all_loaders           apps/engine.o
OPENSSL_LH_strhash                  apps/openssl.o
OPENSSL_hexstr2buf                  apps/cms.o
SSL_SESSION_up_ref                  apps/s_client.o
BIO_closesocket                     apps/s_client.o
BIO_meth_set_create                 apps/libapps.a(bf_prefix.o)
SSL_CTX_set0_CA_list                apps/s_client.o
UI_null                             apps/libapps.a(apps.o)
SSL_CIPHER_standard_name            apps/ciphers.o
ASN1_STRING_get0_data               apps/ca.o
BIO_connect                         apps/s_server.o
OPENSSL_LH_retrieve                 apps/asn1pars.o
BIO_ADDRINFO_family                 apps/libapps.a(s_socket.o)
SSL_verify_client_post_handshake    apps/s_server.o
X509_STORE_set_lookup_crls          apps/libapps.a(apps.o)
BIO_parse_hostserv                  apps/s_client.o
SCT_print                           apps/s_client.o
OPENSSL_cipher_name                 apps/ciphers.o
SSL_waiting_for_async               apps/s_server.o
X509_VERIFY_PARAM_set_auth_level    apps/libapps.a(opt.o)
SSL_get_all_async_fds               apps/libapps.a(apps.o)
OPENSSL_sk_new_null                 apps/asn1pars.o
OPENSSL_LH_free                     apps/asn1pars.o
OPENSSL_sk_set_cmp_func             apps/asn1pars.o
ASYNC_is_capable                    apps/speed.o
SSL_get_early_data_status           apps/s_client.o
SSL_SESSION_set_protocol_version    apps/s_client.o
X509_CRL_print_ex                   apps/crl.o
OPENSSL_LH_node_stats_bio           apps/asn1pars.o
SSL_dane_set_flags                  apps/s_client.o
OPENSSL_sk_reserve                  apps/asn1pars.o
TS_CONF_set_ess_cert_id_digest      apps/ts.o
BIO_ADDR_rawport                    apps/libapps.a(s_cb.o)
SSL_CTX_set_default_verify_file     apps/libapps.a(apps.o)
SSL_CTX_set_not_resumable_session_callback apps/s_server.o
OPENSSL_LH_num_items                apps/asn1pars.o
OPENSSL_sk_new_reserve              apps/asn1pars.o
DH_get0_pqg                         apps/dhparam.o
BIO_meth_free                       apps/libapps.a(apps.o)
OPENSSL_LH_node_usage_stats_bio     apps/asn1pars.o
HMAC_CTX_new                        apps/speed.o
X509_STORE_CTX_get_num_untrusted    apps/verify.o
OSSL_STORE_INFO_get0_NAME_description apps/storeutl.o
BIO_meth_set_read_ex                apps/libapps.a(bf_prefix.o)
X509_CRL_get_issuer                 apps/crl.o
RSA_pkey_ctx_ctrl                   apps/req.o
TS_VERIFY_CTX_set_store             apps/ts.o
BIO_ADDRINFO_socktype               apps/libapps.a(s_socket.o)
SSL_read_early_data                 apps/s_server.o
SSL_CTX_set_psk_find_session_callback apps/s_server.o
OSSL_STORE_eof                      apps/storeutl.o
TS_VERIFY_CTS_set_certs             apps/ts.o
BIO_meth_set_write_ex               apps/libapps.a(bf_prefix.o)
TS_VERIFY_CTX_add_flags             apps/ts.o
ASYNC_cleanup_thread                apps/speed.o
BIO_ADDR_new                        apps/s_client.o
IDEA_cbc_encrypt                    apps/speed.o
TS_STATUS_INFO_set_status           apps/ts.o
SSL_SESSION_set1_master_key         apps/s_client.o
X509_OBJECT_get0_X509               apps/crl.o
OSSL_STORE_INFO_type_string         apps/storeutl.o
BIO_write_ex                        apps/libapps.a(bf_prefix.o)
SSL_get0_dane_tlsa                  apps/libapps.a(s_cb.o)
OSSL_STORE_INFO_get_type            apps/storeutl.o
SSL_SESSION_print_keylog            apps/sess_id.o
CRYPTO_set_mem_debug                apps/openssl.o
OSSL_STORE_INFO_get0_CRL            apps/storeutl.o
SSL_CTX_get_security_callback       apps/libapps.a(s_cb.o)
SSL_CTX_set_security_callback       apps/libapps.a(s_cb.o)
OPENSSL_sk_delete                   apps/asn1pars.o
OPENSSL_LH_delete                   apps/asn1pars.o
SSL_CTX_set_tlsext_max_fragment_length apps/s_client.o
TLS_server_method                   apps/ciphers.o
OCSP_resp_get0_signature            apps/ocsp.o
DTLSv1_listen                       apps/s_server.o
SSL_force_post_handshake_auth       apps/s_client.o
SSL_CTX_config                      apps/s_client.o
OPENSSL_LH_insert                   apps/asn1pars.o
OPENSSL_sk_insert                   apps/asn1pars.o
SSL_SESSION_set_cipher              apps/s_client.o
X509_REQ_get_subject_name           apps/ca.o
PKCS12_SAFEBAG_get_bag_nid          apps/pkcs12.o
OPENSSL_sk_deep_copy                apps/asn1pars.o
ASN1_ITEM_get                       apps/asn1pars.o
CRYPTO_memdup                       apps/s_server.o
SSL_get_key_update_type             apps/s_client.o
SSL_CTX_set_psk_use_session_callback apps/s_client.o
OSSL_STORE_open                     apps/storeutl.o
OSSL_STORE_load                     apps/storeutl.o
DH_get_length                       apps/dhparam.o
SSL_CIPHER_get_handshake_digest     apps/s_client.o
SSL_key_update                      apps/s_client.o
X509_getm_notAfter                  apps/libapps.a(apps.o)
BIO_meth_set_destroy                apps/libapps.a(bf_prefix.o)
X509_get0_notAfter                  apps/ca.o
BIO_accept_ex                       apps/libapps.a(s_socket.o)
BIO_meth_set_gets                   apps/libapps.a(bf_prefix.o)
BIO_meth_set_ctrl                   apps/libapps.a(bf_prefix.o)
BIO_meth_set_puts                   apps/libapps.a(bf_prefix.o)
BIO_ADDRINFO_address                apps/libapps.a(s_socket.o)
SSL_CTX_enable_ct                   apps/s_client.o
CRYPTO_zalloc                       apps/passwd.o
X509_get0_notBefore                 apps/x509.o
OSSL_STORE_INFO_get0_PARAMS         apps/storeutl.o
BIO_ADDR_free                       apps/s_client.o
EVP_MD_CTX_free                     apps/ocsp.o
OPENSSL_sk_find_ex                  apps/asn1pars.o
TS_CONF_set_signer_digest           apps/ts.o
SSL_session_reused                  apps/s_client.o
ASYNC_init_thread                   apps/speed.o
X509_getm_notBefore                 apps/libapps.a(apps.o)
SCRYPT_PARAMS_free                  apps/pkcs12.o
OPENSSL_LH_doall                    apps/asn1pars.o
SSL_get_peer_signature_type_nid     apps/libapps.a(s_cb.o)
OPENSSL_LH_error                    apps/asn1pars.o
SSL_CTX_set0_security_ex_data       apps/libapps.a(s_cb.o)
ld: fatal: symbol referencing errors. No output written to apps/openssl
gmake[1]: *** [Makefile:7936: apps/openssl] Error 2
gmake[1]: Leaving directory
'/usr/local/build/openssl-1.1.1-pre1_SunOS5.10_sparcv9.001'
gmake: *** [Makefile:143: all] Error 2
corv $


Making progress here however.

Dennis
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

OpenSSL - User mailing list
In reply to this post by OpenSSL - User mailing list
https://github.com/openssl/openssl/pull/5423


On 2/20/18, 2:10 PM, "Salz, Rich via openssl-users" <[hidden email]> wrote:

    I agree, let's just use malloc for the reasons you said.  PR later today.
   
    On 2/20/18, 2:08 PM, "Viktor Dukhovni" <[hidden email]> wrote:
   
       
       
        > On Feb 20, 2018, at 11:36 AM, Norm Green <[hidden email]> wrote:
        >
        > Your patch tests clean, however there is an easier way which avoids malloc:
       
        Great, so it was the unaligned "buf".  Great.  As for malloc vs. tricks to
        align the stack-based array, I see little need to avoid malloc() this is a
        test function, not a performance-critical library function.  Exercising
        OPENSSL_malloc() is arguably a feature. :-)
       
        That said, I have no religion on which approach is taken to align "buf".
        I prefer "malloc" because it unasks the question of which type to use
        in an array or union to ensure the "proper" alignment.  Using any of
        "long" or "long long" is likely good enough, but could prove more fragile
        as the code evolves.
       
        --
        Viktor.
       
        --
        openssl-users mailing list
        To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
       
   
    --
    openssl-users mailing list
    To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
   

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Richard Levitte - VMS Whacker-2
In reply to this post by Dennis Clarke-2
In message <[hidden email]> on Tue, 20 Feb 2018 21:17:32 -0500, Dennis Clarke <[hidden email]> said:

dclarke> Have to dig around and see what LDCMD was intended to be.

LDCMD is a convenience variable for some users to specify a different
command than the configured C compiler for linking programs.  So
unless you define it specifically, it will remain undefined.

--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Andy Polyakov-2
In reply to this post by Dennis Clarke-2
> Interesting comment :
>
>
> #### Solaris x86 with Sun C setups
>     # There used to be solaris-x86-cc target, but it was removed,
>     # primarily because vendor assembler can't assemble our modules
>     # with -KPIC flag. As result it, assembly support, was not even
>     # available as option. But its lack means lack of side-channel
>     # resistant code, which is incompatible with security by todays
>     # standards. Fortunately gcc is readily available prepackaged
>     # option, which we can firmly point at...
>     #
>     # On related note, solaris64-x86_64-cc target won't compile code
>     # paths utilizing AVX and post-Haswell instruction extensions.
>     # Consider switching to solaris64-x86_64-gcc even here...
>     #
>
>
> Pre-packaged? Really ...

Nowadays you just pkgadd it from some common Oracle repository. Well, at
least on x86, as I have no idea if SPARC Solaris offers it. But the
comment is explicitly about x86.

> let's not go down the route of argument today.
>
>
>     "solaris64-sparcv9-cc" => {
>         inherit_from     => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
>         cflags           => add_before("-xarch=v9"),
>         bn_ops           => "BN_LLONG RC4_CHAR",
>         multilib         => "/64",
>     },
>
>
> Actually xarch=v9 is wrong.  Should just say "sparc".

So assertion is that compiler recognizes option -sparc? Don't see
anything of the sort in the manual page. Well, I can see that
contemporary compiler would recognize -xarch=sparc, but that's
*contemporary* version. But more importantly manual also says that
-xarch=v9 is equivalent to -m64 -xarch=sparc and -m64 is the essence of
this configuration. So -xarch=v9 is right, because it generates 64-bit
code and works with all compiler versions. [Well, one can probably argue
that it's time to reconsider meaning of "all compiler versions" in the
context, yet it wouldn't make "just say "sparc"" right :-)]
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Andy Polyakov-2
In reply to this post by OpenSSL - User mailing list
> https://github.com/openssl/openssl/pull/5423

I wonder how come the problem with asn1_encode_test.c went unnoticed so
far. Objects on stack are customarily aligned at pointer size, even if
their declaration doesn't imply corresponding guarantee. So there are
two options here: a) it's first time it's tested with SPARC Solaris cc
(note that it is regularly tested on SPARC Linux, naturally with gcc);
b) compiler was recently patched/upgraded. Do note that I don't dispute
suggested fix (or compiler's "right" to misalign buf in this case), only
wonder how come it worked so far. Implied question would be what are
other possible implications of b).

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Viktor Dukhovni


> On Feb 21, 2018, at 5:06 AM, Andy Polyakov <[hidden email]> wrote:
>
> I wonder how come the problem with asn1_encode_test.c went unnoticed so
> far. Objects on stack are customarily aligned at pointer size, even if
> their declaration doesn't imply corresponding guarantee. So there are
> two options here: a) it's first time it's tested with SPARC Solaris cc
> (note that it is regularly tested on SPARC Linux, naturally with gcc);
> b) compiler was recently patched/upgraded. Do note that I don't dispute
> suggested fix (or compiler's "right" to misalign buf in this case), only
> wonder how come it worked so far. Implied question would be what are
> other possible implications of b).

The code introduced the misaligned "bug" is master-only, added in Apr/2017,
so quite possibly nobody has ever built in SunOS+SPARC, in which case it
never worked, but simply was never tested until now.

--
        Viktor.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Dennis Clarke-2
On 21/02/18 09:14 AM, Viktor Dukhovni wrote:

>
>
>> On Feb 21, 2018, at 5:06 AM, Andy Polyakov <[hidden email]> wrote:
>>
>> I wonder how come the problem with asn1_encode_test.c went unnoticed so
>> far. Objects on stack are customarily aligned at pointer size, even if
>> their declaration doesn't imply corresponding guarantee. So there are
>> two options here: a) it's first time it's tested with SPARC Solaris cc
>> (note that it is regularly tested on SPARC Linux, naturally with gcc);
>> b) compiler was recently patched/upgraded. Do note that I don't dispute
>> suggested fix (or compiler's "right" to misalign buf in this case), only
>> wonder how come it worked so far. Implied question would be what are
>> other possible implications of b).
>
> The code introduced the misaligned "bug" is master-only, added in Apr/2017,
> so quite possibly nobody has ever built in SunOS+SPARC, in which case it
> never worked, but simply was never tested until now.
>

Pretty sure I have done builds and tests. In fact I am certain of it.

Dennis
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Viktor Dukhovni


> On Feb 21, 2018, at 11:42 AM, Dennis Clarke <[hidden email]> wrote:
>
> On 21/02/18 09:14 AM, Viktor Dukhovni wrote:
>>> On Feb 21, 2018, at 5:06 AM, Andy Polyakov <[hidden email]> wrote:
>>>
>>> I wonder how come the problem with asn1_encode_test.c went unnoticed so
>>> far. Objects on stack are customarily aligned at pointer size, even if
>>> their declaration doesn't imply corresponding guarantee. So there are
>>> two options here: a) it's first time it's tested with SPARC Solaris cc
>>> (note that it is regularly tested on SPARC Linux, naturally with gcc);
>>> b) compiler was recently patched/upgraded. Do note that I don't dispute
>>> suggested fix (or compiler's "right" to misalign buf in this case), only
>>> wonder how come it worked so far. Implied question would be what are
>>> other possible implications of b).
>> The code introduced the misaligned "bug" is master-only, added in Apr/2017,
>> so quite possibly nobody has ever built in SunOS+SPARC, in which case it
>> never worked, but simply was never tested until now.
>
> Pretty sure I have done builds and tests. In fact I am certain of it.

Were you testing "master"?  Or OpenSSL_1_1_0-stable?  The alignment of
"buf" is of course compiler-version dependent, and can also change from
unrelated later changes in the surrounding code.  In any case, the problem
code is comparatively recent (less than a year old), and only users testing
the master development branch on SPARC would have run into the issue.

--
        Viktor.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Norm Green
In reply to this post by Dennis Clarke-2
On 2/21/2018 8:42 AM, Dennis Clarke wrote:
> Pretty sure I have done builds and tests. In fact I am certain of it.

If you added -xmemalign=8s to the SPARC compiler flags (as shown in one
of your emails from yesterday) then you would not see the problem. 
-xmemalign=8s forces the compiler to use 8-byte alignment.

Norm

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Dennis Clarke-2
On 21/02/18 12:11 PM, Norm Green wrote:
 > On 2/21/2018 8:42 AM, Dennis Clarke wrote:
 >> Pretty sure I have done builds and tests. In fact I am certain of it.
 >
 > If you added -xmemalign=8s to the SPARC compiler flags (as shown in one
 > of your emails from yesterday) then you would not see the problem.
 > -xmemalign=8s forces the compiler to use 8-byte alignment.

Which is correct way to do this on sparc systems.  I am digging into the
whole build process to see what needs to be "hacked" at to get solid and
reasonable results. The real issue is compilers.  Sorry but gcc just
won't do the right things on sparc and that isn't anyones fault.

This is where we could go down a deep dark hole.  For the sake of
getting it out there we may as well just admit that the compilers that
are generally installed on Solaris systems were of the Forte flavour way
back when little dinosaurs were still roaming the datacenters and the
cost of the license was about $3000 or so. The acquisitions and rename
of everything happened for a while there and I am surprised no one at
Sun lost their little minds and called it the Java Enterprise C Compiler
because everything else had "Java" slapped on it. Regardless, the Forte
name went away and we then had "Sun Studio" which revved up until we
were able to compile the whole source code base with it and Solaris
"UNIX" was self hosted and self boot-strappable and time marched on. So
here we are today with Oracle Studio compilers and they are very very
good. At least on sparc they are. The concept of doing a compile for a
very specific machine class was dropped on the market way back in 1999
or so and I think by 2002 we could target flavours of sparc v9 with the
vis instructions as well as a lot of hullabaloo about fused multiply
etc.  However that was a sun4c and sun4m issue back when we needed the
optional weitek coprocessor.

So anyways the "target" option was born out of necessity to get the
right opcodes for given sparc units. People had fights over the entire
x86 platform and Sun dropped it. Then picked it up again.  Then built a
version for Itanium. Put that on a shelf and hid it. Buried it. Then
went back and released a general x86 version again. Madness. I had a sit
down coffee with the global manager for the "solaris" product and it is
history now but the compiler tools for x86 were never the same quality
as the sparc tools.  Never have been.  One needs to use "fpversion" to
get the correct target and cache line options but someone at Oracle has
spilled a coffee and shuffled papers and forgot to release fpversion in
the latest flavour of the Studio compilers. I will take a look on a big
new shiney M-class machine and see what is there but I can tell you that
the openssl binaries I build from sources are at least the same speed or
better than the ones shipped out by Oracle. For a given specific type of
machine and sparc target.


jupiter # /opt/developerstudio12.5/bin/fpversion
  A SPARC-based CPU is available.
  Kernel says main memory's clock rate is 1272.0 MHz.

  Sun-4 floating-point controller version 0 found.
  An UltraSPARC chip is available.

  Use "-xtarget=sparc64viiplus -xcache=64/64/2:11264/256/11"
code-generation option.

  Hostid = 0xBADCAFFE.


A much older system may say :


mimas $ /opt/solarisstudio12.4/bin/fpversion
  A SPARC-based CPU is available.
  Kernel says CPU's clock rate is 500.0 MHz.
  Kernel says main memory's clock rate is 100.0 MHz.

  Sun-4 floating-point controller version 0 found.
  An UltraSPARC chip is available.

  Use "-xtarget=ultra2e -xcache=16/32/1:256/64/1" code-generation option.

  Hostid = 0xBADCAFFE.


Even more bizarre and older :

ns1_$ /opt/solarisstudio12.4/bin/fpversion
  A SPARC-based CPU is available.
  Kernel says CPU's clock rate is 360.0 MHz.
  Kernel says main memory's clock rate is 90.0 MHz.

  Sun-4 floating-point controller version 0 found.
  An UltraSPARC chip is available.

  Use "-xtarget=ultra2i -xcache=16/32/1:1024/64/1" code-generation option.

  Hostid = 0xDEADBEEF.


I say "bizarre" because that is a system that uses the memory options
which were shipped on the E10k servers and those cache lines are wrong.
That machine will always report "infinite" performance from openssl
speed results and be damned if I can figure out why.  Yet.

ns1_$ /usr/local/ssl/bin/openssl speed rsa4096
Doing 4096 bit private rsa's for 10s: 13 4096 bit private RSA's in 0.00s
Doing 4096 bit public rsa's for 10s: 1436 4096 bit public RSA's in 0.00s
OpenSSL 1.0.2n  7 Dec 2017
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(ptr,risc1,16,int) aes(partial)
idea(int) blowfish(ptr)
compiler: /opt/solarisstudio12.4/bin/c99 -I. -I.. -I../include  -KPIC
-DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -Xc -g -errfmt=error -erroff=%none -xmemalign=8s
-errshort=full -xstrconst -xildoff -m64 -xnolibmil -xcode=pic32
-xregs=no%appl -xlibmieee -ftrap=%none -xarch=sparc -mc -xs
-xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -D_TS_ERRNO
-D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -DB_ENDIAN
-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM
                   sign    verify    sign/s verify/s
rsa 4096 bits 0.000000s 0.000000s      inf      inf


However the latest from Oracle claims :

$ ls /opt/developerstudio12.6/bin/fpversion
/opt/developerstudio12.6/bin/fpversion: No such file or directory

However it is in the manual still.

Messy.  Very.

So as I said earlier ... this should be fun.

Dennis

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Norm Green
On 2/21/2018 9:42 AM, Dennis Clarke wrote:
> Which is correct way to do this on sparc systems.

Why do you say that?  We've been building OpenSSL on SPARC for the past
7 years without that flag and it's worked just fine with only a few
minor changes to the compile/link flags.

Norm

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Dennis Clarke-2
On 21/02/18 12:57 PM, Norm Green wrote:
> On 2/21/2018 9:42 AM, Dennis Clarke wrote:
>> Which is correct way to do this on sparc systems.
>
> Why do you say that?  We've been building OpenSSL on SPARC for the past
> 7 years without that flag and it's worked just fine with only a few
> minor changes to the compile/link flags.
>

The whole idea here is that openssl ( like a lot of things ) is supposed
to be portable code across a whack of platforms and while I can not
recall the dusty memories of why this option was invented way way back
in time I can at least quote the manual :


B.2.144 -xmemalign=ab

(SPARC) Use the -xmemalign option to control the assumptions that the
compiler makes about the alignment of data. By controlling the code
generated for potentially misaligned memory accesses and by controlling
program behavior in the event of a misaligned access, you can more
easily port your code to the SPARC platform.


Right ... like it says.

However what we are not saying here is what happens ( sig sig core dump
and halt ) when the system attempts to reach out and touch memory in an
icky way?  You must provide a value for both alignment and behavior :

   Alignment                      Behavior
   1 at most 1 byte alignment.    i Interpret access and continue exec
   2 at most 2 byte alignment.    s Raise signal SIGBUS
   4 at most 4 byte alignment.    f same as specifying i when the
                                    alignment is 1, 2, or 4,
                                    also same as s when a=8 or 16

   8 at most 8 byte alignment.
  16 at most 16 byte alignment.

So really we could do all manner of nasty things here and watch all
manner of performance results and cool coredumps and it would be fun to
try.  However the option -xmemalign=8s will enforce "There should be no
misaligned accesses in the program".

So sayeth the manual going back way way back in time and so sayeth ye
gray beard here from experience.  So I guess that is why I would say
this is the right way to do stuff.

Dennis
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Dennis Clarke-2
In reply to this post by Norm Green
On 21/02/18 12:57 PM, Norm Green wrote:
> On 2/21/2018 9:42 AM, Dennis Clarke wrote:
>> Which is correct way to do this on sparc systems.
>
> Why do you say that?  We've been building OpenSSL on SPARC for the past
> 7 years without that flag and it's worked just fine with only a few
> minor changes to the compile/link flags.
>
> Norm
>

More simply ... there may be no code issue here at all.

This is a compiler issue.

Dennis
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Andy Polyakov-2
In reply to this post by Dennis Clarke-2
> So really we could do all manner of nasty things here and watch all
> manner of performance results and cool coredumps and it would be fun to
> try.  However the option -xmemalign=8s will enforce "There should be no
> misaligned accesses in the program".

And "the default for all v9 architectures is -xmemalign=8s". Other
values are effectively for those who are lazy enough to fix broken code
taken from x86[_64]. Values other than 8s are also kind of "whole
application" things, i.e. it would be inappropriate to compile a
*library* [such as OpenSSL] with any other flag than -xmemalign=8s.
Which is why it *is* the default, has to be, so you don't have to
actually specify it. In other words assertion that not specifying
-xmemalign=8s is somehow wrong is not actually substantiated. Not
specifying it is perfectly appropriate. On related note OpenSSL is
periodically tested on RISC platforms and misalignment issues get ironed
out in time. [That's why I wondered how come it went unnoticed so far.]

Just in case for reference, default for 32-bit code is 8i. I assume that
it implies 4s, which would be consistent with expected RISC behaviour,
i.e. SIGBUS on register-sized loads/stores. Though there is ambiguity.
One would expect SIGBUG on double-precision floating point load/store
even on 32-bit system. So does 8i mean that it would actually tolerate
misaligned doubles?
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: 1.1.1 pre1 tests failing on Solaris SPARC

Norm Green
On 2/21/2018 12:46 PM, Andy Polyakov wrote:
> And "the default for all v9 architectures is -xmemalign=8s".
I'm getting confused.  Since I did not specify -xmemalign at all, why
did the test fail with SIGBUS in the first place?  Seems like there
should have been no alignment problem if the compiler is doing the right
thing by default as you say.

Norm

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
123