CVS commit: src/sys/opencrypto

2023-07-11 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:42:16 UTC 2023 Modified Files: src/sys/opencrypto: cryptodev.h Log Message: opencrypto/cryptodev.h: Fix includes. - Move sys/condvar.h under #ifdef _KERNEL. - Add some other necessary includes and forward declara

CVS commit: src/sys/opencrypto

2023-07-11 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:42:16 UTC 2023 Modified Files: src/sys/opencrypto: cryptodev.h Log Message: opencrypto/cryptodev.h: Fix includes. - Move sys/condvar.h under #ifdef _KERNEL. - Add some other necessary includes and forward declara

CVS commit: src/sys/opencrypto

2022-06-26 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun Jun 26 22:52:30 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto(9): Fix missing initialization in error branch. Reported-by: syzbot+8c519140cac567be1...@syzkaller.appspotmail.com To generate

CVS commit: src/sys/opencrypto

2022-06-26 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun Jun 26 22:52:30 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto(9): Fix missing initialization in error branch. Reported-by: syzbot+8c519140cac567be1...@syzkaller.appspotmail.com To generate

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:54 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert session id is valid in crypto_freesession. This gives us the opportunity to detect usage mistakes like use-after-free.

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:54 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert session id is valid in crypto_freesession. This gives us the opportunity to detect usage mistakes like use-after-free.

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:38 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: opencrypto: Prune dead code now that crypto_dispatch never fails. To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/s

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:38 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: opencrypto: Prune dead code now that crypto_dispatch never fails. To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/s

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:15 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert driver process routine returns 0 or ERESTART. No other errors are allowed -- other errors must be transmitted by crypto_

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:15 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert driver process routine returns 0 or ERESTART. No other errors are allowed -- other errors must be transmitted by crypto_

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:39:54 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert nonnull callback up front in crypto_dispatch. Same with crypto_kdispatch. Convert some dead branches downstream to asse

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:39:54 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert nonnull callback up front in crypto_dispatch. Same with crypto_kdispatch. Convert some dead branches downstream to asse

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:39:46 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Nix dead code now that crypto_freesession never fails. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/s

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:39:46 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Nix dead code now that crypto_freesession never fails. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/s

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:39:17 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): crypto_freesession should never fail here. It can only fail if we pass it an invalid sid, which the logic to maintain the use

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:39:17 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): crypto_freesession should never fail here. It can only fail if we pass it an invalid sid, which the logic to maintain the use

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:38:59 UTC 2022 Modified Files: src/sys/opencrypto: cryptosoft.c Log Message: cryptosoft(4): Prune dead branches. Assert session id validity. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:38:59 UTC 2022 Modified Files: src/sys/opencrypto: cryptosoft.c Log Message: cryptosoft(4): Prune dead branches. Assert session id validity. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:34:40 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert crp_desc and crp_buf are nonnull. - crypto_getreq ensures crp_desc is nonnull. - Caller is responsible for setting crp_b

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:34:40 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert crp_desc and crp_buf are nonnull. - crypto_getreq ensures crp_desc is nonnull. - Caller is responsible for setting crp_b

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:34:29 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Refuse crypto operations with nothing in them earlier. This way we avoid passing 0 to crypto_getreq -- makes it easier to rea

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:34:29 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Refuse crypto operations with nothing in them earlier. This way we avoid passing 0 to crypto_getreq -- makes it easier to rea

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:30:05 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c cryptodev.h Log Message: opencrypto: Nix CRYPTO_F_DONE. Nothing uses it any more. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:30:05 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c cryptodev.h Log Message: opencrypto: Nix CRYPTO_F_DONE. Nothing uses it any more. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:29:54 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Fix possible use-after-free in race around detach. This is extremely unlikely because I don't think we have any drivers for r

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:29:54 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Fix possible use-after-free in race around detach. This is extremely unlikely because I don't think we have any drivers for r

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:29:25 UTC 2022 Modified Files: src/sys/opencrypto: cryptosoft.c Log Message: cryptosoft(4): Rip out nonsense to quietly ignore sid=0. This is no longer necessary because crypto_freesession no longer calls into th

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:29:25 UTC 2022 Modified Files: src/sys/opencrypto: cryptosoft.c Log Message: cryptosoft(4): Rip out nonsense to quietly ignore sid=0. This is no longer necessary because crypto_freesession no longer calls into th

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:25:14 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c cryptodev.h Log Message: opencrypto: Make sid=0 always invalid, but OK to free. Previously, crypto_newsession could sometimes return 0 as the driver-spe

