Stop tinkering with the parent's VLAN_MTU capability.
Now it is user-controlled through ifconfig(8).
The former ``automagic'' way of operation created more
trouble than good. First, VLAN_MTU consumers other than
vlan(4) had appeared, e.g., ng_vlan(4). Second, there was
no way to disable VLAN_MTU manually if it were causing
trouble, e.g., data corruption.
Dropping the ``automagic'' should be completely invisible
to the user since
a) all the drivers supporting VLAN_MTU
have it enabled by default, and in the first place
b) there is only one driver that can really toggle VLAN_MTU
in the hardware under its control (it's fxp(4), to which
I added VLAN_MTU controls to illustrate the principle.)
Add two knobs to ifconfig(8), `vlanmtu' and `vlanhwtag',
that provide control over the respective capabilities
of an interface, reception of extended frames and hardware
VLAN multiplexor.
Colin Percival [Mon, 26 Jul 2004 07:54:39 +0000 (07:54 +0000)]
In revision 1.228, I accidentally broke the "total number of processes in
the system" resource limit code: When checking if the caller has superuser
privileges, we should be checking the *real* user, not the *effective*
user. (In general, resource limiting is done based on the real user, in
order to avoid resource-exhaustion-by-setuid-program attacks.)
Now that a SUSER_RUID flag to suser_cred exists, use it here to return
this code to its correct behaviour.
Colin Percival [Mon, 26 Jul 2004 07:24:04 +0000 (07:24 +0000)]
Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This is
somewhat clearer, but more importantly allows for a consistent naming
scheme for suser_cred flags.
The old name is still defined, but will be removed in a few days (unless I
hear any complaints...)
Don't force an immediate probe/attach for all devices when compiled with
ACPI_DEBUG. This upset the ordering that acpi_probe_order() was meant to
provide, causing devices to attach before the sysresource object. This
debugging feature has been unnecessary for a while so just remove it.
When sizing the FIFO, don't count all the way up to 1030 if any FIFO
size larger than 128 is considered an incompatible size. Stop counting
when we reach 130 in the loop.
Robert Watson [Mon, 26 Jul 2004 03:53:47 +0000 (03:53 +0000)]
Simple attachment regression test to attach the "accf_data" accept
filter to an inet socket and check at various points during the socket
life cycle that the filter can or cannot be attached, and that once
attached that the right one is attached and that it can be queried.
Tim Kientzle [Mon, 26 Jul 2004 03:21:41 +0000 (03:21 +0000)]
Add a --version option to bsdtar that prints the versions of
both bsdtar and libarchive. Of course, this requires that bsdtar
have a version number. Let's call this 1.00, shall we? ;-)
Tim Kientzle [Mon, 26 Jul 2004 02:54:42 +0000 (02:54 +0000)]
When writing "pax" format, readers are supposed to ignore fields
in the regular ustar header that are overridden by the pax
extended attributes. As a result, it makes perfect sense to
use numeric extensions in the regular ustar header so that readers
that don't understand pax extensions but do understand some other
extensions can still get useful information out of it.
This is especially important for filesizes, as the failure to
read a file size correctly can get the reader out of sync.
This commit introduces a "non-strict" option into the internal
function to format a ustar header. In non-strict mode, the formatter
will use longer octal values (overwriting terminators) or binary
("base-256") values as needed to ensure that large file sizes,
negative mtimes, etc, have the correct values stored in the regular
ustar header.
Robert Watson [Sun, 25 Jul 2004 23:32:32 +0000 (23:32 +0000)]
Revert modification of subr_turnstile.c accidentally included in the
last commit; this assertion was provided by jhb for local debugging
and not intended for broader consumption.
Robert Watson [Sun, 25 Jul 2004 23:29:47 +0000 (23:29 +0000)]
Do some initial locking on accept filter registration and attach. While
here, close some races that existed in the pre-locking world during low
memory conditions. This locking isn't perfect, but it's closer than
before.
Tim Kientzle [Sun, 25 Jul 2004 23:10:38 +0000 (23:10 +0000)]
Allow "posix" as a synonym for "pax". (The gtar folks chose "posix",
which is really, really dumb and just going to cause confusion among
people who understand that "ustar" is also a POSIX standard tar format.)
Alan Cox [Sun, 25 Jul 2004 20:08:59 +0000 (20:08 +0000)]
For years, kmem_alloc_pageable() has been misused. Now that the last of
these misuses has been corrected, remove it before new ones appear, such as
arm/arm/pmap.c revision 1.8.
Warner Losh [Sun, 25 Jul 2004 19:49:01 +0000 (19:49 +0000)]
Expand the generic, but bogusly formed, copyright notice to include
the license from /usr/src/COPYRIGHT. Since cvs annotate shows that
this was written by jasone, julian, jhb, peter, bmilekic and obrien.
cvs log shows that many others may have contributed to this file. As
such, go ahead and use the author of 'FreeBSD Project' for this file.
If this is a problem, please notify me.
# this eliminates the last file in the kernel with an indirect reference
# to /usr/src/COPYRIGHT in the kernel. A few more in userland remain.
Add the beginnings of kernel debugging support. the kgdb(1) tool
is basicly a shell on top of libgdb that knows about kernel threads,
kernel modules and kvm(3). As the word "beginnings" implies, not
all of the features have been implemented yet. The tool is useful
and I'd like feedback on the taken route.
The simplest way to debug a kernel core file is:
kgdb -n 0
This opens /var/crash/vmcore.0 with the corresponding kernel in
the object directory (kernel.debug is used if it exists).
Typical things that need to be added are:
o Auto loading of kernel modules,
o Handling of trapframes so that backtraces can be taken across
them,
o Some fancy commands to extract useful information out of a core
file,
o Various (probably many) other things.
Use a temporary geom when tasting vinumdrives and lock the 'real'
vinumdrive geom with an exclusive bit. This should fix the problem
when underlying partitions overlap (i.e. the 'a' partition is at
the same offset as the 'c' partition).
Ideas borrowed from pjd@, quite a bit of testing by
Matthias Schuendehuette <msch@snafu.de>.
Tim Kientzle [Sat, 24 Jul 2004 22:13:44 +0000 (22:13 +0000)]
A bunch of stuff from Christoph Mellon:
* Whitespace fixes
* Check some malloc calls
* Simplify long_help formatting
* Spell "LINUX" -> "linux"
* A few other miscellaneous style improvements
Tim Kientzle [Sat, 24 Jul 2004 20:08:26 +0000 (20:08 +0000)]
Add some functions to query basic facts about the library:
archive_version: Returns a text string, e.g., "libarchive 1.00.000"
archive_api_version: Returns the SHLIB major version
archive_api_feature: Returns a feature number useful for answering
questions such as "Is this recent enough to do XXX?"
The last two also have macros defined in archive.h, so you can compare
the compile-time and run-time environments. (In particular, you can
compare ARCHIVE_API_VERSION to archive_api_version() to detect library
version mismatches.)
With these in hand, it will soon be time to turn on the
shared-library version of libarchive... stay tuned.
Refine the wait for ATAPI_RESET.
Properly wait for not busy and introduce a timeout for devices not
setting busy (as they should).
Leave a printf in there that states how long the wait was, as I'd like
to get an idea of the variations here. The time needed seems also to be
affected by whether a medium is present or not.
Fix a bug where an item was being removed from a list without using
FOREACH_SAFE. Remove bad cast of retp and instead use an additional
arg to pass back the number of valid outputs. Use the package convenience
functions for parsing packages.
Tim Kientzle [Sat, 24 Jul 2004 17:46:45 +0000 (17:46 +0000)]
Fix the handling of signed values when parsing base-256 header values.
In particular, this means we can now correctly read gtar archives that
contain timestamps prior to the start of the Epoch.
Also, make the code in this area more portable. ANSI C99 headers are
not yet ubiquitous (for example, FreeBSD 4 still lacks them), so be
prepared for systems that don't have the INT64_MAX, INT64_MIN, and
UINT64_MAX macros. This version still requires int64_t and uint64_t be
defined (which can be done in archive_platform.h if necessary), but
doesn't require them to be exactly 64 bits.
Mike Makonnen [Sat, 24 Jul 2004 14:56:21 +0000 (14:56 +0000)]
Ports related rc.d cleanups:
o Separate out local (ports) scripts that use rc.d, and the old style
startup/shutdown scripts and execute them separately. On startup the
rc.d style scripts are executed first and then the old-style scripts.
On shutdown, exactly the reverse happens.
o The rc.d ports scripts should now behave more like base system scripts.
Scripts ending in .sh will be sourced into the current shell, while the
rest will be executed in a subshell. Previously, all ports scripts,
regardless of the .sh suffix, were executed in a subshell.
o The parent script, /etc/rc.d/localpkg, passes its command line arguments
straight to the rc.d ports scripts. This means they should now honor
faststop and faststart commands as well. Old style scripts, should not see
any differences. They will still get either a start or stop command.
o The initial phrase shown during shutdown has been changed to use
"local packages" instead of "daemon processes" to be more inline with the
phrase used during local package startup. The phrases are also used only for
old-style ports script startup/shutdown, whereas previously they were being
used for both rc.d and old-style scripts. This should make startup/shutdown
output a bit less ugly.
Bring the advertised interface capabilities into line with the reality
(in particular, bge(4) hasn't supported rxcsum since if_bge.c#1.5)
Clean up some aspects of capabilities usage, i.e. stop using
if_hwassist to see whether we are doing offload now because if_hwassist
is for TCP/IP layer and it is subordinate to if_capenable.
Thanks to: Aled Morris for donating a nice bge(4) NIC to me
Reviewed by: -net, -hackers (silence)
Alan Cox [Sat, 24 Jul 2004 07:40:35 +0000 (07:40 +0000)]
Simplify vmspace initialization. The bcopy() of fields from the old
vmspace to the new vmspace in vmspace_exec() is mostly wasted effort. With
one exception, vm_swrss, the copied fields are immediately overwritten.
Instead, initialize these fields to zero in vmspace_alloc(), eliminating a
bcopy() from vmspace_exec() and a bzero() from vmspace_fork().
Ken Smith [Fri, 23 Jul 2004 21:21:34 +0000 (21:21 +0000)]
The doc team reworked the section of the handbook describing how to
rebuild things, further discouraging 'make world'. The title of
that section is now changed...
Alan Cox [Fri, 23 Jul 2004 19:36:18 +0000 (19:36 +0000)]
Use kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocating
KVA for explicitly managed mappings, i.e., mappings created with
pmap_qenter().
Robert Watson [Fri, 23 Jul 2004 14:11:04 +0000 (14:11 +0000)]
Don't perform pipe endpoint locking during pipe_create(), as the pipe
can't yet be referenced by other threads.
In microbenchmarks, this appears to reduce the cost of
pipe();close();close() on UP by 10%, and SMP by 7%. The vast majority
of the cost of allocating a pipe remains VM magic.
Alan Cox [Fri, 23 Jul 2004 06:49:49 +0000 (06:49 +0000)]
Use kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocating
KVA for explicitly managed mappings, i.e., mappings created with
pmap_qenter().
Max Laier [Fri, 23 Jul 2004 03:37:05 +0000 (03:37 +0000)]
Fix the following LOR on pf module unload:
1st ifnet (ifnet) @/usr/src/sys/contrib/pf/net/pf_if.c:191
2nd pf task mtx (pf task mtx) @/usr/src/sys/contrib/pf/net/pf_if.c:197