The NetBSD Project

CVS log for src/sys/opencrypto/ocryptodev.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / opencrypto

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.17.10.1: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:28:01 2026 UTC (11 days, 8 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +46 -43 lines
Sync with HEAD

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Jul 5 15:34:13 2026 UTC (4 months, 1 week ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -6 lines
opencrypto(9): Sprinkle SET_ERROR dtrace probes.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Jul 5 15:33:44 2026 UTC (4 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +17 -16 lines
opencrypto(9): Sort includes and nix trailing whitespace.

No functional change intended.

Revision 1.17.4.2: download - view: text, markup, annotated - select for diffs
Sat Jun 27 15:25:56 2026 UTC (4 months, 2 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-2-RELEASE
Diff to: previous 1.17.4.1: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.4.1: +24 -23 lines
Pull up following revision(s) (requested by riastradh in ticket #1278):

	sys/opencrypto/cryptodev.c: revision 1.130
	sys/opencrypto/cryptodev.c: revision 1.131
	sys/opencrypto/cryptodev.c: revision 1.132
	sys/opencrypto/cryptodev.c: revision 1.133
	tests/crypto/opencrypto/Makefile: revision 1.6
	sys/opencrypto/cryptosoft.c: revision 1.67
	sys/opencrypto/ocryptodev.c: revision 1.19
	tests/crypto/opencrypto/h_thread.c: revision 1.1
	sys/rump/dev/lib/libopencrypto/OPENCRYPTO.ioconf: revision 1.2
	tests/crypto/opencrypto/h_thread.c: revision 1.2
	sys/rump/dev/lib/libopencrypto/opencrypto_component.c: revision 1.7
	tests/crypto/opencrypto/t_opencrypto.sh: revision 1.12
	tests/crypto/opencrypto/t_opencrypto.sh: revision 1.13
	sys/opencrypto/cryptodev_internal.h: revision 1.5
	tests/crypto/opencrypto/t_opencrypto.sh: revision 1.14
	sys/opencrypto/cryptodev.c: revision 1.129
	distrib/sets/lists/debug/mi: revision 1.512
	distrib/sets/lists/tests/mi: revision 1.1417

Add a threaded test to test for races in cryptodev.
new thread cryptodev test


crypto(4): Make test more reliable, and test more.
1. New thread to concurrently create and destroy sessions.
   (There should really be multiple threads to concurrently compete
   with each other to create and destroy sessions, but this is
   already surfacing more crashes, as I expected.)
2. Handle EBUSY in CIOCFSESSION in case there is a concurrent
   CIOCCRYPT, as we are trying to test.
3. Handle CIOCCRYPT failure if a concurrent CIOCFSESSION beat us to
   it, as we are trying to test
4. Dump core if the threads get stuck for too long.
5. Provide stack traces from the test program or rump server if they
   dump core.
PR kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Take reference _before_ releasing the lock.

Otherwise nothing ensures the object will still exist by the time we
try to take the reference.

Also guard against too many references, since this is only a 32-bit
reference count.
PR kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Fix missing membars on reference count release.

If two threads A and B both hold references, we need to ensure that
memory ops in thread A happen before memory free in thread B in:
thread A                thread B                notes
--------                --------                -----
memory ops
atomic_dec(&refcnt)                             goes from 2 to 1
                        atomic_dec(&refcnt)     goes from 1 to 0
                        memory free

This requires a membar_release in thread A before the atomic_dec (or
atomic_dec with memory_order_release), and a membar_acquire in thread
B after the atomic_dec is found to have brought the reference count
down to zero (or atomic_dec wiht memory_order_acquire).
kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Disentangle initialization and attachment goo.
Lotta unnecessary boilerplate deleted here!

Disable module unloading: can't be done safely.  Explain precisely
why it can't be done safely.

This also fixes annoying `crypto: unable to register devsw, error 17'
messages in rump dmesg by having exactly one path to devsw_attach.
PR kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Omit needless locking in fcrypt_dtor.

We must have exclusive access to the object for this function to work
at all, so if removing the locks appeared to cause issues, it would
necessarily happen only because there is a bug somewhere else.
PR kern/60281: crypto(4): bugs in reference counting and test
crypto(4): Nix spurious mutex_exit; add missing bounds checks.

Consistently use `foo = kmem_alloc(n * sizeof(*foo), ...)' instead of
`sizeof(struct whatever_foo_is)'.  Makes it easier for a reader to
notice a discrepancy this way.

Move CRYPTODEV_OPS_MAX to cryptodev_internal.h so it can be used by
the compat ocryptodev.c shims too.  I think this is waaaaaaaaaaaaay
too high, by the way.  For example, it looks like qat(4) puts a limit
of 16384 on the number of sessions.  Other devices like hifn(4) look
like they're limited to numbers of sessions ranging from 2 to around
256.
PR kern/60281: crypto(4): bugs in reference counting and test

Revision 1.17.12.2: download - view: text, markup, annotated - select for diffs
Sat Jun 27 15:23:23 2026 UTC (4 months, 2 weeks ago) by martin
Branches: netbsd-11
CVS tags: netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6
Diff to: previous 1.17.12.1: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.12.1: +24 -23 lines
Pull up following revision(s) (requested by riastradh in ticket #330):

	sys/opencrypto/cryptodev.c: revision 1.130
	sys/opencrypto/cryptodev.c: revision 1.131
	sys/opencrypto/cryptodev.c: revision 1.132
	sys/opencrypto/cryptodev.c: revision 1.133
	tests/crypto/opencrypto/Makefile: revision 1.6
	sys/opencrypto/cryptosoft.c: revision 1.67
	sys/opencrypto/ocryptodev.c: revision 1.19
	tests/crypto/opencrypto/h_thread.c: revision 1.1
	sys/rump/dev/lib/libopencrypto/OPENCRYPTO.ioconf: revision 1.2
	tests/crypto/opencrypto/h_thread.c: revision 1.2
	sys/rump/dev/lib/libopencrypto/opencrypto_component.c: revision 1.7
	tests/crypto/opencrypto/t_opencrypto.sh: revision 1.12
	tests/crypto/opencrypto/t_opencrypto.sh: revision 1.13
	sys/opencrypto/cryptodev_internal.h: revision 1.5
	tests/crypto/opencrypto/t_opencrypto.sh: revision 1.14
	sys/opencrypto/cryptodev.c: revision 1.129
	distrib/sets/lists/debug/mi: revision 1.512
	distrib/sets/lists/tests/mi: revision 1.1417

Add a threaded test to test for races in cryptodev.
new thread cryptodev test


crypto(4): Make test more reliable, and test more.
1. New thread to concurrently create and destroy sessions.
   (There should really be multiple threads to concurrently compete
   with each other to create and destroy sessions, but this is
   already surfacing more crashes, as I expected.)
2. Handle EBUSY in CIOCFSESSION in case there is a concurrent
   CIOCCRYPT, as we are trying to test.
3. Handle CIOCCRYPT failure if a concurrent CIOCFSESSION beat us to
   it, as we are trying to test
4. Dump core if the threads get stuck for too long.
5. Provide stack traces from the test program or rump server if they
   dump core.
PR kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Take reference _before_ releasing the lock.

Otherwise nothing ensures the object will still exist by the time we
try to take the reference.

Also guard against too many references, since this is only a 32-bit
reference count.
PR kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Fix missing membars on reference count release.

If two threads A and B both hold references, we need to ensure that
memory ops in thread A happen before memory free in thread B in:
thread A                thread B                notes
--------                --------                -----
memory ops
atomic_dec(&refcnt)                             goes from 2 to 1
                        atomic_dec(&refcnt)     goes from 1 to 0
                        memory free

This requires a membar_release in thread A before the atomic_dec (or
atomic_dec with memory_order_release), and a membar_acquire in thread
B after the atomic_dec is found to have brought the reference count
down to zero (or atomic_dec wiht memory_order_acquire).
kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Disentangle initialization and attachment goo.
Lotta unnecessary boilerplate deleted here!

Disable module unloading: can't be done safely.  Explain precisely
why it can't be done safely.

This also fixes annoying `crypto: unable to register devsw, error 17'
messages in rump dmesg by having exactly one path to devsw_attach.
PR kern/60281: crypto(4): bugs in reference counting and test


crypto(4): Omit needless locking in fcrypt_dtor.

We must have exclusive access to the object for this function to work
at all, so if removing the locks appeared to cause issues, it would
necessarily happen only because there is a bug somewhere else.
PR kern/60281: crypto(4): bugs in reference counting and test
crypto(4): Nix spurious mutex_exit; add missing bounds checks.

Consistently use `foo = kmem_alloc(n * sizeof(*foo), ...)' instead of
`sizeof(struct whatever_foo_is)'.  Makes it easier for a reader to
notice a discrepancy this way.

Move CRYPTODEV_OPS_MAX to cryptodev_internal.h so it can be used by
the compat ocryptodev.c shims too.  I think this is waaaaaaaaaaaaay
too high, by the way.  For example, it looks like qat(4) puts a limit
of 16384 on the number of sessions.  Other devices like hifn(4) look
like they're limited to numbers of sessions ranging from 2 to around
256.
PR kern/60281: crypto(4): bugs in reference counting and test

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue May 19 19:00:00 2026 UTC (5 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +24 -23 lines
crypto(4): Nix spurious mutex_exit; add missing bounds checks.

Consistently use `foo = kmem_alloc(n * sizeof(*foo), ...)' instead of
`sizeof(struct whatever_foo_is)'.  Makes it easier for a reader to
notice a discrepancy this way.

Move CRYPTODEV_OPS_MAX to cryptodev_internal.h so it can be used by
the compat ocryptodev.c shims too.  I think this is waaaaaaaaaaaaay
too high, by the way.  For example, it looks like qat(4) puts a limit
of 16384 on the number of sessions.  Other devices like hifn(4) look
like they're limited to numbers of sessions ranging from 2 to around
256.

PR kern/60281: crypto(4): bugs in reference counting and test

Revision 1.17.4.1: download - view: text, markup, annotated - select for diffs
Thu May 7 14:43:24 2026 UTC (6 months, 1 week ago) by martin
Branches: netbsd-10
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -4 lines
Pull up following revision(s) (requested by christos in ticket #1262):

	sys/opencrypto/crypto.c: revision 1.132
	sys/opencrypto/crypto.c: revision 1.133
	sys/opencrypto/cryptosoft.h: revision 1.8
	sys/opencrypto/xform.c: revision 1.32
	sys/opencrypto/deflate.h: revision 1.10
	sys/opencrypto/cryptodev.h: revision 1.52
	sys/opencrypto/cryptosoft.c: revision 1.66
	sys/opencrypto/cryptodev.h: revision 1.53
	sys/opencrypto/ocryptodev.c: revision 1.18
	sys/opencrypto/cryptodev_internal.h: revision 1.4
	sys/opencrypto/aesxcbcmac.c: revision 1.4
	sys/opencrypto/cryptodev.c: revision 1.127
	sys/opencrypto/aesxcbcmac.h: revision 1.3
	sys/opencrypto/cryptodev.c: revision 1.128
	sys/opencrypto/cryptosoft_xform.c: revision 1.31
	sys/opencrypto/deflate.c: revision 1.24
	sys/opencrypto/deflate.c: revision 1.25
	sys/opencrypto/xform.h: revision 1.22
	sys/opencrypto/ocryptodev.h: revision 1.5
	sys/opencrypto/ocryptodev.h: revision 1.6

u_intXX_t -> uintXX_t

Fix:
An integer wraparound bug that could cause a NULL pointer exception.
Data sharing issues that could cause data corruption.
Locking issues that could cause double freeing or using free memory.

Issues discovered by nasm and coordinated by VulnCheck
Thank you!

Revision 1.17.12.1: download - view: text, markup, annotated - select for diffs
Thu May 7 14:40:13 2026 UTC (6 months, 1 week ago) by martin
Branches: netbsd-11
CVS tags: netbsd-11-0-RC5, netbsd-11-0-RC4
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -4 lines
Pull up following revision(s) (requested by christos in ticket #262):

	sys/opencrypto/crypto.c: revision 1.132
	sys/opencrypto/crypto.c: revision 1.133
	sys/opencrypto/cryptosoft.h: revision 1.8
	sys/opencrypto/xform.c: revision 1.32
	sys/opencrypto/deflate.h: revision 1.10
	sys/opencrypto/cryptodev.h: revision 1.52
	sys/opencrypto/cryptosoft.c: revision 1.66
	sys/opencrypto/cryptodev.h: revision 1.53
	sys/opencrypto/ocryptodev.c: revision 1.18
	sys/opencrypto/cryptodev_internal.h: revision 1.4
	sys/opencrypto/aesxcbcmac.c: revision 1.4
	sys/opencrypto/cryptodev.c: revision 1.127
	sys/opencrypto/aesxcbcmac.h: revision 1.3
	sys/opencrypto/cryptodev.c: revision 1.128
	sys/opencrypto/cryptosoft_xform.c: revision 1.31
	sys/opencrypto/deflate.c: revision 1.24
	sys/opencrypto/deflate.c: revision 1.25
	sys/opencrypto/xform.h: revision 1.22
	sys/opencrypto/ocryptodev.h: revision 1.5
	sys/opencrypto/ocryptodev.h: revision 1.6

u_intXX_t -> uintXX_t

Fix:
An integer wraparound bug that could cause a NULL pointer exception.
Data sharing issues that could cause data corruption.
Locking issues that could cause double freeing or using free memory.

Issues discovered by nasm and coordinated by VulnCheck
Thank you!

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Apr 29 14:49:51 2026 UTC (6 months, 2 weeks ago) by christos
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -4 lines
Fix:

An integer wraparound bug that could cause a NULL pointer exception.
Data sharing issues that could cause data corruption.
Locking issues that could cause double freeing or using free memory.

Issues discovered by nasm and coordinated by VulnCheck

Thank you!

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Mar 12 17:15:04 2022 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20250801, perseant-exfatfs-base-20240630, perseant-exfatfs-base, netbsd-11-base, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: perseant-exfatfs, netbsd-11, netbsd-10
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -4 lines
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 fixed it by now!

(Fixing this properly -- and putting a more reasonable upper bound
than the maximum that size_t arithmetic allows -- left as an exercise
or the reader.)

Reported-by: syzbot+798d4a16bc15ae88526e@syzkaller.appspotmail.com

Revision 1.11.4.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:59 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.11.4.1: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.4.1: +3 -35 lines
Merge changes from current as of 20200406

Revision 1.14.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:08 2020 UTC (6 years, 8 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.14.2.1: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.2.1: +2 -35 lines
Sync with head.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Jan 27 17:09:17 2020 UTC (6 years, 9 months ago) by pgoyette
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -35 lines
Split the module glue out from the rest of opencrypto/ocryptodev to
make rump happy.

Rump doesn't have compat modules (the compat code is included in the
relevant librump*.so), so there's no module compat_50 listed in
link_set_modules, and thus ocryptodev's MODULE(...) can't "require"
it.

This fixes the problem of "built-in module compat_50 not found" when
starting up rump_allserver (or rump_server with -l rumpdev_opencrypto).

XXX This does not resolve the long-standing "crypto: unable to
XXX register devsw, error 17" message noted at line 78 of
XXX sys/rump/dev/lib/libopencrypto/opencrypto_component.c

Revision 1.14.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:36 2020 UTC (6 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -2 lines
Sync with head.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Jan 16 15:29:24 2020 UTC (6 years, 10 months ago) by christos
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -2 lines
Initialize the session variable to an impossible session to prevent compiler
warnings.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Dec 12 02:15:43 2019 UTC (6 years, 11 months ago) by pgoyette
Branches: MAIN
CVS tags: ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
Rather than keeping a separate mutex, condvar, and pserialize for each
module hook, we can share a common set of synchronization structures.
This cuts the amount of cacheline_aligned data for these structures by
50%.

Note that we still have a per-hook localcount, since we need to count
individual references.

As discussed with riastradh@

Welcome to 9.99.22 !

Revision 1.11.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:49 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +44 -8 lines
Sync with HEAD

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Mar 1 11:06:57 2019 UTC (7 years, 8 months ago) by pgoyette
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-5-RELEASE, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4 lines
Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Jan 27 02:08:48 2019 UTC (7 years, 9 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +44 -8 lines
Merge the [pgoyette-compat] branch

Revision 1.11.2.8: download - view: text, markup, annotated - select for diffs
Wed Jan 23 03:34:15 2019 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.11.2.7: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.2.7: +4 -7 lines
Convert the macros for setting and unsetting a hook to generate
in-line code rather than using an intermediary hook##set routine.
Hooks are set and unset only in one place, so the intermediary
routine provides no benefit.  IMHO using the macro at the point-
of-call is more readable than using it elsewhere in the code and
then calling the generated intermediary routine (for which you
won't even find its declaration or definition unless you remember
to search for the HOOK_SET macro instead).

NFC intended, will verify with a bulk build and an atf test run.

Revision 1.11.2.7: download - view: text, markup, annotated - select for diffs
Sun Sep 23 03:44:04 2018 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.11.2.6: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.6: +9 -8 lines
Fix some thinkos/pastos/typos

Revision 1.11.2.6: download - view: text, markup, annotated - select for diffs
Sun Sep 23 01:33:26 2018 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.11.2.5: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.5: +45 -41 lines
Split the compat_crypto_50 from the rest of the crypto module

Cleanup some stuff left over from similar changes to raid modules.

Revision 1.11.2.5: download - view: text, markup, annotated - select for diffs
Sat Sep 22 10:49:09 2018 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.11.2.4: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.4: +4 -4 lines
Since the caller passes the address of our mutex, use it rather than
trying to reference it via global symbol (which might not exist).

Revision 1.11.2.4: download - view: text, markup, annotated - select for diffs
Sat Sep 22 10:33:50 2018 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.11.2.3: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.3: +36 -20 lines
When the compat code needs to callback to the original code, we cannot
call directly via the routines' global symbols, since the original code
might not be built-in.  So, the original code that calls compat code
needs to pass in the addresses of the callbacks.  This allows for the
compat code to be built whether or not the original (calling) code is
included.

XXX Done for cryptodev, will need to do the same thing for ccd(4) and
XXX vnd(4)

Revision 1.11.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 18 23:03:55 2018 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.11.2.2: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.2: +4 -4 lines
The COMPAT_HOOK macros were renamed to MODULE_HOOK, adjust all callers

Revision 1.11.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 17 11:04:31 2018 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.11.2.1: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.1: +8 -4 lines
Adapt (most of) the indirect function pointers to the new MP-safe
mechanism.  Still remaining are the compat_netbsd32 stuff, and
some usb subroutines.

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Fri Mar 23 09:41:10 2018 UTC (8 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +16 -2 lines
Handle the compat_50 stuff for opencrypto/cryptodev

Revision 1.4.16.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:06 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.4.16.1: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.16.1: +19 -7 lines
update from HEAD

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:13 2017 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +20 -8 lines
Sync with HEAD

Revision 1.8.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 5 03:59:21 2017 UTC (9 years, 3 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +15 -3 lines
Pull up following revision(s) (requested by knakahara in ticket #178):
	sys/opencrypto/crypto.c: 1.92-1.100
	sys/opencrypto/cryptodev.h: 1.38-1.39
	sys/opencrypto/ocryptodev.c: 1.9-1.11
	sys/opencrypto/xform.c: revision 1.29
	sys/opencrypto/xform.h: revision 1.20
KNF
--
Apply C99-style struct initialization to enc_xform, auth_hash and comp_algo
--
make cryptoret() context softint to balance dequeuing crypto_ret_q with enqueuing it.
--
fix panic when using ecryption devices attached earlier than ipi_sysinit().
pointed out and tested by martin@n.o, thanks.
--
fix typo
--
make crp_{,k}q percpu to scale crypto_dispatch().
update locking note later.
--
divide crp_ret_{,k}q by CPU to avoid reordering.
update locking note later.
--
update locking notes of opencrypto(9)
--
Don't disclose uninitialized 32-bit word if cryptodev_session fails.
From Ilja Van Sprundel.
--
Avert userland-controlled integer overflow.
From Ilja Van Sprundel.
--
Avoid another userland-controlled integer overflow.
From Ilja Van Sprundel.
--
refactor: remove glue macros for FreeBSD code.
--
pack crypto_drivers variables to struct and add cacheline_aligned qualifier.
--
use kmem_alloc KPI instead of malloc KPI.
--
use pool_cache(9) instead of pool(9) as they can be called concurrently.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Jul 28 17:14:04 2017 UTC (9 years, 3 months ago) by riastradh
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, nick-nhusb-base-20170825
Branch point for: phil-wifi, pgoyette-compat
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +7 -2 lines
Avoid another userland-controlled integer overflow.

From Ilja Van Sprundel.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jul 28 14:16:29 2017 UTC (9 years, 3 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +7 -2 lines
Avert userland-controlled integer overflow.

From Ilja Van Sprundel.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Jul 28 14:13:56 2017 UTC (9 years, 3 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +5 -3 lines
Don't disclose uninitialized 32-bit word if cryptodev_session fails.

From Ilja Van Sprundel.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jun 2 09:46:57 2017 UTC (9 years, 5 months ago) by knakahara
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -4 lines
rename crypto_mtx to cryptodev_mtx

It is used by cryptodev.c and ocryptodev.c only.

Revision 1.6.10.1: download - view: text, markup, annotated - select for diffs
Fri May 19 00:22:58 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +5 -5 lines
Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed May 17 06:33:04 2017 UTC (9 years, 6 months ago) by knakahara
Branches: MAIN
CVS tags: prg-localcount2-base3
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -5 lines
opencrypto: cleanup debug messages.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Sep 5 09:23:40 2014 UTC (12 years, 2 months ago) by matt
Branches: MAIN
CVS tags: prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: prg-localcount2, nick-nhusb
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
Try not to use f_data, use f_fcrypt to get a correctly typed pointer.

Revision 1.4.16.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:36 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -2 lines
Rebase to HEAD as of a few days ago.

Revision 1.4.6.1: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:11 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4: +5 -2 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.4.20.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:14 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4: +5 -2 lines
sync with head

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Jan 1 16:06:01 2014 UTC (12 years, 10 months ago) by pgoyette
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -2 lines
Modularize the opencrypto components and link to the build

Revision 1.2.14.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:10:04 2011 UTC (15 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2: +5 -4 lines
Sync with HEAD.

Revision 1.2.12.2: download - view: text, markup, annotated - select for diffs
Tue May 31 03:05:10 2011 UTC (15 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.2.12.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.12.1: +2 -2 lines
sync with head

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Fri May 20 08:11:32 2011 UTC (15 years, 6 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.4.2.1: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.1: +270 -0 lines
bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).

Revision 1.4.2.1
Mon May 16 10:27:49 2011 UTC (15 years, 6 months ago) by matt
Branches: matt-nb5-mips64
FILE REMOVED
Changes since revision 1.4: +0 -270 lines
file ocryptodev.c was added on branch matt-nb5-mips64 on 2011-05-20 08:11:32 +0000

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon May 16 10:27:49 2011 UTC (15 years, 6 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, khorben-n900, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys, rmind-smpnet, matt-nb5-mips64
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
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)

Revision 1.2.12.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:56:05 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -2 lines
sync with head

Revision 1.2.16.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:10:48 2011 UTC (15 years, 8 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2: +3 -2 lines
Sync with HEAD

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Feb 19 16:26:34 2011 UTC (15 years, 8 months ago) by drochner
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -2 lines
make the compatibility code conditional on COMPAT_50

Revision 1.2.8.2: download - view: text, markup, annotated - select for diffs
Wed May 13 17:22:56 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.2.8.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.8.1: +270 -0 lines
Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.2.6.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:14:24 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2.6.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.6.1: +269 -0 lines
sync with head.

Revision 1.2.4.2: download - view: text, markup, annotated - select for diffs
Sun May 3 17:24:45 2009 UTC (17 years, 6 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.2.4.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.4.1: +270 -0 lines
Pull up following revision(s) (requested by tls in ticket #611):
	sys/lib/libkern/Makefile: patch
	sys/lib/libkern/crc32.c: revision 1.1
	sys/lib/libkern/crc32.h: revision 1.1
	sys/lib/libkern/libkern.h: revision 1.89
	sys/lib/libkern/arch/i386/Makefile.inc: revision 1.28
	sys/net/zlib.h: revision 1.14 via patch
	sys/opencrypto/crypto.c: revision 1.33
	sys/opencrypto/cryptodev.c: revision 1.46
	sys/opencrypto/cryptodev.h: revision 1.16
	sys/opencrypto/cryptosoft.c: revision 1.24
	sys/opencrypto/cryptosoft.h: revision 1.6
	sys/opencrypto/deflate.h: revision 1.6
	sys/opencrypto/cryptosoft_xform.c: revision 1.12
	sys/opencrypto/deflate.c: revision 1.13
	sys/opencrypto/files.opencrypto: revision 1.20
	sys/opencrypto/ocryptodev.c: revision 1.1
	sys/opencrypto/ocryptodev.h: revision 1.1
	sys/opencrypto/xform.c: revision 1.18
	sys/opencrypto/xform.h: revision 1.10
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.

Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:50 2009 UTC (17 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.1: +269 -0 lines
Sync with HEAD.

Revision 1.2.8.1
Thu Mar 26 01:52:24 2009 UTC (17 years, 7 months ago) by jym
Branches: jym-xensuspend
FILE REMOVED
Changes since revision 1.2: +0 -269 lines
file ocryptodev.c was added on branch jym-xensuspend on 2009-05-13 17:22:56 +0000

Revision 1.2.6.1
Thu Mar 26 01:52:24 2009 UTC (17 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
FILE REMOVED
Changes since revision 1.2: +0 -269 lines
file ocryptodev.c was added on branch yamt-nfs-mp on 2009-05-04 08:14:24 +0000

Revision 1.2.4.1
Thu Mar 26 01:52:24 2009 UTC (17 years, 7 months ago) by snj
Branches: netbsd-5
FILE REMOVED
Changes since revision 1.2: +0 -269 lines
file ocryptodev.c was added on branch netbsd-5 on 2009-05-03 17:24:45 +0000

Revision 1.2.2.1
Thu Mar 26 01:52:24 2009 UTC (17 years, 7 months ago) by skrll
Branches: nick-hppapmap
FILE REMOVED
Changes since revision 1.2: +0 -269 lines
file ocryptodev.c was added on branch nick-hppapmap on 2009-04-28 07:37:50 +0000

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Mar 26 01:52:24 2009 UTC (17 years, 7 months ago) by mrg
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, matt-premerge-20091211, matt-mips64-premerge-20101231, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: yamt-nfs-mp, rmind-uvmplock, nick-hppapmap, netbsd-5, jym-xensuspend, jruoho-x86intr, bouyer-quota2
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -3 lines
avoid a useless uninitialised use, picked up by gcc -O3.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Mar 25 01:26:13 2009 UTC (17 years, 7 months ago) by darran
Branches: MAIN
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.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>