CVS commit: src/sys/opencrypto

2022-05-22 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sun May 22 11:25:14 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c cryptodev.h Log Message: opencrypto: Make sid=0 always invalid, but OK to free. Previously, crypto_newsession could sometimes return 0 as the driver-spe

CVS commit: src/sys/opencrypto

2022-05-21 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sat May 21 23:11:03 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Fix set-but-unused variable warning. This deliberately ignores the error code returned by crypto_dispatch, but that error cod

CVS commit: src/sys/opencrypto

2022-05-21 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sat May 21 23:11:03 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Fix set-but-unused variable warning. This deliberately ignores the error code returned by crypto_dispatch, but that error cod

CVS commit: src/sys/opencrypto

2022-05-21 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sat May 21 20:37:18 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Don't signal the condvar for multi-operation completion. The condvar may be destroyed by the time we got here, and nothing wa

CVS commit: src/sys/opencrypto

2022-05-21 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sat May 21 20:37:18 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Don't signal the condvar for multi-operation completion. The condvar may be destroyed by the time we got here, and nothing wa

CVS commit: src/sys/opencrypto

2022-05-19 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Thu May 19 20:51:59 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert !cpu_intr_p() on dispatch and invoke. These should only ever have been potentially called from hard interrupt context by

CVS commit: src/sys/opencrypto

2022-05-19 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Thu May 19 20:51:59 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Assert !cpu_intr_p() on dispatch and invoke. These should only ever have been potentially called from hard interrupt context by

CVS commit: src/sys/opencrypto

2022-05-19 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Thu May 19 20:51:46 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c cryptodev.c cryptodev.h Log Message: opencrypto: Nix CRYPTO_F_USER, CRYPTO_F_CBIMM, CRYPTO_F_CBIFSYNC. CRYPTO_F_USER is no longer needed. It was introd

CVS commit: src/sys/opencrypto

2022-05-19 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Thu May 19 20:51:46 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c cryptodev.c cryptodev.h Log Message: opencrypto: Nix CRYPTO_F_USER, CRYPTO_F_CBIMM, CRYPTO_F_CBIFSYNC. CRYPTO_F_USER is no longer needed. It was introd

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:03:58 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Simplify error test in cryptodev_op. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.111

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:03:58 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Simplify error test in cryptodev_op. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.111

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:03:45 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Narrow scope of cryptodev_mtx to cover wait. No functional change intended -- this only removes an unnecessary lock/unlock cy

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:03:45 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Narrow scope of cryptodev_mtx to cover wait. No functional change intended -- this only removes an unnecessary lock/unlock cy

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:03:32 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Nix long-dead code and comments. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/opencrypto/cryptode

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:03:32 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Nix long-dead code and comments. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/opencrypto/cryptode

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:02:49 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Use IPL_NONE, not IPL_NET, for /dev/crypto pools. These are used (pool_get/put) only from thread context, never from interrup

CVS commit: src/sys/opencrypto

2022-05-18 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Wed May 18 20:02:49 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): Use IPL_NONE, not IPL_NET, for /dev/crypto pools. These are used (pool_get/put) only from thread context, never from interrup

CVS commit: src/sys/opencrypto

2022-05-17 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Tue May 17 10:32:58 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Factor setting CRYPTO_F_DONE out of branches. This had been done in 1.30 when the locking was different. No need any more. No

CVS commit: src/sys/opencrypto

2022-05-17 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Tue May 17 10:32:58 UTC 2022 Modified Files: src/sys/opencrypto: crypto.c Log Message: opencrypto: Factor setting CRYPTO_F_DONE out of branches. This had been done in 1.30 when the locking was different. No need any more. No

CVS commit: src/sys/opencrypto

2022-05-17 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Tue May 17 09:53:09 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: opencrypto(9): Omit needless casts around callbacks. Just declare the right types to begin with. No functional change intended. To ge

CVS commit: src/sys/opencrypto

2022-05-17 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Tue May 17 09:53:09 UTC 2022 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: opencrypto(9): Omit needless casts around callbacks. Just declare the right types to begin with. No functional change intended. To ge

CVS commit: src/sys/opencrypto

