[openssl/openssl] ddb81a: "Reserve" the method store when constructing methods

Richard Levitte noreply at reply.github.openssl.org
Wed Jul 20 06:29:48 UTC 2022


  Branch: refs/heads/openssl-3.0
  Home:   https://github.openssl.org/openssl/openssl
  Commit: ddb81a94ac8af145750940c20999ac952165bf10
      https://github.openssl.org/openssl/openssl/commit/ddb81a94ac8af145750940c20999ac952165bf10
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2022-07-20 (Wed, 20 Jul 2022)

  Changed paths:
    M crypto/core_algorithm.c
    M crypto/core_fetch.c
    M crypto/encode_decode/decoder_meth.c
    M crypto/encode_decode/encoder_meth.c
    M crypto/evp/evp_fetch.c
    M crypto/property/property.c
    M crypto/store/store_meth.c
    M include/internal/core.h
    M include/internal/property.h

  Log Message:
  -----------
  "Reserve" the method store when constructing methods

Introducing the concept of reserving the store where a number of
provided operation methods are to be stored.

This avoids racing when constructing provided methods, which is
especially pertinent when multiple threads are trying to fetch the
same method, or even any implementation for the same given operation
type.

This introduces a |biglock| in OSSL_METHOD_STORE, which is separate
from the |lock| which is used for more internal and finer grained
locking.

Fixes #18152

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18153)

(cherry picked from commit e1eafe8c87612a94552e9ad5df56c489cb6f0ff2)




More information about the openssl-commits mailing list