freebsd kernel with SKQ
Go to file
ken 74fd15a8f4 Fix a problem in camcontrol(8) that cropped up with r307684.
In r307684, I changed rescan_or_reset_bus() to bzero stack-allocated CCBs
before sending them to the kernel because there was stack garbage in there
that wound up meaning that bogus CCB flags were set.

While this fixed the 'camcontrol rescan all' case (XPT_DEV_MATCH CCBs were
failing previously), it broke the 'camcontrol rescan 0' (or any other
number) case when INVARIANTS are turned on.  Rescanning a single bus
reliably produced an assert in cam_periph_runccb():

panic: cam_periph_runccb: ccb=0xfffff80044ffe000, func_code=0x708, flags=0xffffdde0

The flags values don't make sense from the code.  Changing the CCBs in
rescan_or_reset_bus() from stack to heap allocated avoids the problem.

It would be better to understand why userland stack allocated CCBs don't
work properly, since there may be other code that breaks if stack allocated
CCBs don't work.

sbin/camcontrol/camcontrol.c:
	In rescan_or_reset_bus(), allocate the CCBs using malloc(3) instead
	of on the stack to avoid an assertion in cam_periph_runccb().

MFC after:	3 days
Sponsored by:	Spectra Logic
2016-10-21 18:54:56 +00:00
bin Increase timeouts so tests have more chances to succeed 2016-10-19 12:23:02 +00:00
cddl Fix tst.args1.c on LP64 platforms. 2016-10-16 19:50:10 +00:00
contrib Expect tests/sys/fs/tmpfs/link_test:kqueue to fail 2016-10-21 05:21:20 +00:00
crypto Merge OpenSSL 1.0.2j. 2016-09-26 14:22:17 +00:00
etc Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite 2016-10-21 05:24:08 +00:00
gnu Revert r307689 2016-10-21 04:49:39 +00:00
include Re-apply change 306811 or alternatively, revert change 307385. 2016-10-16 02:43:51 +00:00
kerberos5 DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
lib Fix few sentence in the man page. 2016-10-21 16:31:58 +00:00
libexec Reference the libc symbols ypresp_{allfn,data} instead of local symbols. 2016-10-16 19:12:22 +00:00
release Fix relnotes build of supported hardware list after r307529 2016-10-17 22:48:29 +00:00
rescue DIRDEPS_BUILD: Build crunchide for the host. 2016-09-01 23:52:25 +00:00
sbin Fix a problem in camcontrol(8) that cropped up with r307684. 2016-10-21 18:54:56 +00:00
secure Merge OpenSSL 1.0.2j. 2016-09-26 14:22:17 +00:00
share Fix a grammar error. 2016-10-21 18:45:09 +00:00
sys Rework r306337. 2016-10-21 18:27:30 +00:00
targets Update i386 build of loader.efi (but leave it disabled) so that we at 2016-10-14 17:25:29 +00:00
tests Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite 2016-10-21 05:24:08 +00:00
tools Remove /usr/libexec/bsdinstall/hardening if MK_BSDINSTALL == no 2016-10-21 08:12:18 +00:00
usr.bin Capsicum support for jot(1) 2016-10-19 21:50:57 +00:00
usr.sbin Add names for some DASP devices. 2016-10-21 15:23:54 +00:00
.arcconfig callsign isn't required anymore 2016-09-29 06:19:45 +00:00
.arclint phabricator related changes: 2015-04-20 20:33:22 +00:00
COPYRIGHT Bump copyright year. 2015-12-31 11:21:45 +00:00
LOCKS
MAINTAINERS Remove myself from kern_timeout.c yeah! 2016-07-27 20:37:32 +00:00
Makefile Add a 'make print-dir' that simply traverses all directories and prints them. 2016-08-31 19:30:52 +00:00
Makefile.inc1 Don't build libssp as a prereq lib if WITHOUT_SSP is set 2016-10-20 21:29:59 +00:00
Makefile.libcompat Fix in-tree GCC builds after r304681. 2016-08-23 19:29:37 +00:00
ObsoleteFiles.inc Fix dates + add an UPDATING entry. 2016-10-17 21:35:13 +00:00
README README: remove nonexistent 'games' directory. 2016-05-18 10:43:13 +00:00
UPDATING After deeper software archaeology, reports that 10.3R was affected 2016-10-19 15:13:08 +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.  See build(7)
and 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.  See build(7), config(8),
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
for more information.

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 kernel configuration files reside in the sys/<arch>/conf
sub-directory.  GENERIC is the default configuration used in release builds.
NOTES contains entries and documentation for all possible
devices, not just those commonly used.


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.

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.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

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