You are not logged in.

#1 2021-09-11 10:31:56

loqs
Member
Registered: 2014-03-06
Posts: 13,940

s2ntls-1.0.18 failing chick with ilegal instruction AVX512 related

PKGBUILD updated to 1.0.18 version requires -DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF to prevent a build failure

# Maintainer: Anatol Pomozov

pkgname=s2n-tls
pkgver=1.0.18
pkgrel=1
pkgdesc='A C99 implementation of the TLS/SSL protocols that is designed to be simple, small, fast, and with security as a priority'
arch=(x86_64)
url='https://github.com/aws/s2n-tls'
license=(Apache)
provides=(s2n) # upstream renamed the project from s2n to s2n-tls
conflicts=(s2n)
replaces=(s2n)
depends=(openssl)
makedepends=(cmake)
source=(s2n-tls-$pkgver.zip::https://github.com/aws/s2n-tls/archive/v$pkgver.zip
        missing_symbol_workaround.patch)
sha256sums=('51d91f12f9e4a4bee47eeb3ee560896457496474c32258563951b59ef2d7d599'
            'd86e81598a79de7353262eeffc490c1e266dc8a92f7057166d447cd36d04eb35')

prepare() {
  cd s2n-tls-$pkgver

#  patch -p1 < ../missing_symbol_workaround.patch # https://github.com/awslabs/s2n/issues/2401
}

build() {
  cd s2n-tls-$pkgver

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF -S . -B build
  cmake --build build
}

check() {
  cd s2n-tls-$pkgver
  cmake --build build --target test
}

