.
See the security blog for information on the impact on other Sun products.
.
See the security blog for information on the impact on other Sun products.
Just a heads up that the KSSL IPv6 support RFE went in to snv_124. SSL servers - web servers like SJS web server and Apache web server, and application servers like Sun Glassfish and IBM Websphere, serving IPv6 addresses will now be able to offload the SSL processing to KSSL.
A side benefit of this change is that Apache httpd.conf works
even with the directive "Listen <proxy_port>".
Previously, one
needed to do "Listen 0.0.0.0:<proxy_port>".
The following numbers from a kernel micro benchmark run on a T5440 show that the crypto stack scales nicely in the current build, snv_117. This micro benchmark calls crypto_encrypt() in a loop for CKM_AES_CBC mechanism with a 128-bit key.
#modload saes_scale_atomic (8192 byte input data size, crypto_encrypt() atomic call, in-place)
|
# Threads |
Throughput in MBytes/sec |
|---|---|
|
1 |
400 |
|
8 |
3189 |
|
16 |
6331 |
|
32 |
12663 |
|
64 |
14344 |
|
128 |
8920 |
|
256 |
7483 |
So, why the decrease after 64 threads? It turned it is because of too many thread context switches caused by the threads cv_wait'ing on a CWQ. Incidentally, there are 32 CWQ units on a T5440. I added the following line in n2cp.conf and redid the above tests -
n2cp-sync-threads=8;
#modload saes_scale_atomic (8192 byte input data size, crypto_encrypt() atomic call, in-place)
|
# Threads |
Throughput in MBytes/sec |
|---|---|
|
1 |
400 |
|
8 |
3189 |
|
16 |
6331 |
|
32 |
12663 |
|
64 |
15109 |
|
128 |
18363 |
|
256 |
22932 |
There is a penalty for setting the spinners to 8 though, which is increased CPU consumption. In practice, a workload is unlikely to have more than 64 threads all doing crypto_encrypt() at the same instant. So, the default value of 1 will work fine.
The following para from a paper by Bryan Cantrill and Jeff Bonwick captures my state of mind this week -
Prepare for the thrill of victory—and the agony of
defeat. Making a system scale can be a frustrating pursuit:
the system will not scale until all impediments to scal-
ability have been removed, but it is often impossible to
know if the current impediment to scalability is the last
one. Removing that last impediment is incredibly gratify-
ing: with that change, throughput finally gushes through
the system as if through an open sluice.
I will follow up with details in my next post!
. In this post, I will cover existing documentation for this feature.
2826 AH_INIT_CALLREQ(&call_req);
2827
2828 ii->ipsec_in_skip_len = skip_len;
2829
2830 IPSEC_CTX_TMPL(assoc, ipsa_authtmpl, IPSEC_ALG_AUTH, ctx_tmpl);
2831
2832 /* call KEF to do the MAC operation */
2833 kef_rc = crypto_mac_verify(&assoc->ipsa_amech,
2834 &ii->ipsec_in_crypto_data, &assoc->ipsa_kcfauthkey, ctx_tmpl,
2835 &ii->ipsec_in_crypto_mac, &call_req);
2836
2837 switch (kef_rc) {
2838 case CRYPTO_SUCCESS:
2839 AH_BUMP_STAT(crypto_sync);
2840 return (ah_auth_in_done(ipsec_mp));
2841 case CRYPTO_QUEUED:
2842 /* ah_callback() will be invoked on completion */
2843 AH_BUMP_STAT(crypto_async);
2844 return (IPSEC_STATUS_PENDING);
2845 case CRYPTO_INVALID_MAC:
2846 AH_BUMP_STAT(crypto_sync);
2847 ah_log_bad_auth(ipsec_mp);
2848 return (IPSEC_STATUS_FAILED);
2849 }
2777 #define AH_INIT_CALLREQ(_cr) { \
2778 (_cr)->cr_flag = CRYPTO_SKIP_REQID|CRYPTO_RESTRICTED; \
2779 if (ipsec_algs_exec_mode[IPSEC_ALG_AUTH] == IPSEC_ALGS_EXEC_ASYNC) \
2780 (_cr)->cr_flag |= CRYPTO_ALWAYS_QUEUE; \
2781 (_cr)->cr_callback_arg = ipsec_mp; \
2782 (_cr)->cr_callback_func = ah_kcf_callback; \
2783 }
crypto_digest()
crypto_digest_init(), crypto_digest_update(),
crypto_digest_final()int crypto_digest(crypto_mechanism_t *mech,
crypto_data_t *data, crypto_data_t *digest, crypto_call_req_t *cr);
692
rv = crypto_digest(&mech, &d1, &d2, NULL);
672
mech.cm_type = digest_type;
673
mech.cm_param = 0;
674
mech.cm_param_len = 0;294
sha1_hash_mech = crypto_mech2id(SUN_CKM_SHA1); 676
v1.iov_base = (void *)input;
677
v1.iov_len = inlen;
678
679
d1.cd_format = CRYPTO_DATA_RAW;
680
d1.cd_offset = 0;
681
d1.cd_length = v1.iov_len;
682
d1.cd_raw = v1;
684
v2.iov_base = (void *)output;
685
v2.iov_len = hashlen;
686
687
d2.cd_format = CRYPTO_DATA_RAW;
688
d2.cd_offset = 0;
689
d2.cd_length = v2.iov_len;
690
d2.cd_raw = v2;