svn commit: r336439 - in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/hifn sys/dev/safe sys/dev/s...

Andrey V. Elsukov bu7cher at yandex.ru
Fri Aug 17 13:02:43 UTC 2018


On 18.07.2018 03:56, Conrad Meyer wrote:
> Author: cem
> Date: Wed Jul 18 00:56:25 2018
> New Revision: 336439
> URL: https://svnweb.freebsd.org/changeset/base/336439
> 
> Log:
>   OpenCrypto: Convert sessions to opaque handles instead of integers
>   
>   Track session objects in the framework, and pass handles between the
>   framework (OCF), consumers, and drivers.  Avoid redundancy and complexity in
>   individual drivers by allocating session memory in the framework and
>   providing it to drivers in ::newsession().

Hi,

this produces WITNESS warning, since crypto_newsession() allocates
memory with M_WAITOK flag while xform_init() holds mutex:

uma_zalloc_arg: zone "crypto_session" with the following non-sleepable
locks held:
exclusive sleep mutex xforms_list (IPsec transforms list) r = 0
(0xffffffff81fdb840) locked @
/home/devel/freebsd/base/head/sys/netipsec/key.c:8676
stack backtrace:
#0 0xffffffff80c01643 at witness_debugger+0x73
#1 0xffffffff80c02a21 at witness_warn+0x461
#2 0xffffffff80ed98a8 at uma_zalloc_arg+0x38
#3 0xffffffff80e4a0ca at crypto_newsession+0x1ea
#4 0xffffffff80e3994c at esp_init+0x37c
#5 0xffffffff80e31e68 at key_setsaval+0x7f8
#6 0xffffffff80e307e2 at key_newsav+0x302
#7 0xffffffff80e2ba0d at key_add+0x53d
#8 0xffffffff80e263f5 at key_parse+0xac5
#9 0xffffffff80c34dc7 at sosend_generic+0x447
#10 0xffffffff80c34ffd at sosend+0x6d
#11 0xffffffff80c3c170 at kern_sendit+0x240
#12 0xffffffff80c3c4be at sendit+0x19e
#13 0xffffffff80c3c30d at sys_sendto+0x4d
#14 0xffffffff8107e9c1 at amd64_syscall+0x281
#15 0xffffffff8105846d at fast_syscall_common+0x101

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20180817/1bd586db/attachment.sig>


More information about the svn-src-head mailing list