freebsd kernel with SKQ
Go to file
jhb 77364c7973 Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver.
The new driver changed the size of the mfi_dcmd_frame structure in such a
way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an
MFI_IOC_PASSTHRU32 ioctl in the new driver.  As a result, the user pointer
is treated as the buffer length.  mfi_user_command() doesn't have a bounds
check on the buffer length, so it passes a really big value to malloc()
which panics when it tries to exhaust the kmem_map.  Fix this two ways:
- Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set,
  otherwise treat it as an unknown ioctl.
- Add a bounds check on the buffer length passed by the user.  For now
  it fails any user attempts to use a buffer larger than 1MB.

While here, fix a few other nits:
- Remove an unnecessary check for a NULL return from malloc(M_WAITOK).
- Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.

MFC after:	3 days
2012-07-03 16:12:57 +00:00
bin Polish previous revision: if the fts_* routines have lstat()'ed the 2012-06-20 21:10:38 +00:00
cddl Fix clang warning, introduced in the recent dtrace import. 2012-07-03 12:08:55 +00:00
contrib Add a new line to top that provides a brief summary of the ZFS ARC memory 2012-06-27 18:08:48 +00:00
crypto Partially redo r226436, i. e., change "the the" to "the". ca(1), dgst(1), 2012-06-27 19:23:29 +00:00
etc Revert r238004 as more review has come in and there is now a discussion 2012-07-02 17:55:29 +00:00
games Partial revert of previous commit as some of the changes were not 2012-05-10 12:46:12 +00:00
gnu - Switch to BSD sort as default sort. GNU sort will still be installed as 2012-06-27 05:59:01 +00:00
include Make the wchar_t type machine dependent. 2012-06-24 04:15:58 +00:00
kerberos5 Centralize the specification of the krb5 build tools. 2012-06-01 21:26:28 +00:00
lib ctype_l(3): Note that not all these functions are specified by POSIX.1-2008. 2012-07-01 22:18:20 +00:00
libexec Ensure that for the object which is a dependency for some filtee, 2012-06-27 20:24:25 +00:00
release Automatically generate hardware notes for bwn(4). 2012-06-28 10:21:25 +00:00
rescue Disable jail support in ifconfig when either building a rescue 2012-02-14 07:14:42 +00:00
sbin - Make ipfw's sched rules case insensitive, for user-friendliness. 2012-07-03 08:42:48 +00:00
secure Regen ca(1) for r237658. This re-applies r227458, i.e., add a missing "be". 2012-06-27 21:35:45 +00:00
share Add myself to commiters-[doc,ports].dot and calendar.freebsd 2012-07-03 07:28:57 +00:00
sys Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver. 2012-07-03 16:12:57 +00:00
tools A cross-reference takes a man page section as well. Assume pkg(1), 2012-07-02 20:26:11 +00:00
usr.bin Add myself to commiters-[doc,ports].dot and calendar.freebsd 2012-07-03 07:28:57 +00:00
usr.sbin Add a one second sleep before touching the spool directory. If the touch 2012-07-02 20:27:37 +00:00
COPYRIGHT
LOCKS
MAINTAINERS
Makefile Add "hier" as an alternate spelling of "hierarchy" to match hier(9). 2012-07-03 06:41:00 +00:00
Makefile.inc1 Add "hier" as an alternate spelling of "hierarchy" to match hier(9). 2012-07-03 06:41:00 +00:00
ObsoleteFiles.inc Also remove /usr/share/examples/etc/auth.conf, which I didn't even 2012-06-13 16:40:47 +00:00
README
UPDATING - Add UPDATING entry for BSD sort 2012-06-28 08:22:00 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html