The NetBSD Project

CVS log for src/sys/opencrypto/cryptodev.h

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.51.6.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.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51: +105 -99 lines
Sync with HEAD

Revision 1.54: 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
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +7 -8 lines
opencrypto(9): Sort includes and nix trailing whitespace.

No functional change intended.

Revision 1.50.4.2: 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
CVS tags: netbsd-10-2-RELEASE
Diff to: previous 1.50.4.1: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.4.1: +99 -92 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.51.8.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-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4
Diff to: previous 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51: +99 -92 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.53: download - view: text, markup, annotated - select for diffs
Wed Apr 29 14:51:58 2026 UTC (6 months, 2 weeks ago) by christos
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +91 -91 lines
u_intXX_t -> uintXX_t

Revision 1.52: 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.51: preferred, colored
Changes since revision 1.51: +39 -32 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.50.4.1: download - view: text, markup, annotated - select for diffs
Wed Aug 9 17:42:03 2023 UTC (3 years, 3 months ago) by martin
Branches: netbsd-10
CVS tags: 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
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +13 -2 lines
Pull up following revision(s) (requested by maya in ticket #316):

	sys/arch/m68k/include/mutex.h: revision 1.13
	sys/arch/arm/include/cpu.h: revision 1.125
	sys/arch/sun68k/include/intr.h: revision 1.21
	sys/arch/arm/include/mutex.h: revision 1.28
	sys/sys/rwlock.h: revision 1.18
	sys/arch/powerpc/include/mutex.h: revision 1.7
	sys/arch/arm/include/mutex.h: revision 1.29
	sys/arch/powerpc/include/mutex.h: revision 1.8
	sys/uvm/uvm_param.h: revision 1.42
	sys/sys/ksem.h: revision 1.16
	sys/arch/x86/include/mutex.h: revision 1.10
	sys/sys/proc.h: revision 1.372
	sys/sys/ksem.h: revision 1.17
	sys/arch/ia64/include/mutex.h: revision 1.8
	sys/arch/evbarm/include/intr.h: revision 1.29
	sys/sys/lua.h: revision 1.9
	sys/arch/next68k/include/intr.h: revision 1.23
	sys/arch/ia64/include/mutex.h: revision 1.9
	sys/arch/hp300/include/intr.h: revision 1.35
	sys/arch/hp300/include/intr.h: revision 1.36
	sys/arch/sparc/include/cpu.h: revision 1.111
	sys/arch/hppa/include/mutex.h: revision 1.16
	sys/arch/vax/include/intr.h: revision 1.31
	sys/arch/hppa/include/mutex.h: revision 1.17
	sys/arch/news68k/include/intr.h: revision 1.28
	sys/arch/hppa/include/mutex.h: revision 1.18
	sys/arch/hppa/include/intr.h: revision 1.3
	sys/arch/hppa/include/mutex.h: revision 1.19
	sys/arch/hppa/include/intr.h: revision 1.4
	sys/sys/sched.h: revision 1.92
	sys/opencrypto/cryptodev.h: revision 1.51
	sys/arch/vax/include/mutex.h: revision 1.20
	sys/arch/sparc64/include/mutex.h: revision 1.10
	sys/arch/ia64/include/sapicvar.h: revision 1.2
	sys/arch/riscv/include/mutex.h: revision 1.5
	sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
	sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
	sys/arch/riscv/include/mutex.h: revision 1.6
	sys/ddb/files.ddb: revision 1.16
	sys/arch/mac68k/include/intr.h: revision 1.32
	share/man/man4/ddb.4: revision 1.203
	sys/ddb/db_command.c: revision 1.183
	sys/arch/mips/include/mutex.h: revision 1.10
	sys/ddb/db_command.c: revision 1.184
	sys/arch/x68k/include/intr.h: revision 1.22
	sys/arch/sparc/include/psl.h: revision 1.51
	sys/arch/or1k/include/mutex.h: revision 1.4
	sys/arch/mips/include/mutex.h: revision 1.11
	sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
	sys/arch/sparc64/include/cpu.h: revision 1.134
	sys/arch/sparc/include/psl.h: revision 1.52
	sys/arch/or1k/include/mutex.h: revision 1.5
	sys/arch/mvme68k/include/intr.h: revision 1.22
	sys/arch/luna68k/include/intr.h: revision 1.16
	external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
	sys/arch/sparc/include/mutex.h: revision 1.12
	sys/arch/sparc/include/mutex.h: revision 1.13
	sys/arch/usermode/include/mutex.h: revision 1.5
	sys/arch/usermode/include/mutex.h: revision 1.6
	sys/kern/kern_core.c: revision 1.38
	usr.sbin/crash/Makefile: revision 1.49
	sys/arch/amiga/include/intr.h: revision 1.23
	sys/arch/alpha/include/mutex.h: revision 1.12
	sys/arch/alpha/include/mutex.h: revision 1.13
	sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
	sys/ddb/ddb.h: revision 1.6
	sys/arch/sparc64/include/mutex.h: revision 1.8
	sys/arch/sh3/include/mutex.h: revision 1.12
	sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
	sys/ddb/db_syncobj.c: revision 1.1
	sys/arch/vax/include/mutex.h: revision 1.18
	sys/arch/sparc64/include/psl.h: revision 1.63
	sys/arch/sparc64/include/mutex.h: revision 1.9
	sys/arch/sh3/include/mutex.h: revision 1.13
	sys/arch/evbarm/lubbock/obio.c: revision 1.13
	sys/arch/atari/include/intr.h: revision 1.23
	sys/ddb/db_syncobj.c: revision 1.2
	sys/arch/vax/include/mutex.h: revision 1.19
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
	sys/arch/cesfic/include/intr.h: revision 1.14
	sys/ddb/db_syncobj.h: revision 1.1
	sys/arch/x86/include/cpu.h: revision 1.134
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
	sys/arch/cesfic/include/intr.h: revision 1.15
	sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
	sys/sys/cpu_data.h: revision 1.54
	sys/arch/m68k/include/mutex.h: revision 1.12
	sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes.  Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h.  avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h.  And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex.  Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT.  Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Jul 11 10:42:16 2023 UTC (3 years, 4 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
Branch point for: perseant-exfatfs, netbsd-11
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +13 -2 lines
opencrypto/cryptodev.h: Fix includes.

- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun May 22 11:40:29 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
CVS tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -3 lines
opencrypto: crypto_dispatch never fails now.  Make it return void.

Same with crypto_kdispatch.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun May 22 11:40:03 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
opencrypto: Rip out EAGAIN logic when unregistering crypto drivers.

I'm pretty sure this never worked reliably based on code inspection,
and it's unlikely to have ever been tested because it only applies
when unregistering a driver -- but we have no crypto drivers for
removable devices, so it would only apply if we went out of our way
to trigger detach with drvctl.

Instead, just make the operation fail with ENODEV, and remove all the
callback logic to resubmit the request on EAGAIN.  (Maybe this should
be ENXIO, but crypto_kdispatch already does ENODEV.)

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun May 22 11:39:37 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -2 lines
opencrypto: Make crypto_freesession return void.

No callers use the return value.  It is not sensible to allow this to
fail.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun May 22 11:39:27 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -3 lines
opencrypto: Make freesession callback return void.

No functional change intended: all drivers already return zero
unconditionally.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun May 22 11:30:41 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -3 lines
opencrypto: Make crp_callback, krp_callback return void.

Nothing uses the return values inside opencrypto, so let's stop
making users return them.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun May 22 11:30:05 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +4 -4 lines
opencrypto: Nix CRYPTO_F_DONE.

Nothing uses it any more.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sun May 22 11:25:14 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -2 lines
opencrypto: Make sid=0 always invalid, but OK to free.

Previously, crypto_newsession could sometimes return 0 as the
driver-specific part of the session id, and 0 as the hid, for sid=0.
But netipsec assumes that it is always safe to free sid=0 from
zero-initialized memory even if crypto_newsession has never
succeeded.  So it was up to every driver in tree to gracefully handle
sid=0, if it happened to get assigned hid=0.  And, as long as the
freesession callback was expected to just return an error code when
given a bogus session id, that worked out fine...because nothing ever
used the error code.

That was a terrible fragile system that should never have been
invented.  Instead, let's just ensure that valid session ids are
nonzero, and make crypto_freesession with sid=0 be a no-op.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Thu May 19 20:51:46 2022 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +4 -4 lines
opencrypto: Nix CRYPTO_F_USER, CRYPTO_F_CBIMM, CRYPTO_F_CBIFSYNC.

CRYPTO_F_USER is no longer needed.  It was introduced in 2008 by
darran@ in crypto.c 1.30, cryptodev.c 1.45 in an attempt to avoid
double-free between the issuing thread and asynchronous callback.
But the `fix' didn't work.  In 2017, knakahara@ fixed it properly in
cryptodev.c 1.87 by distinguishing `the crypto operation has
completed' (CRYPTO_F_DONE) from `the callback is done touching the
crp object' (CRYPTO_F_DQRETQ, now renamed to CRYPTODEV_F_RET).

CRYPTO_F_CBIMM formerly served to invoke the callback synchronously
from the driver's interrupt completion routine, to reduce contention
on what was once a single cryptoret thread.  Now, there is a per-CPU
queue and softint for much cheaper processing, so there is less
motivation for this in the first place.  So let's remove the
complicated logic.  This means the callbacks never run in hard
interrupt context, which means we don't need to worry about recursion
into crypto_dispatch in hard interrupt context.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Aug 14 20:43:05 2021 UTC (5 years, 3 months ago) by andvar
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +5 -5 lines
fix typo in CRK_ALGORITHM_MIN definition to match CRK_ALGORITHM_MAX one.
while here fix few typos in comments.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Aug 9 19:57:58 2021 UTC (5 years, 3 months ago) by andvar
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +4 -4 lines
fix typos in asymmetry, asymmetric(al), symmetrical.

Revision 1.39.4.1: 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.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39: +2 -2 lines
Merge changes from current as of 20200406

Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Nov 29 07:20:03 2019 UTC (6 years, 11 months ago) by hikaru
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, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
HMAC-SHA-512 has 32 bytes MAC.

Revision 1.25.12.1: 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.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25: +58 -30 lines
update from HEAD

Revision 1.25.30.4: 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.25.30.3: preferred, colored; branchpoint 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25.30.3: +54 -27 lines
Sync with HEAD

Revision 1.34.2.3: 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.34.2.2: preferred, colored; branchpoint 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34.2.2: +25 -7 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.39: download - view: text, markup, annotated - select for diffs
Wed Jul 26 06:44:50 2017 UTC (9 years, 3 months ago) by knakahara
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-merge-20190127, 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, pgoyette-compat, nick-nhusb-base-20170825, 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
Branch point for: phil-wifi
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +10 -5 lines
update locking notes of opencrypto(9)

Revision 1.38.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 18 06:01:37 2017 UTC (9 years, 4 months ago) by knakahara
Branches: perseant-stdc-iso10646
Diff to: previous 1.38.2.1: preferred, colored; branchpoint 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38.2.1: +681 -0 lines
3212654

Revision 1.38.2.1
Tue Jul 18 06:01:36 2017 UTC (9 years, 4 months ago) by knakahara
Branches: perseant-stdc-iso10646
FILE REMOVED
Changes since revision 1.38: +0 -681 lines
file cryptodev.h was added on branch perseant-stdc-iso10646 on 2017-07-18 06:01:37 +0000

Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Jul 18 06:01:36 2017 UTC (9 years, 4 months ago) by knakahara
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base
Branch point for: perseant-stdc-iso10646
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +16 -3 lines
make cryptoret() context softint to balance dequeuing crypto_ret_q with enqueuing it.

Revision 1.34.2.2: download - view: text, markup, annotated - select for diffs
Wed Jul 5 20:19:21 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.34.2.1: preferred, colored; branchpoint 1.34: preferred, colored
Changes since revision 1.34.2.1: +9 -4 lines
Pull up following revision(s) (requested by knakahara in ticket #97):
	sys/opencrypto/crypto.c: 1.87-1.91
	sys/opencrypto/cryptodev.c: 1.93-1.95
	sys/opencrypto/cryptodev.h: 1.37
	sys/opencrypto/cryptosoft.c: 1.52
	sys/rump/dev/lib/libopencrypto/opencrypto_component.c: 1.5
sanitize count used for kmem_alloc size.
Hmm, who uses CIOCNGSESSION, CIOCNFSESSION, CIOCNCRYPTM or CIOCNFKEYM?
--
sanitize in CIOCNCRYPTM and initialize comp_alg in CIOCNGSESSION
--
must release cap->cc_lock before calling cap->cc_newsession() because of spinlock.
--
refactor crypto_newsession() like FreeBSD.
--
support multiple encryption drivers (port from FreeBSD).
--
Divide crp_devflags from crp_flags to write exclusively.
CRYPTO_F_DQRETQ(new name is CRYPTODEV_F_RET) is used by cryptodev.c only.
It should be divided to other member.
--
Reduce crypto_ret_q_mtx lock regions.
crypto.c does not access the members of crp when the crp is in crp_q or
crp_ret_q. Furthermore, crp_q and crp_ret_q are protected by each mutex,
so the members of crp is not shared. That means crp_flags is not required
mutex in crypto.c.
--
fix cryptosoft.c:r1.51 mistake. swcrypto_attach() must not be called from module_init_class().
swcrypto_attach() will call softint_establish(), it must be called after cpus
attached. module_init_class() is too early to call softint_establish().
--
simplify mutex_enter/exit(crypto_q_mtx), and fix missing exit.
--
reduce rump waring message. pointed out by ozaki-r@n.o, thanks.

Revision 1.34.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 05:36:41 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +17 -1 lines
Pull up following revision(s) (requested by christos/knakahara in ticket #37):
	sys/opencrypto/crypto.c: 1.79-1.86
	sys/opencrypto/cryptodev.h: 1.35, 1.36
use crypto_checkdriver_uninit() when it may touch uninitialized crypto_drivers.
--
fix reading crp_q without holding crypto_q_mtx
--
restructure locks(1/2): make relation between lock and data explicit.
    + crypto_drv_mtx protects
      -  whole crypto_drivers
    + crypto_drivers[i].cc_lock (new) protects
      - crypto_drivers[i] itself
      - member of crypto_drivers[i]
    + crypto_q_mtx protects
      - crp_q
      - crp_kq
    + crypto_ret_q_mtx protects
      - crp_ret_q
      - crp_ret_kq
      - crypto_exit_flag
I will add locking note later.
--
restructure locks(2/2): crypto_q_mtx can be adaptive now.
--
add locking notes.
--
avoid crp_q reordering as hardware interrupts.
crypto_{,k}invoke() can be called with holding crp_q_mtx now.
--
apply the same fix as crypto.c:r1.83 for crypto_dispatch to crypto_kdispatch.
--
- acquire lock
- use c99 loop indexes
- initialize featp
--
Put back crypto_checkdriver(); use it when we need to make sure that we
get back a cryptocap that has been initialized.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Jun 15 12:41:18 2017 UTC (9 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +9 -4 lines
Divide crp_devflags from crp_flags to write exclusively.

CRYPTO_F_DQRETQ(new name is CRYPTODEV_F_RET) is used by cryptodev.c only.
It should be divided to other member.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Jun 6 01:48:33 2017 UTC (9 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +15 -1 lines
add locking notes.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Jun 6 01:45:57 2017 UTC (9 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -1 lines
restructure locks(1/2): make relation between lock and data explicit.

    + crypto_drv_mtx protects
      -  whole crypto_drivers
    + crypto_drivers[i].cc_lock (new) protects
      - crypto_drivers[i] itself
      - member of crypto_drivers[i]
    + crypto_q_mtx protects
      - crp_q
      - crp_kq
    + crypto_ret_q_mtx protects
      - crp_ret_q
      - crp_ret_kq
      - crypto_exit_flag

I will add locking note later.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu May 25 05:24:57 2017 UTC (9 years, 5 months ago) by knakahara
Branches: MAIN
CVS tags: netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -7 lines
add cryptkop alloc/free KPI instead of manipulating cryptkop_pool directly.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu May 25 05:22:55 2017 UTC (9 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +1 -3 lines
remove obsoleted declarations.

Revision 1.31.2.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.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31: +3 -3 lines
Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.32: 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.31: preferred, colored
Changes since revision 1.31: +3 -3 lines
opencrypto: cleanup debug messages.

Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:30 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.1: +2 -7 lines
Sync with HEAD

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Apr 24 03:29:37 2017 UTC (9 years, 6 months ago) by knakahara
Branches: MAIN
CVS tags: prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426
Branch point for: prg-localcount2
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +1 -7 lines
separate crypto_drv_mtx from crypto_mtx.

crypto_mtx is used only for cryptodev.c and ocryptodev.c now.

Revision 1.28.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:07 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +7 -8 lines
Sync with HEAD

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Apr 7 12:15:51 2017 UTC (9 years, 7 months ago) by knakahara
Branches: MAIN
CVS tags: jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -1 lines
fix race among crypto_done(), cryptoret(), and {cryptodev_op(), cryptodev_key()}.

crypto_op() waited to be set CRYPTO_F_DONE with crp->crp_cv.
However, there is context switch chances between being set CRYPTO_F_DONE in
crypto_done() and done cv_signal(crp->crp_cv) in cryptodev_cb(), that is,
cryptodev_op() thread can run to cv_destroy(crp->crp_cv) before cryptoret()
thread is waken up. As a result, cryptodev_cb() can call invalid(destroyed)
cv_signal(crp->crp_cv).

Furthermore, below two implementations cause other races.
    - waiting CRYPTO_F_DONE with crp->crp_cv
    - context witch chances between set CRYPTO_F_DONE and cv_signal(crp->crp_cv)

So, use other flag(CRYPTO_F_DQRETQ) for cryptodev_op() and cryptodev_key(),
and then call cv_signal(crp->crp_cv) immediately after set CRYPTO_F_DQRETQ.

Tested concurrent over 20 processes with software and hardware drivers.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:52 2017 UTC (9 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -8 lines
Sync with HEAD

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Mar 6 09:59:05 2017 UTC (9 years, 8 months ago) by knakahara
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -8 lines
add sysctl to select software/hardware encryption driver. can enable CRYPTO_DEBUG.

Revision 1.25.30.3: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:23 2016 UTC (10 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.25.30.2: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.30.2: +3 -3 lines
Sync with HEAD

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Jul 7 06:55:43 2016 UTC (10 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -3 lines
KNF. Remove extra spaces. No functional change.

Revision 1.25.30.2: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:33 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.25.30.1: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.30.1: +2 -1 lines
Sync with HEAD

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Jan 22 22:35:27 2016 UTC (10 years, 9 months ago) by dholland
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -1 lines
Needs sys/time.h for struct timespec.

Revision 1.25.30.1: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:08 2015 UTC (10 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
Sync with HEAD (as of 26th Dec)

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Nov 28 03:06:45 2015 UTC (10 years, 11 months ago) by pgoyette
Branches: MAIN
CVS tags: nick-nhusb-base-20151226
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
Re-work the module init and destroy code to allow it to be unloaded and
then reloaded.

Should fix PR kern/49842

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:28 2011 UTC (15 years, 4 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +7 -4 lines
Catchup with rmind-uvmplock merge.

Revision 1.17.4.3: download - view: text, markup, annotated - select for diffs
Sun Jun 12 00:24:31 2011 UTC (15 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.17.4.2: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.4.2: +6 -3 lines
sync with head

Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Jun 9 14:41:24 2011 UTC (15 years, 5 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, 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, 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, agc-symver-base, agc-symver
Branch point for: tls-maxphys, nick-nhusb
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +7 -4 lines
-if an opencrypto(9) session is allocated, the driver is refcounted
 and can not disappear -- no need to hold crypto_mtx to check the
 driver list
 (the whole check is questionable)
-crp->crp_cv (the condition variable) is used by userland cryptodev
 exclusively -- move its initialization there, no need to waste
 cycles of in-kernel callers
-add a comment which members of "struct cryptop" are used
 by opencrypto(9) and which by crypto(4)
 (this should be split, no need to waste memory for in-kernel callers)

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

Revision 1.17.4.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.17.4.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.1: +9 -4 lines
sync with head

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu May 26 21:50:03 2011 UTC (15 years, 5 months ago) by drochner
Branches: MAIN
CVS tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +7 -2 lines
pull in AES-GCM/GMAC support from OpenBSD
This is still somewhat experimental. Tested between 2 similar boxes
so far. There is much potential for performance improvement. For now,
I've changed the gmac code to accept any data alignment, as the "char *"
pointer suggests. As the code is practically used, 32-bit alignment
can be assumed, at the cost of data copies. I don't know whether
bytewise access or copies are worse performance-wise. For efficient
implementations using SSE2 instructions on x86, even stricter
alignment requirements might arise.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue May 24 19:10:09 2011 UTC (15 years, 5 months ago) by drochner
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -2 lines
copy AES-XCBC-MAC support from KAME IPSEC to FAST_IPSEC
For this to fit, an API change in cryptosoft was adopted from OpenBSD
(addition of a "Setkey" method to hashes) which was done for GCM/GMAC
support there, so it might be useful in the future anyway.
tested against KAME IPSEC
AFAICT, FAST_IPSEC now supports as much as KAME.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon May 23 13:51:10 2011 UTC (15 years, 5 months ago) by drochner
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -2 lines
add an AES-CTR xform, from OpenBSD

Revision 1.14.10.1.4.1: download - view: text, markup, annotated - select for diffs
Fri May 20 08:11:31 2011 UTC (15 years, 6 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.14.10.1: preferred, colored; next MAIN 1.14.10.2: preferred, colored
Changes since revision 1.14.10.1: +22 -19 lines
bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon May 16 10:18:52 2011 UTC (15 years, 6 months ago) by drochner
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -4 lines
remove redundant declarations

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu May 5 17:42:17 2011 UTC (15 years, 6 months ago) by drochner
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -1 lines
make camellia-cbc known to the opencrypto framework

Revision 1.17.4.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.17: preferred, colored
Changes since revision 1.17: +9 -5 lines
sync with head

Revision 1.17.8.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.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +9 -5 lines
Sync with HEAD

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Feb 25 20:13:10 2011 UTC (15 years, 8 months ago) by drochner
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +7 -4 lines
make the use of SHA2-HMAC by FAST_IPSEC compliant to current standards:
-RFC2104 says that the block size of the hash algorithm must be used
 for key/ipad/opad calculations. While formerly all ciphers used a block
 length of 64, SHA384 and SHA512 use 128 bytes. So we can't use the
 HMAC_BLOCK_LEN constant anymore. Add a new field to "struct auth_hash"
 for the per-cipher blocksize.
-Due to this, there can't be a single "CRYPTO_SHA2_HMAC" external name
 anymore. Replace this by 3 for the 3 different keysizes.
 This was done by Open/FreeBSD before.
-Also fix the number of authenticator bits used tor ESP and AH to
 conform to RFC4868, and remove uses of AH_HMAC_HASHLEN which did
 assume a fixed authenticator size of 12 bytes.

FAST_IPSEC will not interoperate with KAME IPSEC anymore if sha2 is used,
because the latter doesn't implement these standards. It should
interoperate with at least modern Free/OpenBSD now.
(I've only tested with NetBSD-current/FAST_IPSEC on both ends.)

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Feb 24 20:03:41 2011 UTC (15 years, 8 months ago) by drochner
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -3 lines
small modifications in dealing with the unknown result size of compression/
decompression:
-seperate the IPCOMP specific rule that compression must not grow the
 data from general compression semantics: Introduce a special name
 CRYPTO_DEFLATE_COMP_NOGROW/comp_algo_deflate_nogrow to describe
 the IPCOMP semantics and use it there. (being here, fix the check
 so that equal size is considered failure as well as required by
 RFC2393)
 Customers of CRYPTO_DEFLATE_COMP/comp_algo_deflate now always get
 deflated data back, even if they are not smaller than the original.
-allow to pass a "size hint" to the DEFLATE decompression function
 which is used for the initial buffer allocation. Due to the changes
 done there, additional allocations and extra copies are avoided if the
 initial allocation is sufficient. Set the size hint to MCLBYTES (=2k)
 in IPCOMP which should be good for many use cases.

Revision 1.13.4.3: download - view: text, markup, annotated - select for diffs
Wed Sep 16 13:38:03 2009 UTC (17 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.13.4.2: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.4.2: +2 -1 lines
sync with head

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Sep 4 08:58:44 2009 UTC (17 years, 2 months ago) by he
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, 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, matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: rmind-uvmplock, jruoho-x86intr, bouyer-quota2
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -1 lines
It is best to explicitly include <sys/condvar.h> if we're going to
use kcondvar_t.

Revision 1.15.4.1: 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.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +22 -19 lines
Sync with HEAD.

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

Revision 1.13.4.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.13.4.1: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.4.1: +25 -21 lines
sync with head.

Revision 1.14.10.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.14.10.1: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.10.1: +22 -19 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.14.8.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.14.8.1: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.8.1: +22 -19 lines
Sync with HEAD.

Revision 1.16: 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
CVS tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +22 -19 lines
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.14.8.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:20:20 2009 UTC (17 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -3 lines
Sync with HEAD.

Revision 1.12.6.2: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:34 2009 UTC (17 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.12.6.1: preferred, colored; branchpoint 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12.6.1: +3 -2 lines
Sync with HEAD.

Revision 1.14.6.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:33 2008 UTC (17 years, 11 months ago) by haad
Branches: haad-dm
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +4 -3 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.14.10.1: download - view: text, markup, annotated - select for diffs
Thu Nov 20 03:22:38 2008 UTC (18 years ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -3 lines
Pull up following revision(s) (requested by darran in ticket #92):
	sys/opencrypto/cryptodev.c: revision 1.45
	sys/sys/queue.h: revision 1.50
	sys/opencrypto/cryptodev.h: revision 1.15
	sys/opencrypto/crypto.c: revision 1.30
Fix a race condition in opencrypto where the crypto request could be
completed by the crypto device, queued on the retq, but freed by the
ioctl lwp.  The problem manifests as various panics relating to the
condvar inside the request. The problem can occur whenever the crypto
device completes the request immediately and the ioctl skips the
cv_wait().
The problem can be reproduced by enabling cryptosoft and running an
openssl
speed test. E.g.
    sysctl -w kern.cryptodevallowsoft=-1
    openssl speed -engine cryptodev -evp des-ede3-cbc -multi 64
Add a macro for TAILQ_FOREACH_REVERSE_SAFE() to queue.h, since this
was missing and the opencrypto code removes requests from a list while
iterating with TAILQ_FOREACH_REVERSE().
Add missing cv_destroy() calls for the key request cleanup.
Reviewed by Thor Lancelot Simon.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Nov 18 12:59:58 2008 UTC (18 years ago) by darran
Branches: MAIN
CVS tags: nick-hppapmap-base2, mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -3 lines
Fix a race condition in opencrypto where the crypto request could be
completed by the crypto device, queued on the retq, but freed by the
ioctl lwp.  The problem manifests as various panics relating to the
condvar inside the request. The problem can occur whenever the crypto
device completes the request immediately and the ioctl skips the cv_wait().

The problem can be reproduced by enabling cryptosoft and running an openssl
speed test. E.g.
    sysctl -w kern.cryptodevallowsoft=-1
    openssl speed -engine cryptodev -evp des-ede3-cbc -multi 64

Add a macro for TAILQ_FOREACH_REVERSE_SAFE() to queue.h, since this
was missing and the opencrypto code removes requests from a list while
iterating with TAILQ_FOREACH_REVERSE().

Add missing cv_destroy() calls for the key request cleanup.

Reviewed by Thor Lancelot Simon.

Revision 1.12.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:31 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +191 -5 lines
Sync with HEAD.

Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:45 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13: +1 -8 lines
sync with head.

Revision 1.13.4.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:50 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -8 lines
sync with head.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:10 2008 UTC (18 years, 6 months ago) by martin
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, matt-mips64-base2, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -8 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Apr 10 22:48:42 2008 UTC (18 years, 7 months ago) by tls
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +198 -5 lines
Extend crypto.4 interface:

	* Asynchronous operation with result retrieval via select/poll
	* Mutliple-request submit/retrieve ioctls
	* Mutliple-session create-destroy ioctls

Revise/rewrite crypto.4 manual page.  It should now be much easier to write
new applications to this API.

Measured performance for trivial requests: 84,000 very short modular math
operations/sec, 120,000 very short md5 hashes per sec (with a hardware
accellerator of moderate performance but very low latency, whose driver
will be contributed at a later date).

Contributed to TNF by Coyote Point Systems, Inc.

Revision 1.8.16.1: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:09 2008 UTC (18 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +50 -12 lines
sync with HEAD

Revision 1.8.22.1: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:07:18 2008 UTC (18 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +50 -12 lines
Sync with HEAD.

Revision 1.6.4.4: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:24:47 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.6.4.3: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.4.3: +37 -11 lines
sync with head.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Feb 4 00:35:34 2008 UTC (18 years, 9 months ago) by tls
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +33 -1 lines
Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto"
(actually splnet) and condvars instead of tsleep/wakeup.  Fix a few
miscellaneous problems and add some debugging printfs while there.

Restore set of CRYPTO_F_DONE in crypto_done() which was lost at some
point after this code came from FreeBSD -- it made it impossible to wait
properly for a condition.

Add flags analogous to the "crp" flags to the key operation's krp struct.
Add a new flag, CRYPTO_F_ONRETQ which tells us a request finished before
the kthread had a chance to dequeue it and call its callback -- this was
letting requests stick on the queues before even though done and copied
out.

Callers of crypto_newsession() or crypto_freesession() must now take the
mutex.  Change netipsec to do so.  Dispatch takes the mutex itself as
needed.

This was tested fairly extensively with the cryptosoft backend and lightly
with a new hardware driver.  It has not been tested with FAST_IPSEC; I am
unable to ascertain whether FAST_IPSEC currently works at all in our tree.

pjd@FreeBSD.ORG, ad@NetBSD.ORG, and darran@snark.us pointed me in the
right direction several times in the course of this.  Remaining bugs
are mine alone.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Feb 2 02:39:00 2008 UTC (18 years, 9 months ago) by tls
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +5 -2 lines
From Darran Hunt at Coyote Point: don't truncate HMAC to 96 bits unless
actually asked to.

Fixed in FreeBSD a while ago, discussed on tech-kern and tech-crypto.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Feb 1 04:52:35 2008 UTC (18 years, 9 months ago) by tls
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -10 lines
This code never worked on a released version of FreeBSD in the form it's
been in in our tree, and certainly does not work on any version of FreeBSD
now.  Run through unifdef -D__NetBSD__ -U__FreeBSD__ yielding a small
reduction of size and a dramatic improvement in readability.

No, this does not yield any meaningful decrease in patchability (unlike
mechanical changes that touch live source lines) -- try it and see.

Revision 1.6.4.3: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:47:38 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.6.4.2: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.4.2: +14 -2 lines
sync with head

Revision 1.8.28.1: download - view: text, markup, annotated - select for diffs
Sat Jan 19 12:15:38 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +14 -2 lines
Sync with HEAD

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Jan 19 08:08:20 2008 UTC (18 years, 10 months ago) by tls
Branches: MAIN
CVS tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +14 -2 lines
Add constants for modular arithmetic operations other than exponentiation -- there's hardware out there which can do them.

Revision 1.6.4.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:44:23 2007 UTC (19 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.6.4.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.4.1: +17 -17 lines
sync with head.

Revision 1.7.26.1: download - view: text, markup, annotated - select for diffs
Mon Mar 12 06:00:50 2007 UTC (19 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +17 -17 lines
Sync with HEAD.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:40 2007 UTC (19 years, 8 months ago) by christos
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, yamt-idlelwp-base8, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, vmlocking-base, vmlocking, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, reinoud-bufcleanup, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-base, jmcneill-pm-base, jmcneill-pm, jmcneill-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, bouyer-xeni386-merge1, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-armv6, bouyer-xeni386
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +17 -17 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:12:02 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
sync with head.

Revision 1.5.4.6: download - view: text, markup, annotated - select for diffs
Sun Dec 11 10:29:36 2005 UTC (20 years, 11 months ago) by christos
Branches: ktrace-lwp
Diff to: previous 1.5.4.5: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.4.5: +2 -2 lines
Sync with head.

Revision 1.6.10.1: download - view: text, markup, annotated - select for diffs
Tue Nov 29 21:23:33 2005 UTC (20 years, 11 months ago) by yamt
Branches: yamt-readahead
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +2 -2 lines
sync with head.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Nov 25 16:16:46 2005 UTC (20 years, 11 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-readahead-base3, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, post-newlock2-merge, peter-altq-base, peter-altq, newlock2-nbase, newlock2-base, newlock2, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ktrace-lwp-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, ad-audiomp-base, ad-audiomp, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-idlelwp
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
- De-couple the software crypto implementation from the rest of the
  framework.  There is no need to waste the space if you are only using
  algoritms provided by hardware accelerators.  To get the software
  implementations, add "pseudo-device swcr" to your kernel config.
- Lazily initialize the opencrypto framework when crypto drivers
  (either hardware or swcr) register themselves with the framework.

Revision 1.5.10.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:37 2005 UTC (21 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +2 -2 lines
sync with -current

Revision 1.5.12.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:36:52 2005 UTC (21 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +2 -2 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.5.4.5: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:54:22 2005 UTC (21 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.5.4.4: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.4.4: +2 -2 lines
Sync with HEAD.

Hi Perry!

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Feb 26 22:39:52 2005 UTC (21 years, 8 months ago) by perry
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base2, yamt-readahead-base, yamt-km-base4, yamt-km-base3, thorpej-vnode-attr-base, thorpej-vnode-attr, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Branch point for: yamt-readahead, yamt-lazymbuf
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
nuke trailing whitespace

Revision 1.5.4.4: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:38:44 2004 UTC (22 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.5.4.3: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.4.3: +1 -1 lines
Fix the sync with head I botched.

Revision 1.5.4.3: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:56:20 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.5.4.2: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.4.2: +1 -1 lines
Sync with HEAD.

Revision 1.5.4.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:56:25 2004 UTC (22 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.5.4.1: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.4.1: +417 -0 lines
Sync with HEAD

Revision 1.5.4.1
Thu Aug 21 19:44:14 2003 UTC (23 years, 3 months ago) by skrll
Branches: ktrace-lwp
FILE REMOVED
Changes since revision 1.5: +0 -417 lines
file cryptodev.h was added on branch ktrace-lwp on 2004-08-03 10:56:25 +0000

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Aug 21 19:44:14 2003 UTC (23 years, 3 months ago) by jonathan
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, ktrace-lwp, kent-audio2
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +23 -10 lines
Pull in FreeBSD sys/opencrypto/cryptodev.h, revision 1.2.2.5 -> 1.2.2.6.
Sam Leffler's FreeBSD commit message was
  ``to eliminate context switch when returning results from the
     software crypto driver''
but the patch also contains the CRYPTO_SESID*() macros used in newer
ubsec and hifn drivers.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Aug 21 16:08:05 2003 UTC (23 years, 3 months ago) by jonathan
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -2 lines
Pull up `done' flag for crypto operations from FreeBSD. FreeBSD deltas:
  cryptodev.c: 1.4.2.3 -> 1.4.2.4
  cryptodev.h: 1.4.2.4 -> 1.4.2.5

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Jul 30 18:45:31 2003 UTC (23 years, 3 months ago) by jonathan
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +11 -1 lines
Move the initialization of the crypto framework from the userland
pseudo-device to init_main(), so the framework is ready for
registration requests at autoconfiguration time.

Thanks to Quentin Garnier for confirming the change was required, and
for testing a similar fix.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Jul 27 03:34:39 2003 UTC (23 years, 3 months ago) by jonathan
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -2 lines
Cleanup traces of previous standalone m_apply()/m_getptr().

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Jul 25 21:12:44 2003 UTC (23 years, 3 months ago) by jonathan
Branches: MAIN
Commit initial NetBSD port of the OpenCrypto Framework (OCF).  This
code is derived from Sam Leffler's FreeBSD port of OCF, which is in
turn a port of Angelos Keromytis's OpenBSD work.
Credit to Sam and Angelos, any blame for the NetBSD port to me.

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>