Thread (31 messages) 31 messages, 7 authors, 2021-09-03

Re: [RFCv3 05/15] tcp: authopt: Add crypto initialization

flat view

From: Eric Dumazet <hidden>
Date: 2021-08-24 23:35:05
Also in: linux-crypto, linux-kselftest, lkml


On 8/24/21 2:34 PM, Leonard Crestez wrote:
The crypto_shash API is used in order to compute packet signatures. The
API comes with several unfortunate limitations:

1) Allocating a crypto_shash can sleep and must be done in user context.
2) Packet signatures must be computed in softirq context
3) Packet signatures use dynamic "traffic keys" which require exclusive
access to crypto_shash for crypto_setkey.

The solution is to allocate one crypto_shash for each possible cpu for
each algorithm at setsockopt time. The per-cpu tfm is then borrowed from
softirq context, signatures are computed and the tfm is returned.
I could not see the per-cpu stuff that you mention in the changelog.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help