Module Name: src Committed By: snj Date: Wed Jul 5 20:19:22 UTC 2017
Modified Files: src/sys/opencrypto [netbsd-8]: crypto.c cryptodev.c cryptodev.h cryptosoft.c src/sys/rump/dev/lib/libopencrypto [netbsd-8]: opencrypto_component.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #97): sys/opencrypto/crypto.c: 1.87-1.91 sys/opencrypto/cryptodev.c: 1.93-1.95 sys/opencrypto/cryptodev.h: 1.37 sys/opencrypto/cryptosoft.c: 1.52 sys/rump/dev/lib/libopencrypto/opencrypto_component.c: 1.5 sanitize count used for kmem_alloc size. Hmm, who uses CIOCNGSESSION, CIOCNFSESSION, CIOCNCRYPTM or CIOCNFKEYM? -- sanitize in CIOCNCRYPTM and initialize comp_alg in CIOCNGSESSION -- must release cap->cc_lock before calling cap->cc_newsession() because of spinlock. -- refactor crypto_newsession() like FreeBSD. -- support multiple encryption drivers (port from FreeBSD). -- Divide crp_devflags from crp_flags to write exclusively. CRYPTO_F_DQRETQ(new name is CRYPTODEV_F_RET) is used by cryptodev.c only. It should be divided to other member. -- Reduce crypto_ret_q_mtx lock regions. crypto.c does not access the members of crp when the crp is in crp_q or crp_ret_q. Furthermore, crp_q and crp_ret_q are protected by each mutex, so the members of crp is not shared. That means crp_flags is not required mutex in crypto.c. -- fix cryptosoft.c:r1.51 mistake. swcrypto_attach() must not be called from module_init_class(). swcrypto_attach() will call softint_establish(), it must be called after cpus attached. module_init_class() is too early to call softint_establish(). -- simplify mutex_enter/exit(crypto_q_mtx), and fix missing exit. -- reduce rump waring message. pointed out by ozaki-r@n.o, thanks. To generate a diff of this commit: cvs rdiff -u -r1.78.2.1 -r1.78.2.2 src/sys/opencrypto/crypto.c cvs rdiff -u -r1.92 -r1.92.2.1 src/sys/opencrypto/cryptodev.c cvs rdiff -u -r1.34.2.1 -r1.34.2.2 src/sys/opencrypto/cryptodev.h cvs rdiff -u -r1.51 -r1.51.2.1 src/sys/opencrypto/cryptosoft.c cvs rdiff -u -r1.4 -r1.4.10.1 \ src/sys/rump/dev/lib/libopencrypto/opencrypto_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.