FreeBSD src
Go to file
bde 458336647a Quick fix for stack overflow when there are more than about 25 slices.
Using recursion to traverse the recursive data structure for extended
partitions was never good, but when slice support was implemented in
1995, the recursion worked for the default maximum number of slices
(32), and standard fdisk utilities didn't support creating more than
the default number.  Even then, corrupt extended partitions could
cause endless recursion, because we attempt to check all slices, even
ones which we don't turn into devices.

The recursion has succumbed to creeping features.  The stack requirements
for each level had grown to 204 bytes on i386's.  Most of the growth was
caused by adding a 64-byte copy of the DOSpartition table to each frame.
The kernel stack size has shrunk to about 5K on i386's.  Most of the
shrinkage was caused by the growth of `struct sigacts' by 2388 bytes
to support 128 signals.

Linux fdisk (a 1997 version at least) can now create 60 slices (4 standard
ones, 56 for logical drives within extended partitions, and it seems to
be leaving room to map the 4 BSD partitions on my test drive), and Linux
(2.2.29 and 2.3.35 at least) now reports all these slices at boot time.

The fix limits the recursion to 16 levels (4 + 16 slices) and recovers
32 bytes per level caused by gcc pessimizing for space.  Switching to
a static buffer doesn't cause any problems due to recursion, since the
buffer is not passed down.  Using a static buffer is wrong in general
because it requires the giant lock to protect it.  However, this problem
is small compared with using a static buffer for dsname().  We sometimes
neglect to copy the result of dsname() before sleeping.

Also fixed slice names when we find more than MAX_SLICES (32) slices.
The number of the last slice found was not passed passed recursively.
The limit on the recursion now prevents finding more than 32 slices
with a standard extended partition data structure anyway.
2000-01-27 05:11:29 +00:00
bin fix cp -vi bug 2000-01-23 03:04:49 +00:00
contrib Document the -X flag. 2000-01-26 18:55:58 +00:00
crypto This commit was generated by cvs2svn to compensate for changes in r56083, 2000-01-16 05:14:57 +00:00
etc Fix English. Also use full spelling and reorg a little while I'm here. 2000-01-25 11:25:59 +00:00
games Backout rev1.7, as it broke adventure(6) (const'ing a non-r/o variable). 1999-12-25 03:50:42 +00:00
gnu Do not use "DEFAULT_VTABLE_THUNKS". The bugs that have existed since 2000-01-25 12:23:13 +00:00
include Sigh. Really fix it this time. It seems the first time through the 2000-01-26 17:38:51 +00:00
kerberos5 Another target to keep "make release" orthogonal. 2000-01-24 20:45:13 +00:00
kerberosIV Update for KTH Kerberos (eBones) v1.0 2000-01-09 08:59:39 +00:00
lib Use a long line instead splitting a line with backslash-newline in synopsis. 2000-01-27 03:04:11 +00:00
libexec several tcp apps IPv6 update 2000-01-25 14:52:10 +00:00
release Add notes about NWFS client and NCP library for Boris. 2000-01-26 17:07:13 +00:00
sbin Fix return value check for inet_pton(). 2000-01-25 13:54:47 +00:00
secure Don't search for libraries in ${LOCALBASE}. This should fix the problems 2000-01-20 07:29:01 +00:00
share Add a reference to ng_ether(8). 2000-01-25 20:34:43 +00:00
sys Quick fix for stack overflow when there are more than about 25 slices. 2000-01-27 05:11:29 +00:00
tools Don't use -C internally. Use -c. For some reason files are not copied 1999-12-15 18:08:56 +00:00
usr.bin Add human-readable output flag, -h 2000-01-25 17:46:59 +00:00
usr.sbin If we're in callback mode, don't forget this fact when we 2000-01-27 00:40:25 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Add the buildkernel and installkernel targets. 2000-01-09 18:17:48 +00:00
Makefile.inc1 Build Kerberos5 if the correct macro is set. This is not for the 2000-01-24 20:11:53 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
UPDATING Add recent entries: 2000-01-19 17:18:43 +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 and the contents of /etc.  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 with config(8) is a somewhat more involved process,
documentation for which can be found at:
   http://www.freebsd.org/handbook/kernelconfig.html
And in the config(8) man page.

The sample kernel configuration files reside in the sys/i386/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 LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


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

contrib		Packages contributed by 3rd parties.

crypto		Export controlled 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.

kerberosIV	Kerberos package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

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/handbook/synching.html