<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/opencrypto, branch releng/8.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F8.3</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F8.3'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2011-04-28T08:49:43Z</updated>
<entry>
<title>MFC 218794, 219026:</title>
<updated>2011-04-28T08:49:43Z</updated>
<author>
<name>VANHULLEBUS Yvan</name>
<email>vanhu@FreeBSD.org</email>
</author>
<published>2011-04-28T08:49:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8f6f640494c790ae27acf17a211424bbacd3b502'/>
<id>urn:sha1:8f6f640494c790ae27acf17a211424bbacd3b502</id>
<content type='text'>
Fixed IPsec's HMAC_SHA256-512 support to be RFC4868 compliant.
This will break interoperability with all older versions of
FreeBSD for those algorithms.

Reviewed by:	bz, gnn
Obtained from:	NETASQ
</content>
</entry>
<entry>
<title>Merge userspace DTrace support from head to stable/8:</title>
<updated>2011-02-28T23:28:35Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2011-02-28T23:28:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e8042b70e21cf9d82f09e2b6b52f0a9b387043ba'/>
<id>urn:sha1:e8042b70e21cf9d82f09e2b6b52f0a9b387043ba</id>
<content type='text'>
r209721:

  Merge from vendor-sys/opensolaris:
  * add fasttrap files

r209731:

  Introduce USD_{SET,GET}{BASE,LIMIT}. These help setting up the user
  segment descriptor hi and lo values. Idea from Solaris.

  Reviewed by:  kib

r209763:

  Fix style issues with the previous commit, namely
  use-tab-instead-of-space and don't use underscores in macro variables.

  Pointed out by:       bde

r210292:

  Fix typo in comment.

r210357:

  MFamd64:
    Add USD_GETBASE(), USD_SETBASE(), USD_GETLIMIT() and USD_SETLIMIT().

r210611:

  Bump the witness pendlist to 768 to accomodate the increased number of
  spinlocks.

r211553:

  Add sysname to struct opensolaris_utsname. This is needed by one DTrace
  test.

r211566:

  Add a sysname char * to struct opensolaris_utsname.

r211606:

  Add the FreeBSD definition for the fasttrap ioctls.

r211607:

  Add a function compatibility function dtrace_instr_size_isa() that on
  FreeBSD does the same as dtrace_dis_isize().

r211608:

  Kernel DTrace support for:
  o uregs  (sson@)
  o ustack (sson@)
  o /dev/dtrace/helper device (needed for USDT probes)

r211610:

  Add more compatibility structure members needed by the upcoming fasttrap
  DTrace device.

r211611:

  Destroy the helper device when unloading.

r211613:

  Fix style issues.

r211614:

  Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
  calling bzero.

r211615:

  Remove an elif and add an or-clause.

r211616:

  Add an extra comment to the SDT probes definition. This allows us to get
  use '-' in probe names, matching the probe names in Solaris.

  Add userland SDT probes definitions to sys/sdt.h.

r211617:

  Call the systrace_probe_func() when the error value.

r211618:

  Port this to FreeBSD. We miss some suword functions, so we use copyout.

r211738:

  Port the fasttrap provider to FreeBSD. This provider is responsible for
  injecting debugging probes in the userland programs and is the basis for
  the pid provider and the usdt provider.

r211744:

  MD fasttrap implementation.

r211745:

  Replace a pksignal() call with tdksignal().

  Pointed out by:       kib

r211746:

  Update for the recent location of the fasttrap code.

r211747:

  Replace structure assignments with explicity memcpy calls. This allows
  Clang to compile this file: it was using the builtin memcpy and we want
  to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

  Submitted by: Dimitry Andric &lt;dimitry at andric.com&gt;
  Reviewed by:  jhb

r211751:

  Add a trap code for DTrace induced traps.

r211752:

  Add two DTrace trap type values. Used by fasttrap.

r211753:

  Enable fasttrap and make dtraceall depend on fasttrap when building i386
  or amd64.

r211804:

  Call the necessary DTrace function pointers when we have different kinds
  of traps.

r211813:

  Add the necessary DTrace function pointers.

r211839:

  Sync DTrace bits with amd64 and fix the build.

r211924:

  Register an interrupt vector for DTrace return probes. There is some
  code missing in lapic to make sure that we don't overwrite this entry,
  but this will be done on a sequent commit.

r211925:

  Replace a memory barrier with a mutex barrier.

r211926:

  Add the path necessary to find fasttrap_isa.h to CFLAGS.

r211929:

  Remove debugging.

r212004:

  When DTrace is enabled, make sure we don't overwrite the IDT_DTRACE_RET
  entry with an IRQ for some hardware component.

  Reviewed by:  jhb

r212093:

  Make the /dev/dtrace/helper node have the mode 0660. This allows
  programs that refuse to run as root (pgsql) to install probes when their
  user is part of the wheel group.