2022-03-12 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sat Mar 12 17:15:04 UTC 2022 Modified Files: src/sys/opencrypto: ocryptodev.c Log Message: crypto(4): Refuse count>1 for old CIOCNCRYPTM. This hasn't worked since it was written in 2009; if anyone cared surely they would have

CVS commit: src/sys/opencrypto

2022-03-12 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Sat Mar 12 17:15:04 UTC 2022 Modified Files: src/sys/opencrypto: ocryptodev.c Log Message: crypto(4): Refuse count>1 for old CIOCNCRYPTM. This hasn't worked since it was written in 2009; if anyone cared surely they would have

CVS commit: src/sys/opencrypto

2019-11-29 Thread Hikaru Abe
Module Name:src Committed By: hikaru Date: Fri Nov 29 08:30:31 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): accept CRYPTO_SHA2_384_HMAC and CRYPTO_SHA2_512_HMAC. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/o

CVS commit: src/sys/opencrypto

2019-11-29 Thread Hikaru Abe
Module Name:src Committed By: hikaru Date: Fri Nov 29 08:30:31 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: crypto(4): accept CRYPTO_SHA2_384_HMAC and CRYPTO_SHA2_512_HMAC. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/o

CVS commit: src/sys/opencrypto

2019-11-28 Thread Hikaru Abe
Module Name:src Committed By: hikaru Date: Fri Nov 29 07:20:03 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.h Log Message: HMAC-SHA-512 has 32 bytes MAC. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/opencrypto/cryptodev.h Please note t

CVS commit: src/sys/opencrypto

2019-11-28 Thread Hikaru Abe
Module Name:src Committed By: hikaru Date: Fri Nov 29 07:20:03 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.h Log Message: HMAC-SHA-512 has 32 bytes MAC. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/opencrypto/cryptodev.h Please note t

CVS commit: src/sys/opencrypto

2019-10-11 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Sat Oct 12 00:49:30 UTC 2019 Modified Files: src/sys/opencrypto: cryptosoft.c cryptosoft_xform.c Log Message: add (void *) intermediate casts to elide gcc function cast warnings. This is the simplest solution; choices: - add pra

CVS commit: src/sys/opencrypto

2019-10-11 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Sat Oct 12 00:49:30 UTC 2019 Modified Files: src/sys/opencrypto: cryptosoft.c cryptosoft_xform.c Log Message: add (void *) intermediate casts to elide gcc function cast warnings. This is the simplest solution; choices: - add pra

CVS commit: src/sys/opencrypto

2019-07-11 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jul 11 23:28:17 UTC 2019 Modified Files: src/sys/opencrypto: crypto.c Log Message: relinguish our lock while we are autoloading. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/opencrypto/crypto.c

CVS commit: src/sys/opencrypto

2019-07-11 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jul 11 23:28:17 UTC 2019 Modified Files: src/sys/opencrypto: crypto.c Log Message: relinguish our lock while we are autoloading. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/opencrypto/crypto.c

CVS commit: src/sys/opencrypto

2019-07-11 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jul 11 23:27:24 UTC 2019 Modified Files: src/sys/opencrypto: cryptosoft.c Log Message: Disable unloading until we keep track of references To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/opencrypto/cr

CVS commit: src/sys/opencrypto

2019-07-11 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jul 11 23:27:24 UTC 2019 Modified Files: src/sys/opencrypto: cryptosoft.c Log Message: Disable unloading until we keep track of references To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/opencrypto/cr

CVS commit: src/sys/opencrypto

2019-06-12 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jun 13 02:07:31 UTC 2019 Modified Files: src/sys/opencrypto: crypto.c Log Message: Try to load swcrypto if we we did not find any software drivers. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/op

CVS commit: src/sys/opencrypto

2019-06-12 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jun 13 02:07:31 UTC 2019 Modified Files: src/sys/opencrypto: crypto.c Log Message: Try to load swcrypto if we we did not find any software drivers. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/op

CVS commit: src/sys/opencrypto

2019-06-12 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jun 13 02:02:45 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: don't always panic when modunload crypto (int the pool destroy code, because the pools are busy). XXX: this is still racy; we need to prev

CVS commit: src/sys/opencrypto

2019-06-12 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Jun 13 02:02:45 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: don't always panic when modunload crypto (int the pool destroy code, because the pools are busy). XXX: this is still racy; we need to prev

Re: CVS commit: src/sys/opencrypto

