On 8/30/2020 7:24 PM, David Arnold
wrote:
Hot-plugging the pointer seems to force atomicity considerations down-stream, which might beeducationally a good thing for openssl to press for. It also addresses Jordan's use case, for howeverapplication specific it might be. For compat reasons, a "legacy" mode which creates a new contextfor *new* connections might be the necessary "bridge" into that transformation.
I haven't particularly thought about the implementation; that seemed like Just Work. There might need to be reference counts on the structures involved so that they can be safely "freed" while they are in active use by another thread. Simply swapping out a pointer isn't going to be enough because you can't know whether another thread already picked up a copy of that pointer and so you can't know when you can free the old structure. As I think about it more, there might be a challenge fitting such a mechanism into the existing functions.
-- Jordan Brown, Oracle ZFS Storage Appliance, Oracle Solaris