Consumers of the Kernel Cryptographic API that uses sessions versus those that do not have slightly different requirements for notification of events related to crypto providers. Consumers that use sessions to specific hardware providers need to know when providers come and go - since this usually maps directly to availablity of key material. KSSL is one such example. Consumers that are sessionless, ie those that left kcf schedule for them, only care about what cryptographic mechanisms (algorithm, mode and keylength) are available not which providers are available (they don't even care about hardware vs software). Which mechanisms are available can change based on hardware or software registering or unregistering but also as a result of policy changes by adminstrators using cryptoadm(1M). KSSL can be sessionless or use specific providers depending on the location of the key material. IPsec is always sessionless (long term keys on specific providers are handled by IKE in userland). This proposal extends the, currently Consolidation Private, KCFAPI for event notification to give both consumers what they really need. The original notification flag CRYPTO_EVENT_PROVIDERS_CHANGE was named incorrectly and is being renamed CRYPTO_EVENT_MECHS_CHANGED. The structure it uses stays the same. This will be a binary compatible change and all existing consumers are in the ON consolidation and will be changed to use the new name. This is intended to be used mostly by sessionless consumers. Two new notification flags are introduced CRYPTO_EVENT_PROVIDER_REGISTERED and CRYPTO_EVENT_PROVIDER_UNREGISTERED for the consumers interested in specific providers. The diff marked crypto_notify_events(9F) in materials/crypto_notify_events_9f describes all the events. The KSSL consumer currently uses crypto_get_provider(9F) to find a crypto_provider_t by "name". The KCFAPI has no inverse function to get the information about a provider given its crypto_provider_t handle. This proposal adds crypto_get_provinfo(9F), described in materials/crypto_get_provider_9f, to meet the needs of KSSL and future consumers. It is roughly analgous to a combination of the userland PKCS#11 C_GetInfo/C_GetSlotInfo/C_GetTokenInfo calls and returns the same crypto_provider_ext_info_t structure that drv/crypto uses in servicing the information in those to userland. Exported Interface Table +------------------------------------+-----------------------------------+ | crypto_get_provinfo(9F) | Consolidation Private | | CRYPTO_EVENT_PROVIDERS_CHANGE | Removed was Consolidation Private | | CRYPTO_EVENT_MECHS_CHANGED | Consolidation Private | | CRYPTO_EVENT_PROVIDER_REGISTERED | Consolidation Private | | CRYPTO_EVENT_PROVIDER_UNREGISTERED | Consolidation Private | +------------------------------------+-----------------------------------+