Subject: PSARC FastTrack [closed-approved-automatic]: Crypto event notification update

I'm submitting this as closed-approved-automatic since all the interfaces
are consolidation private and there are no compatibility issues.

Template Version: @(#)sac_nextcase %I% %G% SMI
1. Introduction
    1.1. Project/Component Working Name:
	 Crypto event notification update
    1.2. Name of Document Author/Supplier:
	 Author:  Krishna Yenduri
    1.3  Date of This Document:
	14 September, 2006
4. Technical Description

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             |
+------------------------------------+-----------------------------------+


6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: FastTrack
