Print this page
fixup .text where possible
additional style updates in crypto
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/crypto/io/dca.c
          +++ new/usr/src/uts/common/crypto/io/dca.c
↓ open down ↓ 146 lines elided ↑ open up ↑
 147  147  
 148  148  extern struct mod_ops mod_cryptoops;
 149  149  
 150  150  static struct modlcrypto modlcrypto = {
 151  151          &mod_cryptoops,
 152  152          IDENT3
 153  153  };
 154  154  
 155  155  static struct modlinkage modlinkage = {
 156  156          MODREV_1,               /* ml_rev */
 157      -        &modldrv,               /* ml_linkage */
 158      -        &modlcrypto,
 159      -        NULL
      157 +        {   &modldrv,           /* ml_linkage */
      158 +            &modlcrypto,
      159 +            NULL }
 160  160  };
 161  161  
 162  162  /*
 163  163   * CSPI information (entry points, provider info, etc.)
 164  164   */
 165  165  
 166  166  /* Mechanisms for the symmetric cipher provider */
 167  167  static crypto_mech_info_t dca_mech_info_tab1[] = {
 168  168          /* DES-CBC */
 169  169          {SUN_CKM_DES_CBC, DES_CBC_MECH_INFO_TYPE,
↓ open down ↓ 174 lines elided ↑ open up ↑
 344  344  
 345  345  int dca_free_context(crypto_ctx_t *);
 346  346  
 347  347  static crypto_ctx_ops_t dca_ctx_ops = {
 348  348          NULL,
 349  349          dca_free_context
 350  350  };
 351  351  
 352  352  /* Operations for the symmetric cipher provider */
 353  353  static crypto_ops_t dca_crypto_ops1 = {
 354      -        &dca_control_ops,
 355      -        NULL,                           /* digest_ops */
 356      -        &dca_cipher_ops,
 357      -        NULL,                           /* mac_ops */
 358      -        NULL,                           /* sign_ops */
 359      -        NULL,                           /* verify_ops */
 360      -        NULL,                           /* dual_ops */
 361      -        NULL,                           /* cipher_mac_ops */
 362      -        NULL,                           /* random_number_ops */
 363      -        NULL,                           /* session_ops */
 364      -        NULL,                           /* object_ops */
 365      -        NULL,                           /* key_ops */
 366      -        &dca_provmanage_ops_1,          /* management_ops */
 367      -        &dca_ctx_ops
      354 +        .co_control_ops = &dca_control_ops,
      355 +        .co_digest_ops = NULL,
      356 +        .co_cipher_ops = &dca_cipher_ops,
      357 +        .co_mac_ops = NULL,
      358 +        .co_sign_ops = NULL,
      359 +        .co_verify_ops = NULL,
      360 +        .co_dual_ops = NULL,
      361 +        .co_dual_cipher_mac_ops = NULL,
      362 +        .co_random_ops = NULL,
      363 +        .co_session_ops = NULL,
      364 +        .co_object_ops = NULL,
      365 +        .co_key_ops = NULL,
      366 +        .co_provider_ops = &dca_provmanage_ops_1,
      367 +        .co_ctx_ops = &dca_ctx_ops
 368  368  };
 369  369  
 370  370  /* Operations for the asymmetric cipher provider */
 371      -static crypto_ops_t dca_crypto_ops2 = {
      371 +static crypto_ops_t dca_crypto_ops2 = { .cou.cou_v1 = {
 372  372          &dca_control_ops,
 373  373          NULL,                           /* digest_ops */
 374  374          &dca_cipher_ops,
 375  375          NULL,                           /* mac_ops */
 376  376          &dca_sign_ops,
 377  377          &dca_verify_ops,
 378  378          NULL,                           /* dual_ops */
 379  379          NULL,                           /* cipher_mac_ops */
 380  380          &dca_random_number_ops,
 381  381          NULL,                           /* session_ops */
 382  382          NULL,                           /* object_ops */
 383  383          NULL,                           /* key_ops */
 384  384          &dca_provmanage_ops_2,          /* management_ops */
 385  385          &dca_ctx_ops
 386      -};
      386 +}};
 387  387  
 388  388  /* Provider information for the symmetric cipher provider */
 389      -static crypto_provider_info_t dca_prov_info1 = {
      389 +static crypto_provider_info_t dca_prov_info1 = {{{{
 390  390          CRYPTO_SPI_VERSION_1,
 391  391          NULL,                           /* pi_provider_description */
 392  392          CRYPTO_HW_PROVIDER,
 393      -        NULL,                           /* pi_provider_dev */
      393 +        { NULL },                       /* pi_provider_dev */
 394  394          NULL,                           /* pi_provider_handle */
 395  395          &dca_crypto_ops1,
 396  396          sizeof (dca_mech_info_tab1)/sizeof (crypto_mech_info_t),
 397  397          dca_mech_info_tab1,
 398  398          0,                              /* pi_logical_provider_count */
 399  399          NULL                            /* pi_logical_providers */
 400      -};
      400 +}}}};
 401  401  
 402  402  /* Provider information for the asymmetric cipher provider */
 403      -static crypto_provider_info_t dca_prov_info2 = {
      403 +static crypto_provider_info_t dca_prov_info2 = {{{{
 404  404          CRYPTO_SPI_VERSION_1,
 405  405          NULL,                           /* pi_provider_description */
 406  406          CRYPTO_HW_PROVIDER,
 407      -        NULL,                           /* pi_provider_dev */
      407 +        { NULL },                       /* pi_provider_dev */
 408  408          NULL,                           /* pi_provider_handle */
 409  409          &dca_crypto_ops2,
 410  410          sizeof (dca_mech_info_tab2)/sizeof (crypto_mech_info_t),
 411  411          dca_mech_info_tab2,
 412  412          0,                              /* pi_logical_provider_count */
 413  413          NULL                            /* pi_logical_providers */
 414      -};
      414 +}}}};
 415  415  
 416  416  /* Convenience macros */
 417  417  #define DCA_SOFTC_FROM_CTX(ctx) ((dca_t *)(ctx)->cc_provider)
 418  418  #define DCA_MECH_FROM_CTX(ctx) \
 419  419          (((dca_request_t *)(ctx)->cc_provider_private)->dr_ctx.ctx_cm_type)
 420  420  
 421  421  static int dca_bindchains_one(dca_request_t *reqp, size_t cnt, int dr_offset,
 422  422      caddr_t kaddr, ddi_dma_handle_t handle, uint_t flags,
 423  423      dca_chain_t *head, int *n_chain);
 424  424  static uint64_t dca_ena(uint64_t ena);
↓ open down ↓ 4533 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX