freebsd-src/sys/crypto
Mark Johnston 6b635c74fd aesni: Push FPU sections down further
After commit 937b4473be aesni_cipher_crypt() and aesni_cipher_mac()
execute in a FPU_KERN_NOCTX section, which means that they must run with
preemption disabled.  These functions handle discontiguous I/O buffers
by allocating a contiguous buffer and copying as necessary, but this
allocation cannot happen with preemption disabled.  Fix the problem by
pushing the FPU section down into aesni_cipher_crypt() and
aesni_cipher_mac().  In particular, encrypt-then-auth transforms need
not be handled with a single FPU section.

Reported by:	syzbot+78258dbb02eb92157357@syzkaller.appspotmail.com
Discussed with:	jhb
Fixes:		937b4473be ("aesni: Switch to using FPU_KERN_NOCTX.")
2023-08-28 21:26:53 -04:00
..
aesni aesni: Push FPU sections down further 2023-08-28 21:26:53 -04:00
armv8 armv8_crypto: Remove dieing flag and rw lock 2023-08-28 16:23:43 -07:00
blake2 blake2: Remove dieing flag and rw lock 2023-08-28 16:24:42 -07:00
camellia sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ccp sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
chacha20 sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
des sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
libsodium sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
openssl sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rc4 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rijndael sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
sha2 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
siphash sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
skein sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
via padlock: Switch to using FPU_KERN_NOCTX 2023-08-25 12:34:05 -07:00
chacha20_poly1305.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
chacha20_poly1305.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
curve25519.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
curve25519.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
intake.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sha1.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
sha1.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00