Commit Graph

12 Commits

Author SHA1 Message Date
pgoyette
d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
riastradh
0090c87fd5 Avoid another userland-controlled integer overflow.
From Ilja Van Sprundel.
2017-07-28 17:14:04 +00:00
riastradh
027f8447ce Avert userland-controlled integer overflow.
From Ilja Van Sprundel.
2017-07-28 14:16:29 +00:00
riastradh
0633411db6 Don't disclose uninitialized 32-bit word if cryptodev_session fails.
From Ilja Van Sprundel.
2017-07-28 14:13:56 +00:00
knakahara
6623cb2c35 rename crypto_mtx to cryptodev_mtx
It is used by cryptodev.c and ocryptodev.c only.
2017-06-02 09:46:57 +00:00
knakahara
c4e549c723 opencrypto: cleanup debug messages. 2017-05-17 06:33:04 +00:00
matt
68a7688ef0 Try not to use f_data, use f_fcrypt to get a correctly typed pointer. 2014-09-05 09:23:40 +00:00
pgoyette
2dd4f4d91a Modularize the opencrypto components and link to the build 2014-01-01 16:06:00 +00:00
drochner
efd342eb96 split the "crypto_mtx" spinlock into 3: one spinlock each for
the incoming and outgoing request queues (which can be dealt with
by hardware accelerators) and an adaptive lock for "all the rest"
(mostly driver configuration, but also some unrelated stuff in
cryptodev.c which should be revisited)
The latter one seems to be uneeded at many places, but for now I've
done simple replacements only, except minor fixes (where
softint_schedule() was called without the lock held)
2011-05-16 10:27:49 +00:00
drochner
c3a6a9f41e make the compatibility code conditional on COMPAT_50 2011-02-19 16:26:34 +00:00
mrg
b73a4b4545 avoid a useless uninitialised use, picked up by gcc -O3. 2009-03-26 01:52:24 +00:00
darran
36ea3668b9 Fixes PR kern/41069 and PR kern/41070.
Extends the Opencrypto API to allow the destination buffer size to be
specified when its not the same size as the input buffer (i.e. for
operations like compress and decompress).
The crypto_op and crypt_n_op structures gain a u_int dst_len field.
The session_op structure gains a comp_alg field to specify a compression
algorithm.
Moved four ioctls to new ids; CIOCGSESSION, CIOCNGSESSION,  CIOCCRYPT,
and CIOCNCRYPTM.
Added four backward compatible ioctls; OCIOCGSESSION, OCIOCNGSESSION,
OCIOCCRYPT, and OCIOCNCRYPTM.

Backward compatibility is maintained in ocryptodev.h and ocryptodev.c which
implement the original ioctls and set dst_len and comp_alg to 0.

Adds user-space access to compression features.

Adds software gzip support (CRYPTO_GZIP_COMP).

Adds the fast version of crc32 from zlib to libkern. This should be generally
useful and provide a place to start normalizing the various crc32 routines
in the kernel.  The crc32 routine is used in this patch to support GZIP.

With input and support from tls@NetBSD.org.
2009-03-25 01:26:12 +00:00