package() {
  cd s2n-tls-$pkgver

  cmake --build build --target install -- DESTDIR="$pkgdir/"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

Output from check()

Running tests...
Test project /build/s2n-tls/src/s2n-tls-1.0.18/build
        Start   1: s2n_3des_test
  1/206 Test   #1: s2n_3des_test ....................................   Passed    1.64 sec
        Start   2: s2n_aead_aes_test
  2/206 Test   #2: s2n_aead_aes_test ................................   Passed    6.66 sec
        Start   3: s2n_aead_chacha20_poly1305_test
  3/206 Test   #3: s2n_aead_chacha20_poly1305_test ..................   Passed    3.80 sec
        Start   4: s2n_aes_sha_composite_test
  4/206 Test   #4: s2n_aes_sha_composite_test .......................   Passed    1.62 sec
        Start   5: s2n_aes_test
  5/206 Test   #5: s2n_aes_test .....................................   Passed    0.14 sec
        Start   6: s2n_alerts_test
  6/206 Test   #6: s2n_alerts_test ..................................   Passed    0.03 sec
        Start   7: s2n_array_test
  7/206 Test   #7: s2n_array_test ...................................   Passed    0.01 sec
        Start   8: s2n_asn1_time_test
  8/206 Test   #8: s2n_asn1_time_test ...............................   Passed    0.01 sec
        Start   9: s2n_async_pkey_test
  9/206 Test   #9: s2n_async_pkey_test ..............................   Passed   15.88 sec
        Start  10: s2n_auth_selection_test
 10/206 Test  #10: s2n_auth_selection_test ..........................   Passed    0.03 sec
        Start  11: s2n_blob_test
 11/206 Test  #11: s2n_blob_test ....................................   Passed    0.01 sec
        Start  12: s2n_cbc_verify_test
 12/206 Test  #12: s2n_cbc_verify_test ..............................   Passed    2.44 sec
        Start  13: s2n_cert_chain_and_key_test
 13/206 Test  #13: s2n_cert_chain_and_key_test ......................   Passed    0.11 sec
        Start  14: s2n_certificate_extensions_test
 14/206 Test  #14: s2n_certificate_extensions_test ..................   Passed    0.01 sec
        Start  15: s2n_certificate_test
 15/206 Test  #15: s2n_certificate_test .............................   Passed    0.03 sec
        Start  16: s2n_change_cipher_spec_test
 16/206 Test  #16: s2n_change_cipher_spec_test ......................   Passed    0.01 sec
        Start  17: s2n_choose_supported_group_test
 17/206 Test  #17: s2n_choose_supported_group_test ..................   Passed    0.01 sec
        Start  18: s2n_cipher_info_test
 18/206 Test  #18: s2n_cipher_info_test .............................   Passed    0.01 sec
        Start  19: s2n_cipher_suite_match_test
 19/206 Test  #19: s2n_cipher_suite_match_test ......................   Passed    0.03 sec
        Start  20: s2n_cipher_suites_test
 20/206 Test  #20: s2n_cipher_suites_test ...........................   Passed    0.01 sec
        Start  21: s2n_cleanup_test
 21/206 Test  #21: s2n_cleanup_test .................................   Passed    0.01 sec
        Start  22: s2n_client_alpn_extension_test
 22/206 Test  #22: s2n_client_alpn_extension_test ...................   Passed    0.01 sec
        Start  23: s2n_client_auth_handshake_test
 23/206 Test  #23: s2n_client_auth_handshake_test ...................   Passed    0.04 sec
        Start  24: s2n_client_cert_request_context_test
 24/206 Test  #24: s2n_client_cert_request_context_test .............   Passed    0.02 sec
        Start  25: s2n_client_cert_verify_test
 25/206 Test  #25: s2n_client_cert_verify_test ......................   Passed    0.03 sec
        Start  26: s2n_client_early_data_indication_test
 26/206 Test  #26: s2n_client_early_data_indication_test ............   Passed    0.01 sec
        Start  27: s2n_client_empty_cert_test
 27/206 Test  #27: s2n_client_empty_cert_test .......................   Passed    0.02 sec
        Start  28: s2n_client_extensions_test
 28/206 Test  #28: s2n_client_extensions_test .......................   Passed    0.18 sec
        Start  29: s2n_client_hello_recv_test
 29/206 Test  #29: s2n_client_hello_recv_test .......................   Passed    0.02 sec
        Start  30: s2n_client_hello_retry_test
 30/206 Test  #30: s2n_client_hello_retry_test ......................   Passed    0.06 sec
        Start  31: s2n_client_hello_test
 31/206 Test  #31: s2n_client_hello_test ............................   Passed    0.23 sec
        Start  32: s2n_client_key_share_extension_pq_test
 32/206 Test  #32: s2n_client_key_share_extension_pq_test ...........***Exception: Illegal  0.03 sec
        Start  33: s2n_client_key_share_extension_test
 33/206 Test  #33: s2n_client_key_share_extension_test ..............   Passed    0.02 sec
        Start  34: s2n_client_max_frag_len_extension_test
 34/206 Test  #34: s2n_client_max_frag_len_extension_test ...........   Passed    0.03 sec
        Start  35: s2n_client_pq_kem_extension_test
 35/206 Test  #35: s2n_client_pq_kem_extension_test .................   Passed    0.01 sec
        Start  36: s2n_client_psk_extension_test
 36/206 Test  #36: s2n_client_psk_extension_test ....................   Passed    0.04 sec
        Start  37: s2n_client_record_version_test
 37/206 Test  #37: s2n_client_record_version_test ...................   Passed    0.02 sec
        Start  38: s2n_client_renegotiation_info_extension_test
 38/206 Test  #38: s2n_client_renegotiation_info_extension_test .....   Passed    0.01 sec
        Start  39: s2n_client_sct_list_extension_test
 39/206 Test  #39: s2n_client_sct_list_extension_test ...............   Passed    0.02 sec
        Start  40: s2n_client_secure_renegotiation_test
 40/206 Test  #40: s2n_client_secure_renegotiation_test .............   Passed    0.02 sec
        Start  41: s2n_client_server_name_extension_test
 41/206 Test  #41: s2n_client_server_name_extension_test ............   Passed    0.01 sec
        Start  42: s2n_client_session_ticket_extension_test
 42/206 Test  #42: s2n_client_session_ticket_extension_test .........   Passed    0.01 sec
        Start  43: s2n_client_signature_algorithms_extension_test
 43/206 Test  #43: s2n_client_signature_algorithms_extension_test ...   Passed    0.01 sec
        Start  44: s2n_client_status_request_extension_test
 44/206 Test  #44: s2n_client_status_request_extension_test .........   Passed    0.02 sec
        Start  45: s2n_client_supported_groups_extension_test
 45/206 Test  #45: s2n_client_supported_groups_extension_test .......   Passed    0.01 sec
        Start  46: s2n_client_supported_versions_extension_test
 46/206 Test  #46: s2n_client_supported_versions_extension_test .....   Passed    0.01 sec
        Start  47: s2n_config_test
 47/206 Test  #47: s2n_config_test ..................................   Passed    0.03 sec
        Start  48: s2n_connection_context_test
 48/206 Test  #48: s2n_connection_context_test ......................   Passed    0.01 sec
        Start  49: s2n_connection_preferences_test
 49/206 Test  #49: s2n_connection_preferences_test ..................   Passed    0.01 sec
        Start  50: s2n_connection_test
 50/206 Test  #50: s2n_connection_test ..............................   Passed    0.03 sec
        Start  51: s2n_drain_alert_test
 51/206 Test  #51: s2n_drain_alert_test .............................   Passed    0.01 sec
        Start  52: s2n_drbg_test
 52/206 Test  #52: s2n_drbg_test ....................................   Passed    0.67 sec
        Start  53: s2n_early_data_io_api_test
 53/206 Test  #53: s2n_early_data_io_api_test .......................   Passed    0.01 sec
        Start  54: s2n_early_data_io_test
 54/206 Test  #54: s2n_early_data_io_test ...........................   Passed    0.13 sec
        Start  55: s2n_early_data_test
 55/206 Test  #55: s2n_early_data_test ..............................   Passed    0.02 sec
        Start  56: s2n_ecc_evp_test
 56/206 Test  #56: s2n_ecc_evp_test .................................   Passed    0.04 sec
        Start  57: s2n_ecc_point_format_extension_test
 57/206 Test  #57: s2n_ecc_point_format_extension_test ..............   Passed    0.01 sec
        Start  58: s2n_ecc_preferences_test
 58/206 Test  #58: s2n_ecc_preferences_test .........................   Passed    0.01 sec
        Start  59: s2n_ecdsa_test
 59/206 Test  #59: s2n_ecdsa_test ...................................   Passed    0.02 sec
        Start  60: s2n_ems_extension_test
 60/206 Test  #60: s2n_ems_extension_test ...........................   Passed    0.01 sec
        Start  61: s2n_encrypted_extensions_test
 61/206 Test  #61: s2n_encrypted_extensions_test ....................   Passed    0.01 sec
        Start  62: s2n_error_lookup_test
 62/206 Test  #62: s2n_error_lookup_test ............................   Passed    0.01 sec
        Start  63: s2n_error_type_test
 63/206 Test  #63: s2n_error_type_test ..............................   Passed    0.01 sec
        Start  64: s2n_extended_master_secret_test
 64/206 Test  #64: s2n_extended_master_secret_test ..................   Passed    0.01 sec
        Start  65: s2n_extension_list_parse_test
 65/206 Test  #65: s2n_extension_list_parse_test ....................   Passed    0.01 sec
        Start  66: s2n_extension_list_process_test
 66/206 Test  #66: s2n_extension_list_process_test ..................   Passed    0.01 sec
        Start  67: s2n_extension_list_send_test
 67/206 Test  #67: s2n_extension_list_send_test .....................   Passed    0.01 sec
        Start  68: s2n_extension_type_lists_test
 68/206 Test  #68: s2n_extension_type_lists_test ....................   Passed    0.01 sec
        Start  69: s2n_extension_type_test
 69/206 Test  #69: s2n_extension_type_test ..........................   Passed    0.02 sec
        Start  70: s2n_extensions_server_key_share_select_test
 70/206 Test  #70: s2n_extensions_server_key_share_select_test ......   Passed    0.01 sec
        Start  71: s2n_fragmentation_coalescing_test
 71/206 Test  #71: s2n_fragmentation_coalescing_test ................   Passed    0.01 sec
        Start  72: s2n_handshake_errno_test
 72/206 Test  #72: s2n_handshake_errno_test .........................   Passed    0.01 sec
        Start  73: s2n_handshake_hashes_test
 73/206 Test  #73: s2n_handshake_hashes_test ........................   Passed    0.01 sec
        Start  74: s2n_handshake_invariant_test
 74/206 Test  #74: s2n_handshake_invariant_test .....................   Passed    0.01 sec
        Start  75: s2n_handshake_io_async_test
 75/206 Test  #75: s2n_handshake_io_async_test ......................   Passed    0.01 sec
        Start  76: s2n_handshake_io_early_data_test
 76/206 Test  #76: s2n_handshake_io_early_data_test .................   Passed    0.01 sec
        Start  77: s2n_handshake_io_errors_test
 77/206 Test  #77: s2n_handshake_io_errors_test .....................   Passed    0.01 sec
        Start  78: s2n_handshake_partial_test
 78/206 Test  #78: s2n_handshake_partial_test .......................   Passed    0.02 sec
        Start  79: s2n_handshake_test
 79/206 Test  #79: s2n_handshake_test ...............................   Passed    1.22 sec
        Start  80: s2n_handshake_type_test
 80/206 Test  #80: s2n_handshake_type_test ..........................   Passed    0.01 sec
        Start  81: s2n_hash_test
 81/206 Test  #81: s2n_hash_test ....................................   Passed    0.01 sec
        Start  82: s2n_hkdf_test
 82/206 Test  #82: s2n_hkdf_test ....................................   Passed    0.01 sec
        Start  83: s2n_hmac_test
 83/206 Test  #83: s2n_hmac_test ....................................   Passed    0.01 sec
        Start  84: s2n_kem_preferences_test
 84/206 Test  #84: s2n_kem_preferences_test .........................   Passed    0.01 sec
        Start  85: s2n_kem_test
 85/206 Test  #85: s2n_kem_test .....................................   Passed    0.01 sec
        Start  86: s2n_kex_test
 86/206 Test  #86: s2n_kex_test .....................................   Passed    0.01 sec
        Start  87: s2n_kex_with_kem_test
 87/206 Test  #87: s2n_kex_with_kem_test ............................***Exception: Illegal  1.65 sec
        Start  88: s2n_key_share_extension_test
 88/206 Test  #88: s2n_key_share_extension_test .....................   Passed    0.01 sec
        Start  89: s2n_key_update_test
 89/206 Test  #89: s2n_key_update_test ..............................   Passed    0.01 sec
        Start  90: s2n_malformed_handshake_test
 90/206 Test  #90: s2n_malformed_handshake_test .....................   Passed    0.01 sec
        Start  91: s2n_map_test
 91/206 Test  #91: s2n_map_test .....................................   Passed    0.02 sec
        Start  92: s2n_mem_allocator_test
 92/206 Test  #92: s2n_mem_allocator_test ...........................   Passed    6.15 sec
        Start  93: s2n_mem_usage_test
 93/206 Test  #93: s2n_mem_usage_test ...............................   Passed    0.22 sec
        Start  94: s2n_mutual_auth_test
 94/206 Test  #94: s2n_mutual_auth_test .............................   Passed    0.23 sec
        Start  95: s2n_nst_early_data_indication_test
 95/206 Test  #95: s2n_nst_early_data_indication_test ...............   Passed    0.01 sec
        Start  96: s2n_optional_client_auth_test
 96/206 Test  #96: s2n_optional_client_auth_test ....................   Passed    0.45 sec
        Start  97: s2n_override_openssl_random_test
 97/206 Test  #97: s2n_override_openssl_random_test .................   Passed    0.38 sec
        Start  98: s2n_pem_rsa_dhe_test
 98/206 Test  #98: s2n_pem_rsa_dhe_test .............................   Passed    0.37 sec
        Start  99: s2n_pem_test
 99/206 Test  #99: s2n_pem_test .....................................   Passed    0.07 sec
        Start 100: s2n_pkey_test
100/206 Test #100: s2n_pkey_test ....................................   Passed    0.03 sec
        Start 101: s2n_post_handshake_test
101/206 Test #101: s2n_post_handshake_test ..........................   Passed    0.01 sec
        Start 102: s2n_pq_kem_hybrid_kat_test
102/206 Test #102: s2n_pq_kem_hybrid_kat_test .......................   Passed    0.17 sec
        Start 103: s2n_pq_kem_kat_test
103/206 Test #103: s2n_pq_kem_kat_test ..............................***Exception: Illegal  4.98 sec
        Start 104: s2n_pq_kem_test
104/206 Test #104: s2n_pq_kem_test ..................................***Exception: Illegal  0.09 sec
        Start 105: s2n_protocol_preferences_test
105/206 Test #105: s2n_protocol_preferences_test ....................   Passed    0.02 sec
        Start 106: s2n_psk_key_exchange_modes_extension_test
106/206 Test #106: s2n_psk_key_exchange_modes_extension_test ........   Passed    0.01 sec
        Start 107: s2n_psk_offered_test
107/206 Test #107: s2n_psk_offered_test .............................   Passed    0.02 sec
        Start 108: s2n_psk_test
108/206 Test #108: s2n_psk_test .....................................   Passed    0.03 sec
        Start 109: s2n_quic_support_io_test
109/206 Test #109: s2n_quic_support_io_test .........................   Passed    0.01 sec
        Start 110: s2n_quic_support_test
110/206 Test #110: s2n_quic_support_test ............................   Passed    0.02 sec
        Start 111: s2n_quic_transport_params_extension_test
111/206 Test #111: s2n_quic_transport_params_extension_test .........   Passed    0.03 sec
        Start 112: s2n_random_test
112/206 Test #112: s2n_random_test ..................................   Passed    1.06 sec
        Start 113: s2n_rc4_test
113/206 Test #113: s2n_rc4_test .....................................   Passed    0.18 sec
        Start 114: s2n_record_size_test
114/206 Test #114: s2n_record_size_test .............................   Passed    0.01 sec
        Start 115: s2n_record_test
115/206 Test #115: s2n_record_test ..................................   Passed    0.21 sec
        Start 116: s2n_recv_test
116/206 Test #116: s2n_recv_test ....................................   Passed    0.01 sec
        Start 117: s2n_release_non_empty_buffers_test
117/206 Test #117: s2n_release_non_empty_buffers_test ...............   Passed    0.02 sec
        Start 118: s2n_resume_test
118/206 Test #118: s2n_resume_test ..................................   Passed    0.07 sec
        Start 119: s2n_rfc5952_test
119/206 Test #119: s2n_rfc5952_test .................................   Passed    0.01 sec
        Start 120: s2n_rsa_pss_rsae_test
120/206 Test #120: s2n_rsa_pss_rsae_test ............................   Passed    0.02 sec
        Start 121: s2n_rsa_pss_test
121/206 Test #121: s2n_rsa_pss_test .................................   Passed    0.04 sec
        Start 122: s2n_safety_blinding_test
122/206 Test #122: s2n_safety_blinding_test .........................   Passed    0.01 sec
        Start 123: s2n_safety_macros_test
123/206 Test #123: s2n_safety_macros_test ...........................   Passed    0.01 sec
        Start 124: s2n_safety_test
124/206 Test #124: s2n_safety_test ..................................   Passed    0.01 sec
        Start 125: s2n_security_policies_test
125/206 Test #125: s2n_security_policies_test .......................   Passed    0.69 sec
        Start 126: s2n_self_talk_alerts_test
126/206 Test #126: s2n_self_talk_alerts_test ........................   Passed    3.05 sec
        Start 127: s2n_self_talk_alpn_test
127/206 Test #127: s2n_self_talk_alpn_test ..........................   Passed    8.27 sec
        Start 128: s2n_self_talk_broken_pipe_test
128/206 Test #128: s2n_self_talk_broken_pipe_test ...................   Passed    8.03 sec
        Start 129: s2n_self_talk_client_hello_cb_test
129/206 Test #129: s2n_self_talk_client_hello_cb_test ...............   Passed   16.27 sec
        Start 130: s2n_self_talk_custom_io_test
130/206 Test #130: s2n_self_talk_custom_io_test .....................   Passed    0.20 sec
        Start 131: s2n_self_talk_io_mem_test
131/206 Test #131: s2n_self_talk_io_mem_test ........................   Passed    0.02 sec
        Start 132: s2n_self_talk_key_log_test
132/206 Test #132: s2n_self_talk_key_log_test .......................   Passed    0.03 sec
        Start 133: s2n_self_talk_min_protocol_version_test
133/206 Test #133: s2n_self_talk_min_protocol_version_test ..........   Passed    0.02 sec
        Start 134: s2n_self_talk_nonblocking_test
134/206 Test #134: s2n_self_talk_nonblocking_test ...................   Passed    9.74 sec
        Start 135: s2n_self_talk_offload_signing_test
135/206 Test #135: s2n_self_talk_offload_signing_test ...............   Passed    0.03 sec
        Start 136: s2n_self_talk_psk_test
136/206 Test #136: s2n_self_talk_psk_test ...........................   Passed    0.02 sec
        Start 137: s2n_self_talk_quic_support_test
137/206 Test #137: s2n_self_talk_quic_support_test ..................   Passed    0.02 sec
        Start 138: s2n_self_talk_session_id_test
138/206 Test #138: s2n_self_talk_session_id_test ....................   Passed   14.30 sec
        Start 139: s2n_self_talk_session_resumption_test
139/206 Test #139: s2n_self_talk_session_resumption_test ............   Passed    0.11 sec
        Start 140: s2n_self_talk_shutdown_test
140/206 Test #140: s2n_self_talk_shutdown_test ......................   Passed    0.01 sec
        Start 141: s2n_self_talk_tls12_test
141/206 Test #141: s2n_self_talk_tls12_test .........................   Passed    6.15 sec
        Start 142: s2n_self_talk_tls13_test
142/206 Test #142: s2n_self_talk_tls13_test .........................   Passed    3.08 sec
        Start 143: s2n_send_key_update_test
143/206 Test #143: s2n_send_key_update_test .........................   Passed   27.11 sec
        Start 144: s2n_send_test
144/206 Test #144: s2n_send_test ....................................   Passed    0.01 sec
        Start 145: s2n_sequence_number_test
145/206 Test #145: s2n_sequence_number_test .........................   Passed    0.01 sec
        Start 146: s2n_server_alpn_extension_test
146/206 Test #146: s2n_server_alpn_extension_test ...................   Passed    0.01 sec
        Start 147: s2n_server_cert_request_test
147/206 Test #147: s2n_server_cert_request_test .....................   Passed    0.01 sec
        Start 148: s2n_server_certificate_status_test
148/206 Test #148: s2n_server_certificate_status_test ...............   Passed    0.01 sec
        Start 149: s2n_server_early_data_indication_test
149/206 Test #149: s2n_server_early_data_indication_test ............   Passed    0.01 sec
        Start 150: s2n_server_extensions_test
150/206 Test #150: s2n_server_extensions_test .......................   Passed    0.01 sec
        Start 151: s2n_server_hello_retry_test
151/206 Test #151: s2n_server_hello_retry_test ......................   Passed    0.04 sec
        Start 152: s2n_server_hello_test
152/206 Test #152: s2n_server_hello_test ............................   Passed    0.06 sec
        Start 153: s2n_server_key_share_extension_test
153/206 Test #153: s2n_server_key_share_extension_test ..............***Exception: Illegal  0.08 sec
        Start 154: s2n_server_max_frag_len_extension_test
154/206 Test #154: s2n_server_max_frag_len_extension_test ...........   Passed    0.02 sec
        Start 155: s2n_server_new_session_ticket_test
155/206 Test #155: s2n_server_new_session_ticket_test ...............   Passed    0.07 sec
        Start 156: s2n_server_psk_extension_test
156/206 Test #156: s2n_server_psk_extension_test ....................   Passed    0.01 sec
        Start 157: s2n_server_renegotiation_info_test
157/206 Test #157: s2n_server_renegotiation_info_test ...............   Passed    0.01 sec
        Start 158: s2n_server_sct_list_extension_test
158/206 Test #158: s2n_server_sct_list_extension_test ...............   Passed    0.01 sec
        Start 159: s2n_server_server_name_extension_test
159/206 Test #159: s2n_server_server_name_extension_test ............   Passed    0.01 sec
        Start 160: s2n_server_session_ticket_extension_test
160/206 Test #160: s2n_server_session_ticket_extension_test .........   Passed    0.01 sec
        Start 161: s2n_server_signature_algorithms_extension_test
161/206 Test #161: s2n_server_signature_algorithms_extension_test ...   Passed    0.01 sec
        Start 162: s2n_server_status_request_extension_test
162/206 Test #162: s2n_server_status_request_extension_test .........   Passed    0.01 sec
        Start 163: s2n_server_supported_versions_extension_test
163/206 Test #163: s2n_server_supported_versions_extension_test .....   Passed    0.01 sec
        Start 164: s2n_session_ticket_test
164/206 Test #164: s2n_session_ticket_test ..........................   Passed    0.12 sec
        Start 165: s2n_set_test
165/206 Test #165: s2n_set_test .....................................   Passed    0.01 sec
        Start 166: s2n_shutdown_test
166/206 Test #166: s2n_shutdown_test ................................   Passed    0.01 sec
        Start 167: s2n_signature_algorithms_test
167/206 Test #167: s2n_signature_algorithms_test ....................   Passed    0.04 sec
        Start 168: s2n_ssl_prf_test
168/206 Test #168: s2n_ssl_prf_test .................................   Passed    0.01 sec
        Start 169: s2n_stacktrace_test
169/206 Test #169: s2n_stacktrace_test ..............................   Passed    0.01 sec
        Start 170: s2n_str_test
170/206 Test #170: s2n_str_test .....................................   Passed    0.01 sec
        Start 171: s2n_stream_cipher_null_test
171/206 Test #171: s2n_stream_cipher_null_test ......................   Passed    0.01 sec
        Start 172: s2n_stuffer_base64_test
172/206 Test #172: s2n_stuffer_base64_test ..........................   Passed    0.01 sec
        Start 173: s2n_stuffer_hex_test
173/206 Test #173: s2n_stuffer_hex_test .............................   Passed    0.01 sec
        Start 174: s2n_stuffer_network_order_test
174/206 Test #174: s2n_stuffer_network_order_test ...................   Passed    0.04 sec
        Start 175: s2n_stuffer_test
175/206 Test #175: s2n_stuffer_test .................................   Passed    0.01 sec
        Start 176: s2n_stuffer_text_test
176/206 Test #176: s2n_stuffer_text_test ............................   Passed    0.01 sec
        Start 177: s2n_testlib_test
177/206 Test #177: s2n_testlib_test .................................   Passed    0.01 sec
        Start 178: s2n_timer_test
178/206 Test #178: s2n_timer_test ...................................   Passed    0.01 sec
        Start 179: s2n_tls12_handshake_test
179/206 Test #179: s2n_tls12_handshake_test .........................   Passed    0.01 sec
        Start 180: s2n_tls13_cert_request_extensions_test
180/206 Test #180: s2n_tls13_cert_request_extensions_test ...........   Passed    0.01 sec
        Start 181: s2n_tls13_cert_request_test
181/206 Test #181: s2n_tls13_cert_request_test ......................   Passed    0.01 sec
        Start 182: s2n_tls13_cert_verify_test
182/206 Test #182: s2n_tls13_cert_verify_test .......................   Passed    0.04 sec
        Start 183: s2n_tls13_client_finished_test
183/206 Test #183: s2n_tls13_client_finished_test ...................   Passed    0.01 sec
        Start 184: s2n_tls13_compute_shared_secret_test
184/206 Test #184: s2n_tls13_compute_shared_secret_test .............   Passed    0.01 sec
        Start 185: s2n_tls13_cookie_test
185/206 Test #185: s2n_tls13_cookie_test ............................   Passed    0.01 sec
        Start 186: s2n_tls13_handshake_early_data_test
186/206 Test #186: s2n_tls13_handshake_early_data_test ..............   Passed    0.37 sec
        Start 187: s2n_tls13_handshake_state_machine_test
187/206 Test #187: s2n_tls13_handshake_state_machine_test ...........   Passed    0.01 sec
        Start 188: s2n_tls13_handshake_test
188/206 Test #188: s2n_tls13_handshake_test .........................   Passed    0.04 sec
        Start 189: s2n_tls13_hybrid_shared_secret_test
189/206 Test #189: s2n_tls13_hybrid_shared_secret_test ..............   Passed    0.01 sec
        Start 190: s2n_tls13_keys_test
190/206 Test #190: s2n_tls13_keys_test ..............................   Passed    0.01 sec
        Start 191: s2n_tls13_new_session_ticket_test
191/206 Test #191: s2n_tls13_new_session_ticket_test ................   Passed    0.02 sec
        Start 192: s2n_tls13_parse_record_type_test
192/206 Test #192: s2n_tls13_parse_record_type_test .................   Passed    0.01 sec
        Start 193: s2n_tls13_pq_handshake_test
193/206 Test #193: s2n_tls13_pq_handshake_test ......................   Passed    0.13 sec
        Start 194: s2n_tls13_prf_test
194/206 Test #194: s2n_tls13_prf_test ...............................   Passed    0.01 sec
        Start 195: s2n_tls13_record_aead_test
195/206 Test #195: s2n_tls13_record_aead_test .......................   Passed    0.01 sec
        Start 196: s2n_tls13_server_cert_test
196/206 Test #196: s2n_tls13_server_cert_test .......................   Passed    0.01 sec
        Start 197: s2n_tls13_server_finished_test
197/206 Test #197: s2n_tls13_server_finished_test ...................   Passed    0.01 sec
        Start 198: s2n_tls13_support_test
198/206 Test #198: s2n_tls13_support_test ...........................   Passed    0.01 sec
        Start 199: s2n_tls13_zero_length_payload_test
199/206 Test #199: s2n_tls13_zero_length_payload_test ...............   Passed    0.01 sec
        Start 200: s2n_tls_hybrid_prf_test
200/206 Test #200: s2n_tls_hybrid_prf_test ..........................   Passed    0.01 sec
        Start 201: s2n_tls_prf_test
201/206 Test #201: s2n_tls_prf_test .................................   Passed    0.01 sec
        Start 202: s2n_tls_record_stuffer_test
202/206 Test #202: s2n_tls_record_stuffer_test ......................   Passed    0.00 sec
        Start 203: s2n_utils_test
203/206 Test #203: s2n_utils_test ...................................   Passed    0.01 sec
        Start 204: s2n_wildcard_hostname_test
204/206 Test #204: s2n_wildcard_hostname_test .......................   Passed    0.01 sec
        Start 205: s2n_x509_validator_certificate_signatures_test
205/206 Test #205: s2n_x509_validator_certificate_signatures_test ...   Passed    0.02 sec
        Start 206: s2n_x509_validator_test
206/206 Test #206: s2n_x509_validator_test ..........................   Passed    0.04 sec

98% tests passed, 5 tests failed out of 206

Total Test time (real) = 151.32 sec

The following tests FAILED:
	 32 - s2n_client_key_share_extension_pq_test (ILLEGAL)
	 87 - s2n_kex_with_kem_test (ILLEGAL)
	103 - s2n_pq_kem_kat_test (ILLEGAL)
	104 - s2n_pq_kem_test (ILLEGAL)
	153 - s2n_server_key_share_extension_test (ILLEGAL)
Errors while running CTest
Output from these tests are in: /build/s2n-tls/src/s2n-tls-1.0.18/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
make: *** [Makefile:112: test] Error 8
[1m[31m==> ERROR:(B[m[1m A failure occurred in check().(B[m
[1m    Aborting...(B[m

This is being run on a Zen 3 system which does not have avx512 but does have vpclmulqdq.
pq-crypto/s2n_pq.c contains:

....
 S2N_RESULT s2n_try_enable_bike_r3_opt_vpclmul() {
    /* When VPCLMUL is available, AVX512 is too by default. */
     RESULT_ENSURE_OK(s2n_try_enable_bike_r3_opt_avx512(), S2N_ERR_SAFETY);
    if (s2n_pq_is_enabled() && s2n_cpu_supports_bike_r3_vpclmul()) {

So it appears the ilegal instruction is the use of an avx512 instruction which the code assumed would be supported because the system has vpclmulqdq.

diff --git a/pq-crypto/s2n_pq.c b/pq-crypto/s2n_pq.c
index 1ac9ebf..eaebe2b 100644
--- a/pq-crypto/s2n_pq.c
+++ b/pq-crypto/s2n_pq.c
@@ -267,9 +267,9 @@ S2N_RESULT s2n_try_enable_bike_r3_opt_avx512() {
 }
 
 S2N_RESULT s2n_try_enable_bike_r3_opt_vpclmul() {
-    /* When VPCLMUL is available, AVX512 is too by default. */
+    /* When VPCLMUL is available, AVX512 is too by default but not on AMD. */
     RESULT_ENSURE_OK(s2n_try_enable_bike_r3_opt_avx512(), S2N_ERR_SAFETY);
-    if (s2n_pq_is_enabled() && s2n_cpu_supports_bike_r3_vpclmul()) {
+    if (s2n_pq_is_enabled() && s2n_cpu_supports_bike_r3_avx512() && s2n_cpu_supports_bike_r3_vpclmul()) {
         bike_r3_vpclmul_enabled = true;
     }
     return S2N_RESULT_OK;

The above patch does fix the issue on my system.  I would like to have some feedback from systems with avx512 or without avx512 and without vpclmulqdq.

Offline

#2 2021-09-11 14:37:38

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,496

Re: s2ntls-1.0.18 failing chick with ilegal instruction AVX512 related

Threadripper 1920x , no avx512 , no vpclmul

Build succeeds with and without s2n_pq.c


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-09-13 15:36:51

loqs
Member
Registered: 2014-03-06
Posts: 13,940

Re: s2ntls-1.0.18 failing chick with ilegal instruction AVX512 related

Offline

Board footer

Powered by FluxBB