x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)

Debuggers may need to change PSL_RF.  Note that tf_eflags is already stored
in the signal context during signal handling and PSL_RF previously could be
modified via sigreturn, so this change should not provide any new ability
to userspace.

For background see the thread at:
http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html

Reviewed by:	jhb, kib
Sponsored by:	DARPA, AFRL


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258135 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Introduce allocation cache to store LZ4 compression contexts without kicking
VM subsystem twice for every written record.

Tests on 24-core system show double reduction of CPU time spent on copying
single large well-compressed file.

This patch is not really needed on illumos (while not harm either) since
their memory allocator by default uses caching for all requests up to 128K.

Reviewed by:	Saso Kiselkov <skiselkov.ml@gmail.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258137 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
gcc: merge rs6000 change from FSF pre-gcc43

config/rs6000/rs6000.c
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01551.html
Don't set MASK_PPC_GFXOPT for 8540 or 8548.

Obtained from:	gcc 4.3 (rev. 124381; GPLv2)
MFC after:	3 weeks
Reviewed by:	nathan


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258138 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Repair build after svn r258115

options.get_size_type() appears to return a const char *, so assume that
its a string as oppose to *nothing*.  I have no idea what apple's code is
trying to do here:

http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258139 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The previous code makes a memory allocation in size of
struct mbx_common_read_write_flashrom plus 32KB and caps the actual
transfer size at 32KB.  This is harmless as it is but may confuse
static code analyzer, so allocate a full 32KB instead.

Reported by:	Coverity via mjacob
Submitted by:	Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
Coverity CID:	1125820


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258140 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The FreeBSD Project now has its own, Ogranizationally Unique Identifier,
assigned by the IEEE.  This file includes documentation on how developers
must carve up the space as well as an initial allocation for bhyve.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258141 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Shift our OUI correctly.

Pointed out by: emaste


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258142 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge vrp-tree fix from gcc-4.3

Fix missed conversion from / to >> (GCC PR32521)

Note that vrp-tree is currently disabled by default in
FreeBSD's gcc due many bugs.

While here fix a revision number in the 4.3 Changelog.

Obtained from:	gcc 4.3 (rev. 122831 - partial; GPLv2)
MFC after:	3 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258143 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Put in the correct bit shifting and add a type to prevent clang from complaining.
While here fix up a grammar nit.

Pointed out by: Sergey Kandaurov and bz@ respectively.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258147 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a note that this file is compiled as part of the kernel and libc.

Requested by:	kib
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258148 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
to the destination cap_rights_t structure.

This already matches manual page.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258149 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Sync return value with actual implementation.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258150 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Style.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258151 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Precisely document capability rights here too (they are already documented
in rights(4)).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258152 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without
the CAP_LOOKUP right, so include this rights.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258153 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
  in index 0 for the future.
- Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include
  CAP_LOOKUP right in them.
- Shuffle the bits around so there are no gaps. This is last chance to do
  that as all moved rights are not used yet.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258154 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
ql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP

Submitted by:David C Somayajulu


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258155 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Validate the buffer and its length passed to QLA_MPI_DUMP.
copyout dump only if qls_mpi_core_dump() is successful.
(like to credit x90c for pointing the issue)
Submitted by:David C Somayajulu


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258156 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
gcc: warn about integer overflow in constant expressions in the C++ frontend.

This fixes GCC 28986:
 http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00473.html

Obtained from:	gcc 4.3 (rev. 120558; GPLv2)
MFC after:	3 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add some more IDs for Intel ATA, AHCI and USB controllers.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@258162 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f