r212357:

  Fix two bugs in DTrace:
  * when the process exits, remove the associated USDT probes
  * when the process forks, duplicate the USDT probes.

r212465:

  Avoid a LOR (sleepable after non-sleepable) in
  fasttrap_tracepoint_enable().

r212494:

  Revamp locking a bit. This fixes three problems:
  * processes now can't go away while we are inserting probes (fixes a panic)
  * if a trap happens, we won't be holding the process lock (fixes a hang)
  * fix a LOR between the process lock and the fasttrap bucket list lock

  Thanks to kib for pointing some problems.

r212568:

  Bump __FreeBSD_version to reflect the userland DTrace changes

Sponsored by:                   The FreeBSD Foundation
Userspace DTrace work by:       rpaulo
</content>
</entry>
<entry>
<title>MFC: r215295</title>
<updated>2010-11-21T00:50:29Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-11-21T00:50:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c08ef373f3405dd747228d1311b1d2d11124e084'/>
<id>urn:sha1:c08ef373f3405dd747228d1311b1d2d11124e084</id>
<content type='text'>
Let cryptosoft(4) add its pseudo-device with a specific unit number and its
probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real
devices hanging off of nexus(4) with no specific devclass set. Actually, the
more desirable fix for this would be to get rid of the newbus interface of
cryptosoft(4) altogether but apparently crypto(9) was written with support
for cryptographic hardware in mind so that approach would require some KPI
breaking changes which don't seem worth it.
</content>
</entry>
<entry>
<title>Merge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the</title>
<updated>2010-11-19T09:49:14Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2010-11-19T09:49:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e76053227fd7fee25190f88376949eddb1b7956f'/>
<id>urn:sha1:e76053227fd7fee25190f88376949eddb1b7956f</id>
<content type='text'>
amd64 suspend/resume support.

Tested by:	Mike Tancsa
Also tested by:	Dewayne Geraghty &lt;dewayne.geraghty heuristicsystems com au&gt;,
     Daryl Richards &lt;daryl isletech net&gt;

Below is the svn log of the merged revisions.
------------------------------------------------------------------------
r197455 | emaste | 2009-09-24 17:26:42 +0300 (Thu, 24 Sep 2009) | 5 lines

Add a backtrace to the "fpudna in kernel mode!" case, to help track down
where this comes from.

Reviewed by:	bde

------------------------------------------------------------------------
r197863 | jkim | 2009-10-08 20:41:53 +0300 (Thu, 08 Oct 2009) | 8 lines

Clean up amd64 suspend/resume code.

- Allocate memory for wakeup code after ACPI bus is attached.  The early
memory allocation hack was inherited from i386 but amd64 does not need it.
- Exclude real mode IVT and BDA explicitly.  Improve comments about memory
allocation and reason for the exclusions.  It is a no-op in reality, though.
- Remove an unnecessary CLD from wakeup code and re-align.

------------------------------------------------------------------------
r198931 | jkim | 2009-11-05 00:39:18 +0200 (Thu, 05 Nov 2009) | 2 lines

Tweak memory allocation for amd64 suspend/resume CPU context.

------------------------------------------------------------------------
r200280 | jkim | 2009-12-09 00:38:42 +0200 (Wed, 09 Dec 2009) | 2 lines

Simplify a macro not to generate unncessary symbols.

------------------------------------------------------------------------
r205444 | emaste | 2010-03-22 13:52:53 +0200 (Mon, 22 Mar 2010) | 7 lines

Merge r197455 from amd64:

  Add a backtrace to the "fpudna in kernel mode!" case, to help track down
  where this comes from.

  Reviewed by:	bde

------------------------------------------------------------------------
r208833 | kib | 2010-06-05 18:59:59 +0300 (Sat, 05 Jun 2010) | 15 lines

Introduce the x86 kernel interfaces to allow kernel code to use
FPU/SSE hardware. Caller should provide a save area that is chained
into the stack of the areas; pcb save_area for usermode FPU state is
on top. The pcb now contains a pointer to the current FPU saved area,
used during FPUDNA handling and context switches.  There is also a
facility to allow the kernel thread to use pcb save_area.

Change the dreaded warnings "npxdna in kernel mode!" into the panics
when FPU usage is not registered.

KPI discussed with:	fabient
Tested by:    pho, fabient
Hardware provided by:	Sentex Communications
MFC after:    1 month

------------------------------------------------------------------------
r208834 | kib | 2010-06-05 19:00:53 +0300 (Sat, 05 Jun 2010) | 13 lines

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

------------------------------------------------------------------------
r208877 | kib | 2010-06-06 19:13:50 +0300 (Sun, 06 Jun 2010) | 5 lines

Style-compilant order of declarations.

Noted by:	bde
MFC after:	1 month

