History log of /freebsd-9.3-release/sys/crypto/via/padlock.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 231979 21-Feb-2012 kib

MFC r230426:
Add support for the extended FPU states on amd64, both for native
64bit and 32bit ABIs. As a side-effect, it enables AVX on capable
CPUs.

MFC r230765:
Synchronize the struct sigcontext definitions on x86 with mcontext_t.


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 215864 26-Nov-2010 kib

MFaesni r215427:
Only save FPU context when not executing in the context of the crypto
thread.

Tested by: Mike Tancsa
MFC after: 1 week


# 208834 05-Jun-2010 kib

Use the fpu_kern_enter() interface to properly separate usermode FPU
context from in-kernel execution of padlock instructions and to handle
spurious FPUDNA exceptions that sometime are raised when doing padlock
calculations.

Globally mark crypto(9) kthread as using FPU.

Reviewed by: pjd
Hardware provided by: Sentex Communications
Tested by: pho
PR: amd64/135014
MFC after: 1 month


# 188171 05-Feb-2009 imp

identify routine takes driver_t *, not device_t *.


# 187112 12-Jan-2009 jkim

Connect padlock(4) to amd64 build for VIA Nano processors.


# 185026 17-Nov-2008 philip

Fix a potential NULL-pointer dereference in padlock(4).

Spotted by: Coverity (via pjd)
MFC after: 1 week


# 181478 09-Aug-2008 pjd

Simplify session selection/allocation.


# 181477 09-Aug-2008 pjd

- Fix freeing session on newsession failure.
- Update copyright years.


# 181476 09-Aug-2008 pjd

Implify sessions freeing loop.


# 181475 09-Aug-2008 pjd

We don't have to drop a lock around malloc(M_NOWAIT).


# 181474 09-Aug-2008 pjd

When freeing session, restore its ID after zeroing memory.

Bug tracked down by: Patrick Lamaiziere <patfbsd@davenulle.org>


# 181473 09-Aug-2008 pjd

Sessions in-use are at the end of the queue, so use TAILQ_FOREACH_REVERSE()
when looking for them.

Idea from: Patrick Lamaiziere <patfbsd@davenulle.org>


# 180626 20-Jul-2008 pjd

Convert lock that protects sessions list from a mutex to a rwlock.
Now we can use read lock in fast path (padlock_process()).


# 171167 03-Jul-2007 gnn

Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC
option is now deprecated, as well as the KAME IPsec code.
What was FAST_IPSEC is now IPSEC.

Approved by: re
Sponsored by: Secure Computing


# 167755 21-Mar-2007 sam

Overhaul driver/subsystem api's:
o make all crypto drivers have a device_t; pseudo drivers like the s/w
crypto driver synthesize one
o change the api between the crypto subsystem and drivers to use kobj;
cryptodev_if.m defines this api
o use the fact that all crypto drivers now have a device_t to add support
for specifying which of several potential devices to use when doing
crypto operations
o add new ioctls that allow user apps to select a specific crypto device
to use (previous ioctls maintained for compatibility)
o overhaul crypto subsystem code to eliminate lots of cruft and hide
implementation details from drivers
o bring in numerous fixes from Michale Richardson/hifn; mostly for
795x parts
o add an optional mechanism for mmap'ing the hifn 795x public key h/w
to user space for use by openssl (not enabled by default)
o update crypto test tools to use new ioctl's and add cmd line options
to specify a device to use for tests

These changes will also enable much future work on improving the core
crypto subsystem; including proper load balancing and interposing code
between the core and drivers to dispatch small operations to the s/w
driver as appropriate.

These changes were instigated by the work of Michael Richardson.

Reviewed by: pjd
Approved by: re


# 160785 28-Jul-2006 pjd

Remove trailing spaces.


# 160674 25-Jul-2006 pjd

Style fixes.


# 160582 22-Jul-2006 pjd

Implement support for HMAC/SHA1 and HMAC/SHA256 acceleration found in
new VIA CPUs.
For older CPUs HMAC/SHA1 and HMAC/SHA256 (and others) will still be done
in software.

Move symmetric cryptography (currently only AES-CBC 128/192/256) to
padlock_cipher.c file. Move HMAC cryptography to padlock_hash.c file.

Hardware from: Centaur Technologies


# 160573 22-Jul-2006 pjd

Correct few bzero()s.

MFC after: 3 days


# 160568 22-Jul-2006 pjd

Set ses_ictx and ses_octx to NULL after freeing them, so we won't free
them twice.
This is possible for example in situation when session is used in
authentication context, then freed and then used in encryption context
and freed - in encryption context ses_ictx and ses_octx are not touched
at newsession time, but padlock_freesession could still try to free them
when they are not NULL.


# 160325 13-Jul-2006 mr

Use the already stored VIA RNG probe information
instead of probing again.
Adjust style(9) somewhat in probe.c

Reviewed by: pjd
MFC after: 1 week


# 159405 08-Jun-2006 pjd

Fix gratuitous compiler warning.

Reported by: Rong-en Fan <grafan@gmail.com>


# 159279 05-Jun-2006 pjd

- Pretend to accelerate various HMAC algorithms, so padlock(4) can be used
with fast_ipsec(4) and geli(8) authentication (comming soon).
If consumer requests only for HMAC algorithm (without encryption), return
EINVAL.
- Add support for the CRD_F_KEY_EXPLICIT flag, for both encryption and
authentication.


# 157899 20-Apr-2006 pjd

padlock(4) doesn't support explicitly provided keys yet.
Return an error instead of encrypting/decrypting data with a wrong key.


# 157684 12-Apr-2006 pjd

On padlock initialization, allocate memory with M_WAITOK.


# 149211 17-Aug-2005 pjd

Add VIA/ACE "PadLock" support as a crypto(9) driver.

HW donated by: Mike Tancsa <mike@sentex.net>
Most of the code obtained from: OpenBSD
MFC after: 3 days