openssl/include/internal
Neil Horman 036a46d2a4 Fix failure checking on rcu_read_lock
during memfail testing:
https://github.com/openssl/openssl/actions/runs/16794088536/job/47561223902

We get lots of test failures in ossl_rcu_read_lock.  This occurs
because we have a few cases in the read lock path that attempt mallocs,
which, if they fail, trigger an assert or a silent failure, which isn't
really appropriate.  We should instead fail gracefully, by informing the
caller that the lock failed, like we do for CRYPTO_THREAD_read_lock.

Fortunately, these are all internal apis, so we can convert
ossl_rcu_read_lock to return an int indicating success/failure, and fail
gracefully during the test, rather than hitting an assert abort.

Fixes openssl/project#1315

Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28195)
2025-08-09 09:22:13 -04:00
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
asn1.h
bio.h
bio_addr.h crypto: fix missing <winsock.h> indirection inclusion. 2024-09-05 17:02:51 +02:00
bio_tfo.h Remove repeated words 2023-09-11 10:15:30 +02:00
cms.h Copyright year updates 2025-03-12 13:35:59 +00:00
common.h Nit: macro parameters should always be parenthesised in expressions 2025-06-21 12:46:01 -04:00
comp.h Copyright year updates 2024-09-05 09:35:49 +02:00
conf.h
constant_time.h Use value barrier for constant_time_cond_swap_* 2025-06-03 14:24:57 +02:00
core.h
crmf.h CMP: add support for requesting cert template using genm/genp 2024-06-20 13:38:13 +02:00
cryptlib.h Move thread-event handlers to the new thread-local api 2025-06-20 13:01:39 -04:00
dane.h
deprecated.h
der.h
deterministic_nonce.h
dso.h
dsoerr.h
e_os.h Remove _strlen31 2025-06-06 10:05:59 +02:00
e_winsock.h Move inclusion of <winsock.h> out of "e_os.h" into a dedicated header file. 2024-09-05 17:02:51 +02:00
encoder.h Move some encode helpers to crypt/encode_decode/ 2025-01-21 20:09:57 +11:00
endian.h Improve english in endian comment 2025-08-06 09:01:27 +10:00
err.h
ffc.h Fix conflicts between DH check flags and FFC check flags 2023-11-06 07:55:01 +00:00
fips.h fips: add function to detect if the self tests are running 2025-02-21 11:40:19 +11:00
hashfunc.h hashfunc: add stddef.h include 2025-04-15 15:27:38 +01:00
hashtable.h Fix failure checking on rcu_read_lock 2025-08-09 09:22:13 -04:00
hpke_util.h
json_enc.h Begin incorporating stdbool usage when json encoding 2025-06-13 11:26:46 -04:00
ktls.h Copyright year updates 2024-04-09 13:43:26 +02:00
list.h Rename list macros 2024-09-26 10:02:30 +02:00
mem_alloc_utils.h crypto/mem.c: check for overflow in size calculation in CRYPTO_aligned_alloc 2025-08-08 12:22:10 -04:00
namemap.h libapps + libcrypto: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
nelem.h
numbers.h Fixes for build failures on OS X 10.4 Tiger 2025-08-08 13:56:02 +02:00
o_dir.h
packet.h packet: add new utility function PACKET_get_4_len() 2025-07-10 19:04:37 +10:00
packet_quic.h Copyright year updates 2023-09-07 09:59:15 +01:00
param_build_set.h
params.h kdf: remove max argument to the param concatenation helper 2025-07-31 20:20:48 +02:00
passphrase.h
priority_queue.h
property.h
propertyerr.h
provider.h Ensure that our fips internal provider is always loaded 2025-04-30 10:55:44 +02:00
qlog.h Begin incorporating stdbool usage when json encoding 2025-06-13 11:26:46 -04:00
qlog_event_helpers.h Copyright year updates 2024-04-09 13:43:26 +02:00
qlog_events.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_ackm.h - changes suggested by @t8m 2025-07-27 04:48:28 -04:00
quic_cc.h QUIC Refactor: Fix ANSI - struct definition duplications 2023-12-21 08:12:06 +00:00
quic_cfq.h QUIC Refactor: Fix ANSI - struct definition duplications 2023-12-21 08:12:06 +00:00
quic_channel.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_demux.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_engine.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_error.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_fc.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_fifd.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_lcidm.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_port.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_predef.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_rcidm.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_reactor.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_reactor_wait_ctx.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_record_rx.h Ensure that the largest_pn values are migrated to our channel qrx 2025-08-07 13:16:25 -04:00
quic_record_tx.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_record_util.h Copyright year updates 2023-09-07 09:59:15 +01:00
quic_rx_depack.h Copyright year updates 2023-09-07 09:59:15 +01:00
quic_sf_list.h Copyright year updates 2023-09-07 09:59:15 +01:00
quic_srt_gen.h QUIC SRT GEN: Add SRT generator 2023-11-25 09:14:05 +00:00
quic_srtm.h Fix new typos found by codespell 2023-12-29 10:12:05 +01:00
quic_ssl.h Fix errors on SSL_accept() and SSL_get_error() 2025-04-24 20:10:44 +02:00
quic_statm.h QUIC Refactor: Fix ANSI - struct definition duplications 2023-12-21 08:12:06 +00:00
quic_stream.h QUIC Refactor: Fix ANSI - struct definition duplications 2023-12-21 08:12:06 +00:00
quic_stream_map.h Add stream type flags to SSL_accept_stream 2025-07-02 20:55:24 -04:00
quic_thread_assist.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_tls.h Reset qtls->local_transport_params_consumed to 0 on SSL_clear() 2025-06-03 18:29:21 +02:00
quic_trace.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_tserver.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_txp.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_txpim.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_types.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_vlint.h libapps + libcrypto: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
quic_wire.h Copyright year updates 2023-09-07 09:59:15 +01:00
quic_wire_pkt.h libssl: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
rcu.h Fix failure checking on rcu_read_lock 2025-08-09 09:22:13 -04:00
recordmethod.h Copyright year updates 2025-03-12 13:35:59 +00:00
refcount.h Fix potential use-after-free in REF_PRINT_COUNT 2024-12-10 14:58:08 +01:00
ring_buf.h Copyright year updates 2023-09-07 09:59:15 +01:00
rio_notifier.h Copyright year updates 2025-03-12 13:35:59 +00:00
safe_math.h safe_math.h: Check if __GNUC__ is defined 2024-12-19 17:45:48 +01:00
sha3.h Copyright year updates 2024-09-05 09:35:49 +02:00
sizes.h Copyright year updates 2025-03-12 13:35:59 +00:00
skey.h Add generic secret skeymgmt provider, skey abstraction and default skeymgmt 2025-02-15 18:51:30 +01:00
sm3.h
sockets.h Wrap use of poll.h to prevent including on NonStop. 2025-03-14 07:40:40 -04:00
ssl.h Fix the use of CCM ciphersuites with QUIC TLS API 2025-03-20 11:24:26 +01:00
ssl3_cbc.h Copyright year updates 2023-09-07 09:59:15 +01:00
ssl_unwrap.h Copyright year updates 2025-03-12 13:35:59 +00:00
sslconf.h
statem.h Move the Handshake read secret change earlier in the process for QUIC 0-RTT 2025-03-20 20:22:39 +01:00
symhacks.h
thread.h
thread_arch.h Copyright year updates 2024-04-09 13:43:26 +02:00
thread_once.h
threads_common.h Restore use of crypto_thread_default_context 2025-06-20 13:01:39 -04:00
time.h crypto: fix missing <winsock.h> indirection inclusion. 2024-09-05 17:02:51 +02:00
tlsgroups.h Copyright year updates 2025-03-12 13:35:59 +00:00
to_hex.h ssl: factorize and improved hex conversion code 2024-08-07 19:25:10 +02:00
tsan_assist.h libapps + libcrypto: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
uint_set.h
unicode.h