------------------------------------------------------------------------
r209174 | jkim | 2010-06-14 23:08:26 +0300 (Mon, 14 Jun 2010) | 3 lines

Fix ACPI suspend/resume on amd64, which was broken since r208833.
We need actual storage for FPU state to save and restore.

------------------------------------------------------------------------
r209198 | kib | 2010-06-15 12:19:33 +0300 (Tue, 15 Jun 2010) | 10 lines

Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of the FPU.

Explicitely assert that the calling conventions for fpudrop() are
adhered too. In cpu_thread_exit(), add missed critical section entrance.

Reviewed by:	bde
Tested by:	pho
MFC after:	1 month

------------------------------------------------------------------------
r209204 | kib | 2010-06-15 17:59:35 +0300 (Tue, 15 Jun 2010) | 5 lines

Rename CRITSECT_ASSERT to CRITICAL_ASSERT.

Suggested by:	jhb
MFC after:	1 month

------------------------------------------------------------------------
r209208 | kib | 2010-06-15 21:16:04 +0300 (Tue, 15 Jun 2010) | 4 lines

Remove two obsoleted comments, add a note about 32bit compatibility.

MFC after:	1 month

------------------------------------------------------------------------
r209252 | kib | 2010-06-17 15:35:17 +0300 (Thu, 17 Jun 2010) | 6 lines

In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead
of fpu{get,set}regs.

Noted by:	bde
MFC after:	1 month

------------------------------------------------------------------------
r209460 | kib | 2010-06-23 13:40:28 +0300 (Wed, 23 Jun 2010) | 8 lines

Remove unused i586 optimized bcopy/bzero/etc implementations that utilize
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.

Reviewed by:	bde
Tested by:	pho (previous version)

------------------------------------------------------------------------
r209461 | kib | 2010-06-23 14:12:58 +0300 (Wed, 23 Jun 2010) | 8 lines

Remove the support for int13 FPU exception reporting on i386. It is
believed that all 486-class CPUs FreeBSD is capable to run on, either
have no FPU and cannot use external coprocessor, or have FPU on the
package and can use #MF.

Reviewed by:	bde
Tested by:	pho (previous version)

------------------------------------------------------------------------
r209462 | kib | 2010-06-23 14:21:19 +0300 (Wed, 23 Jun 2010) | 8 lines

After the FPU use requires #MF working due to INT13 FPU exception handling
removal, MFi386 r209198:
    Use critical sections instead of disabling local interrupts to ensure
    the consistency between PCPU fpcurthread and the state of FPU.

Reviewed by:	bde
Tested by:	pho

------------------------------------------------------------------------
r210514 | jkim | 2010-07-26 22:53:09 +0300 (Mon, 26 Jul 2010) | 6 lines

Re-implement FPU suspend/resume for amd64.  This removes superfluous uses
of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs().
Also, we do not touch PCB flags any more.

MFC after:	1 month

------------------------------------------------------------------------
r210517 | jkim | 2010-07-27 00:24:52 +0300 (Tue, 27 Jul 2010) | 4 lines

FNSTSW instruction can use AX register as an operand.

Obtained from:	fenv.h

------------------------------------------------------------------------
r210518 | jkim | 2010-07-27 01:16:36 +0300 (Tue, 27 Jul 2010) | 5 lines

Reduce diff against fenv.h:

Mark all inline asms as volatile for safety.  No object file change after
this commit (verified with md5).

------------------------------------------------------------------------
r210519 | jkim | 2010-07-27 01:55:14 +0300 (Tue, 27 Jul 2010) | 2 lines

Remove an unused macro since r189418.

------------------------------------------------------------------------
r210520 | jkim | 2010-07-27 02:02:18 +0300 (Tue, 27 Jul 2010) | 2 lines

Add missing ldmxcsr() prototype for lint case.

------------------------------------------------------------------------
r210521 | jkim | 2010-07-27 02:20:55 +0300 (Tue, 27 Jul 2010) | 3 lines

Simplify fldcw() macro.  There is no reason to use pointer here.  No object
file change after this commit (verified with md5).

------------------------------------------------------------------------
r210614 | jkim | 2010-07-29 19:41:21 +0300 (Thu, 29 Jul 2010) | 2 lines

Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h.

------------------------------------------------------------------------
r210615 | jkim | 2010-07-29 19:49:20 +0300 (Thu, 29 Jul 2010) | 5 lines

Fix another fallout from r208833.  savectx() is used to save CPU context
for crash dump (dumppcb) and kdb (stoppcbs).  For both cases, there cannot
have a valid pointer in pcb_save.  This should restore the previous
behaviour.

------------------------------------------------------------------------
r210777 | jkim | 2010-08-02 20:35:00 +0300 (Mon, 02 Aug 2010) | 13 lines