2017-04-18 Thread coypu
On Tue, Apr 18, 2017 at 05:05:06PM +, Maya Rashish wrote: > XXX surrounding code seems fishy > > @@ -759,7 +759,6 @@ swcr_compdec(struct cryptodesc *crd, con > if (result < crd->crd_len) { > adj = result - crd->crd_len; > if (outtype == CRYPTO_BUF_MBUF) { > -

Re: CVS commit: src/sys/opencrypto

2015-11-27 Thread Paul Goyette
On Fri, 27 Nov 2015, Christos Zoulas wrote: Module Name:src Committed By: christos Date: Sat Nov 28 03:40:43 UTC 2015 Modified Files: src/sys/opencrypto: crypto.c Log Message: fix the build Thanks, and sorry for the breakage. +--+---

Re: CVS commit: src/sys/opencrypto

2014-01-27 Thread Taylor R Campbell
Date: Mon, 27 Jan 2014 05:45:32 -0800 (PST) From: Paul Goyette Taylor R Campbell wrote: > Would it suffice to add an open count to struct bdevsw and struct > cdevsw, to be maintained by {bdev,cdev}_{open,close}? I think this would be sufficient. Minor snag: all the bdevsw/cde

Re: CVS commit: src/sys/opencrypto

2014-01-27 Thread Paul Goyette
Taylor R Campbell wrote: It seems to me that the crux of the problem is that devsw_detach doesn't fail if the device is still in use, because we do keep no books about which devsws are still in use, so there's nothing to stop you from unloading a device's module before you've given a its close r

Re: CVS commit: src/sys/opencrypto

2014-01-26 Thread Taylor R Campbell
Date: Sun, 26 Jan 2014 11:36:32 + From: David Laight It also sounds like manual unloads of drivers can happen when the device is open - and that is also bad. A manual unload probably isn't going to race with open or close though. Disallowing unload completely would be a pai

Re: CVS commit: src/sys/opencrypto

2014-01-26 Thread David Laight
On Sun, Jan 26, 2014 at 11:04:31AM +1100, matthew green wrote: > > > >>> phase one: disable auto-unload. > > > > > >> Phase 1 has been done. > > > > > > for the whole kernel? > > > > No. Only for this specific module. > > right - my suggestion was that since this problem affects a > large clas

re: CVS commit: src/sys/opencrypto

2014-01-25 Thread matthew green
> >>> phase one: disable auto-unload. > > > >> Phase 1 has been done. > > > > for the whole kernel? > > No. Only for this specific module. right - my suggestion was that since this problem affects a large class of modules, until that is fixed, we should disable auto unload globally. .mrg.

re: CVS commit: src/sys/opencrypto

2014-01-25 Thread Paul Goyette
On Sun, 26 Jan 2014, matthew green wrote: phase one: disable auto-unload. Phase 1 has been done. for the whole kernel? No. Only for this specific module. - | Paul Goyette | PGP Key fingerprint: | E-mail

re: CVS commit: src/sys/opencrypto

2014-01-25 Thread matthew green
> > phase one: disable auto-unload. > Phase 1 has been done. for the whole kernel?

re: CVS commit: src/sys/opencrypto

2014-01-25 Thread Paul Goyette
Phase 1 has been done. On Sat, 25 Jan 2014, matthew green wrote: Implement in-module ref-counting, and do not allow auto-unload if there are existing references. Note that manual unloading is not prevented. OK christos@ XXX Also note that there is still a small window where the ref-count c

re: CVS commit: src/sys/opencrypto

2014-01-25 Thread matthew green
> >> Implement in-module ref-counting, and do not allow auto-unload if there > >> are existing references. > >> > >> Note that manual unloading is not prevented. > >> > >> OK christos@ > >> > >> XXX Also note that there is still a small window where the ref-count can > >> XXX be decremented, an

Re: CVS commit: src/sys/opencrypto

2014-01-24 Thread Paul Goyette
On Fri, 24 Jan 2014, Taylor R Campbell wrote: Shouldn't devsw_detach or config_fini_component handle this? Why does the crypto device need special reference counting that other devices don't? The crypto device isn't special in this regard. Pretty much all device driver modules need this sor

Re: CVS commit: src/sys/opencrypto

2014-01-24 Thread Taylor R Campbell
Date: Fri, 24 Jan 2014 17:35:41 + (UTC) From: chris...@astron.com (Christos Zoulas) In article <7458.1390534...@splode.eterna.com.au>, matthew green wrote: > >> Log Message: >> XXX Also note that there is still a small window where the ref-count can >> XXX be decremen

Re: CVS commit: src/sys/opencrypto

2014-01-24 Thread Paul Goyette
Some modules get auto-loaded by the syscall mechanism. We already have a mechanism to determine if any lwp's are currently executing these syscalls, and if yes we prevent auto-unload. For device-driver modules, there is currently no equivalent mechanism. They get auto-loaded from code in spec

Re: CVS commit: src/sys/opencrypto

2014-01-24 Thread Christos Zoulas
In article <7458.1390534...@splode.eterna.com.au>, matthew green wrote: > >> Log Message: >> Implement in-module ref-counting, and do not allow auto-unload if there >> are existing references. >> >> Note that manual unloading is not prevented. >> >> OK christos@ >> >> XXX Also note that there

re: CVS commit: src/sys/opencrypto

2014-01-23 Thread matthew green
> Log Message: > Implement in-module ref-counting, and do not allow auto-unload if there > are existing references. > > Note that manual unloading is not prevented. > > OK christos@ > > XXX Also note that there is still a small window where the ref-count can > XXX be decremented, and then the p

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, Christos Zoulas wrote: On Jan 19, 3:04pm, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | The mere existence of a non-zero unit is a "reference" that needs to | prevent unloading. What if it is the last reference? Th

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 3:04pm, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | The mere existence of a non-zero unit is a "reference" that needs to | prevent unloading. What if it is the last reference? Then the ref count will go to zero after clo

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
The mere existence of a non-zero unit is a "reference" that needs to prevent unloading. The two checks (unit# and ref-count) are equivalent and redundant, and only one of them needs to be there. On Sun, 19 Jan 2014, Christos Zoulas wrote: In article , Paul Goyette wrote: On Sun, 19 Jan

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread John Nemeth
On Jan 19, 10:37am, Paul Goyette wrote: } On Sun, 19 Jan 2014, Christos Zoulas wrote: } > On Jan 19, 10:22am, p...@whooppee.com (Paul Goyette) wrote: } > } > | How about the following changes? } > } > You need to handle the regular open too, not justthe get (look for the } > other fd_clone) } } Th

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
In article , Paul Goyette wrote: >On Sun, 19 Jan 2014, John Nemeth wrote: > >> } Handled indirectly. The MODULE_CMD_FINI calls config_cfdata_detach() >> } which attempts to detach each device instance. If a detach fails, then >> } config_cfdata_detach fails, and the unload will fail. >> >>

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, John Nemeth wrote: } Handled indirectly. The MODULE_CMD_FINI calls config_cfdata_detach() } which attempts to detach each device instance. If a detach fails, then } config_cfdata_detach fails, and the unload will fail. Does this mean that you'll end up with some devic

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 11:21am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | > | Handled indirectly. The MODULE_CMD_FINI calls config_cfdata_detach() | > | which attempts to detach each device instance. If a detach fails, then | > | config_cfdata_det

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, Christos Zoulas wrote: On Jan 19, 10:37am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | That's covered in cryptoopen() at line 1060 I missed that patch No worry. | Handled indirectly. The MODULE_CMD_FINI

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 10:37am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | That's covered in cryptoopen() at line 1060 I missed that patch | Handled indirectly. The MODULE_CMD_FINI calls config_cfdata_detach() | which attempts to detach each device ins

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, Christos Zoulas wrote: On Jan 19, 10:22am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | How about the following changes? You need to handle the regular open too, not justthe get (look for the other fd_clone) That's cover

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 10:22am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | How about the following changes? You need to handle the regular open too, not justthe get (look for the other fd_clone) | @@ -143,6 +143,8 @@ static intcryptoread(dev_t dev

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, Christos Zoulas wrote: Module Name:src Committed By: christos Date: Sun Jan 19 18:16:13 UTC 2014 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: bail out unloading for now How about the following changes? @@ -143,6 +143,8 @@ static i

CVS commit: src/sys/opencrypto

2010-01-31 Thread Hubert Feyrer
Module Name:src Committed By: hubertf Date: Sun Jan 31 14:32:56 UTC 2010 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: Add missing "break" for CRYPTO_CAST_CBC, and some assorted comment fixes. openssl(1) checks for CAST (and others) on ~every startup. To g