- Merge savectx2() with savectx() and struct xpcb with struct pcb. [1]
savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs).  Thus,
saving additional information does not hurt and it may be even beneficial.
Unfortunately, struct pcb has grown larger to accommodate more data.
Move 512-byte long pcb_user_save to the end of struct pcb while I am here.
- savectx() now saves FPU state unconditionally and copy it to the PCB of
FPU thread if necessary.  This gives panic dump and kdb a chance to take
a look at the current FPU state even if the FPU is "supposedly" not used.
- Resuming CPU now unconditionally reinitializes FPU.  If the saved FPU
state was irrelevant, it could be in an unknown state.

Suggested by:	bde [1]

------------------------------------------------------------------------
r210804 | jkim | 2010-08-03 18:32:08 +0300 (Tue, 03 Aug 2010) | 6 lines

savectx() has not been used for fork(2) for about 15 years. [1]
Do not clobber FPU thread's PCB as it is more harmful.  When we resume CPU,
unconditionally reload FPU state.

Pointed out by:	bde [1]

------------------------------------------------------------------------
r212026 | jkim | 2010-08-31 00:19:42 +0300 (Tue, 31 Aug 2010) | 3 lines

Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
these values in the function.

------------------------------------------------------------------------
r214347 | jhb | 2010-10-25 18:31:13 +0300 (Mon, 25 Oct 2010) | 5 lines

Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
by intr_disable().

Requested by:	bde

------------------------------------------------------------------------
</content>
</entry>
<entry>
<title>MFC r213065,r213068:</title>
<updated>2010-10-23T22:11:30Z</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2010-10-23T22:11:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=15ba193266e5f3579cb127d5b384f8684535775d'/>
<id>urn:sha1:15ba193266e5f3579cb127d5b384f8684535775d</id>
<content type='text'>
r213065:

Remove redundant space.

r213068:

Add support for AES-XTS.

Obtained from:	OpenBSD
</content>
</entry>
<entry>
<title>MFC r210631:</title>
<updated>2010-08-19T08:50:11Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2010-08-19T08:50:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8b2b854be03961315f24c1fa3a8e35f7c4f20ff2'/>
<id>urn:sha1:8b2b854be03961315f24c1fa3a8e35f7c4f20ff2</id>
<content type='text'>
Add compat32 shims for opencrypto(4).
</content>
</entry>
<entry>
<title>MFC r201898:</title>
<updated>2010-01-17T13:36:13Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2010-01-17T13:36:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8f335c80b5a2dc48b3986b294f6d7a5995bda2c5'/>
<id>urn:sha1:8f335c80b5a2dc48b3986b294f6d7a5995bda2c5</id>
<content type='text'>
  Add comments trying to explain what bad things happen here, i.e.
  how hashed MD5/SHA are implemented, abusing Final() for padding and
  sw_octx to transport the key from the beginning to the end.

  Enlightened about what was going on here by: cperciva
  Reviewed by:  cperciva
</content>
</entry>
<entry>
<title>MFC r199906:</title>
<updated>2009-12-05T19:12:35Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2009-12-05T19:12:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e55ea9c811cb9d323d9220cc1d26bcf286e0a22a'/>
<id>urn:sha1:e55ea9c811cb9d323d9220cc1d26bcf286e0a22a</id>
<content type='text'>
  In case the compression result is the same size as the orignal version,
  the compression was useless as well.  Make sure to not update the data
  and return, else we would waste resources when decompressing.

  This also avoids the copyback() changing data other consumers like
  xform_ipcomp.c would have ignored because of no win and sent out without
  noting that compression was used, resulting in invalid packets at the
  receiver.
</content>
</entry>
<entry>
<title>MFC r199904:</title>
<updated>2009-12-05T19:09:26Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2009-12-05T19:09:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b0b1b85aff681069c2725f2e1d9c98ff83d52d'/>
<id>urn:sha1:d0b0b1b85aff681069c2725f2e1d9c98ff83d52d</id>
<content type='text'>
  Add SDT iter probes forgotten in r199885 (r200138 for stable/8).
</content>
</entry>
<entry>
<title>MFC r199895:</title>
<updated>2009-12-05T19:01:50Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2009-12-05T19:01:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8d6960d085835fd7bb4baf2881997e0cacf4b8a2'/>
<id>urn:sha1:8d6960d085835fd7bb4baf2881997e0cacf4b8a2</id>
<content type='text'>
  Change memory managment from a fixed size array to a list.
  This is needed to avoid running into out of buffer situations
  where we cannot alloc a new buffer because we hit the array size
  limit (ZBUF).
  Use a combined allocation for the struct and the actual data buffer
  to not increase the number of malloc calls. [1]

  Defer initialization of zbuf until we actually need it.

  Make sure the output buffer will be large enough in all cases.

  Details discussed with: kib [1]
  Reviewed by:            kib [1]
</content>
</entry>
</feed>
