]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoAdd two knobs to ifconfig(8), `vlanmtu' and `vlanhwtag',
Yaroslav Tykhiy [Mon, 26 Jul 2004 13:25:45 +0000 (13:25 +0000)]
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.

20 years agore-enabled Rev 1.15 (lost during KAME merge at Rev 1.25, due to a KAME bug...)
SUZUKI Shinsuke [Mon, 26 Jul 2004 08:18:37 +0000 (08:18 +0000)]
re-enabled Rev 1.15 (lost during KAME merge at Rev 1.25, due to a KAME bug...)

Obtained from: KAME

20 years agoIn revision 1.228, I accidentally broke the "total number of processes in
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.

Pointed out by: rwatson

20 years agoSave the vinum config back to disk after syncing two plexes.
Lukas Ertl [Mon, 26 Jul 2004 07:30:21 +0000 (07:30 +0000)]
Save the vinum config back to disk after syncing two plexes.

20 years agoRename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This is
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...)

Discussed with: rwatson, scottl
Requested by: jhb

20 years agoAdd DragonFly BSD 1.0.
Sergey A. Osokin [Mon, 26 Jul 2004 06:40:48 +0000 (06:40 +0000)]
Add DragonFly BSD 1.0.

Approved by: wosch (maintainer)

20 years agoDon't force an immediate probe/attach for all devices when compiled with
Nate Lawson [Mon, 26 Jul 2004 06:04:35 +0000 (06:04 +0000)]
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.

Testing by: marcel

20 years agoWhen sizing the FIFO, don't count all the way up to 1030 if any FIFO
Marcel Moolenaar [Mon, 26 Jul 2004 03:54:40 +0000 (03:54 +0000)]
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.

20 years agoSimple attachment regression test to attach the "accf_data" accept
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.

20 years agoAdd a --version option to bsdtar that prints the versions of
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? ;-)

20 years agoWhen writing "pax" format, readers are supposed to ignore fields
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.

20 years agoRevert modification of subr_turnstile.c accidentally included in the
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.

20 years agoIn uipc_connect(), assert that the passed thread is curthread, and pass
Robert Watson [Sun, 25 Jul 2004 23:30:43 +0000 (23:30 +0000)]
In uipc_connect(), assert that the passed thread is curthread, and pass
td into unp_connect() instead of reading curthread.

20 years agoDo some initial locking on accept filter registration and attach. While
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.

20 years agoAllow "posix" as a synonym for "pax". (The gtar folks chose "posix",
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.)

20 years agoThere's a chance that the VINUMDRIVE class tastes before the
Lukas Ertl [Sun, 25 Jul 2004 23:01:09 +0000 (23:01 +0000)]
There's a chance that the VINUMDRIVE class tastes before the
VINUM class, so let the VINUMDRIVE class parse the on-disk
configuration, too.

20 years agomlockall(2) was introduced during the 5.0-CURRENT lifetime.
Ollivier Robert [Sun, 25 Jul 2004 22:02:30 +0000 (22:02 +0000)]
mlockall(2) was introduced during the 5.0-CURRENT lifetime.

20 years agoEliminate unused second argument to reassignbuf() and simplify it
Poul-Henning Kamp [Sun, 25 Jul 2004 21:24:23 +0000 (21:24 +0000)]
Eliminate unused second argument to reassignbuf() and simplify it
accordingly.

20 years agoAdd netatalk mutexes to hard-coded WITNESS lock order.
Robert Watson [Sun, 25 Jul 2004 20:16:51 +0000 (20:16 +0000)]
Add netatalk mutexes to hard-coded WITNESS lock order.

20 years agoFor years, kmem_alloc_pageable() has been misused. Now that the last of
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.

20 years agoExpand the generic, but bogusly formed, copyright notice to include
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.

20 years agoRemove spl calls.
Alan Cox [Sun, 25 Jul 2004 19:28:10 +0000 (19:28 +0000)]
Remove spl calls.

20 years agoWe were forcing a pax extension header for files >= 1G. Set that
Tim Kientzle [Sun, 25 Jul 2004 18:50:24 +0000 (18:50 +0000)]
We were forcing a pax extension header for files >= 1G.  Set that
cutoff to >= 8G, as it should be.

20 years agoRemove an unnecessary comma from the Copyright.
Hiten Pandya [Sun, 25 Jul 2004 16:10:03 +0000 (16:10 +0000)]
Remove an unnecessary comma from the Copyright.

Obtained from:  DragonFly BSD

20 years agoTypo.
Mike Makonnen [Sun, 25 Jul 2004 14:13:45 +0000 (14:13 +0000)]
Typo.

Submitted By: demon

20 years agoAdd an nftw(3) link.
Tim J. Robbins [Sun, 25 Jul 2004 11:17:54 +0000 (11:17 +0000)]
Add an nftw(3) link.

20 years agoCheck for a NULL pointer before dereferencing it.
Lukas Ertl [Sun, 25 Jul 2004 09:41:31 +0000 (09:41 +0000)]
Check for a NULL pointer before dereferencing it.

20 years agowrong order, not 10/03 -> 03/10
Andreas Klemm [Sun, 25 Jul 2004 08:45:57 +0000 (08:45 +0000)]
wrong order, not 10/03 -> 03/10

20 years agoGive better diagnostic for problems with backing files.
Poul-Henning Kamp [Sun, 25 Jul 2004 08:17:23 +0000 (08:17 +0000)]
Give better diagnostic for problems with backing files.

20 years agoNeuter this warning for now, I think I know the remaining issues.
Poul-Henning Kamp [Sun, 25 Jul 2004 08:09:21 +0000 (08:09 +0000)]
Neuter this warning for now, I think I know the remaining issues.

20 years agoMake the code and comments for vm_object_coalesce() consistent.
Alan Cox [Sun, 25 Jul 2004 07:48:47 +0000 (07:48 +0000)]
Make the code and comments for vm_object_coalesce() consistent.

20 years agoWork-around a gcc code generation bug for function descriptors
Marcel Moolenaar [Sun, 25 Jul 2004 07:07:09 +0000 (07:07 +0000)]
Work-around a gcc code generation bug for function descriptors
references (target/16559). This fixes SMP configurations.

Obtained from: arun@

20 years agoHook kgdb into the build.
Marcel Moolenaar [Sun, 25 Jul 2004 05:32:50 +0000 (05:32 +0000)]
Hook kgdb into the build.

20 years agoAdd the beginnings of kernel debugging support. the kgdb(1) tool
Marcel Moolenaar [Sun, 25 Jul 2004 05:29:15 +0000 (05:29 +0000)]
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.

20 years agoA bunch of style and security fixes (error checking return values, etc),
Tim Kientzle [Sun, 25 Jul 2004 04:15:50 +0000 (04:15 +0000)]
A bunch of style and security fixes (error checking return values, etc),
mostly from: Tim J Robbins

20 years agoMore comment frobbing: insert a missing comma, and spell permissions
Robert Watson [Sun, 25 Jul 2004 00:47:11 +0000 (00:47 +0000)]
More comment frobbing: insert a missing comma, and spell permissions
as credential.

20 years agoSpelling fix in comment: s/though/thought/.
Robert Watson [Sun, 25 Jul 2004 00:38:25 +0000 (00:38 +0000)]
Spelling fix in comment: s/though/thought/.

20 years agoOf course, I meant POSIX.1-1996, not 1997.
Tim Kientzle [Sun, 25 Jul 2004 00:31:24 +0000 (00:31 +0000)]
Of course, I meant POSIX.1-1996, not 1997.
Thanks to: Andrey Chernov

20 years agoGet the acpi softc via the devclass, not by caching the device. Replace
Nate Lawson [Sat, 24 Jul 2004 22:41:30 +0000 (22:41 +0000)]
Get the acpi softc via the devclass, not by caching the device.  Replace
apm_softc with a single integer since the whole softc is not used.

20 years agoMinor style nits.
Tim Kientzle [Sat, 24 Jul 2004 22:30:35 +0000 (22:30 +0000)]
Minor style nits.

20 years agoUse a temporary geom when tasting vinumdrives and lock the 'real'
Lukas Ertl [Sat, 24 Jul 2004 22:26:40 +0000 (22:26 +0000)]
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>.

20 years agoA bunch of stuff from Christoph Mellon:
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

20 years agoRework the feature-detection logic in archive_platform.h so that
Tim Kientzle [Sat, 24 Jul 2004 20:47:11 +0000 (20:47 +0000)]
Rework the feature-detection logic in archive_platform.h so that
it will work cleanly with autoconf.

20 years agoDefine the PACKAGE_NAME and PACKAGE_VERSION macros.
Tim Kientzle [Sat, 24 Jul 2004 20:45:04 +0000 (20:45 +0000)]
Define the PACKAGE_NAME and PACKAGE_VERSION macros.

20 years agoSuppress a minor compiler warning if the platform doesn't support hi-res
Tim Kientzle [Sat, 24 Jul 2004 20:43:22 +0000 (20:43 +0000)]
Suppress a minor compiler warning if the platform doesn't support hi-res
timestamps.

20 years agoMove snc.4 over to the i386 section as it only deals with PC98 and i386.
Tom Rhodes [Sat, 24 Jul 2004 20:41:45 +0000 (20:41 +0000)]
Move snc.4 over to the i386 section as it only deals with PC98 and i386.
Bump .Dd and .Dt accordingly.

Requested by: ru

20 years agoWhitespace cleanup and move static variables together.
Nate Lawson [Sat, 24 Jul 2004 20:40:02 +0000 (20:40 +0000)]
Whitespace cleanup and move static variables together.

20 years agoRemove unneeded parens and fix whitespace.
Nate Lawson [Sat, 24 Jul 2004 20:39:25 +0000 (20:39 +0000)]
Remove unneeded parens and fix whitespace.

20 years agoAdd some functions to query basic facts about the library:
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.

20 years agoFix potential buffer overflow.
Lukas Ertl [Sat, 24 Jul 2004 19:11:40 +0000 (19:11 +0000)]
Fix potential buffer overflow.

PR:            bin/14697
Submitted by:  Matthew <kienow@infinet.com>

20 years agoDisable kldunloading of geom_vinum temporarily until I figured out
Lukas Ertl [Sat, 24 Jul 2004 19:04:24 +0000 (19:04 +0000)]
Disable kldunloading of geom_vinum temporarily until I figured out
how to do it correctly.

20 years agoRefine the wait for ATAPI_RESET.
Søren Schmidt [Sat, 24 Jul 2004 19:03:28 +0000 (19:03 +0000)]
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.

20 years agoFix a bug where an item was being removed from a list without using
Nate Lawson [Sat, 24 Jul 2004 17:51:22 +0000 (17:51 +0000)]
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.

20 years agoUse "linux" instead of "LINUX" to control Linux-specific code.
Tim Kientzle [Sat, 24 Jul 2004 17:50:05 +0000 (17:50 +0000)]
Use "linux" instead of "LINUX" to control Linux-specific code.
Thanks to: David O'Brien for pointing this out.

Also, add in a few additional portability tweaks and make a few
more things conditional on features (HAVE_XXXX macros) rather
than platform.

20 years agoFix the handling of signed values when parsing base-256 header values.
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.

20 years agoPrefer NULL to '0' when checking a pointer value.
Robert Watson [Sat, 24 Jul 2004 16:58:56 +0000 (16:58 +0000)]
Prefer NULL to '0' when checking a pointer value.

20 years agoCorrect typo.
Mike Makonnen [Sat, 24 Jul 2004 16:30:31 +0000 (16:30 +0000)]
Correct typo.

Submitted by: eik (and probably many others)

20 years agoRemove rev 1.50.
David E. O'Brien [Sat, 24 Jul 2004 15:30:23 +0000 (15:30 +0000)]
Remove rev 1.50.

20 years agoMerged from sys/dev/sio/sio.c revision 1.450.
Yoshihiro Takahashi [Sat, 24 Jul 2004 15:13:42 +0000 (15:13 +0000)]
Merged from sys/dev/sio/sio.c revision 1.450.

20 years agoAdd my birthday.
Suleiman Souhlal [Sat, 24 Jul 2004 15:02:56 +0000 (15:02 +0000)]
Add my birthday.

Approved by: grehan (mentor)

20 years agoPorts related rc.d cleanups:
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.

Discussed with: portmgr
Has Reservations: eik

20 years agoBring the advertised interface capabilities into line with the reality
Yaroslav Tykhiy [Sat, 24 Jul 2004 13:45:38 +0000 (13:45 +0000)]
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)

20 years agoEnglish fixes, no content change.
Jens Schweikhardt [Sat, 24 Jul 2004 11:54:30 +0000 (11:54 +0000)]
English fixes, no content change.

20 years agoSimplify vmspace initialization. The bcopy() of fields from the old
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().

20 years agoWhite space fix..
Julian Elischer [Sat, 24 Jul 2004 04:57:41 +0000 (04:57 +0000)]
White space fix..
diff reduction for upcoming commit.

20 years agoIf debug.mpsafenet is non-zero, run the NFS server callout without
Robert Watson [Sat, 24 Jul 2004 02:32:27 +0000 (02:32 +0000)]
If debug.mpsafenet is non-zero, run the NFS server callout without
Giant.

20 years agoRemove spl() use from nfsrv_timer.
Robert Watson [Sat, 24 Jul 2004 02:07:09 +0000 (02:07 +0000)]
Remove spl() use from nfsrv_timer.

20 years agoClean up whitespace, increase consistency and correctness.
Scott Long [Fri, 23 Jul 2004 23:09:00 +0000 (23:09 +0000)]
Clean up whitespace, increase consistency and correctness.

Submitted by: bde

20 years agoThe doc team reworked the section of the handbook describing how to
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...

20 years agoDon't include a "\n" in KTR output, it confuses automatic parsing.
Robert Watson [Fri, 23 Jul 2004 20:12:56 +0000 (20:12 +0000)]
Don't include a "\n" in KTR output, it confuses automatic parsing.

20 years agoRemove the previous hack since it doesn't make a difference and is getting
Scott Long [Fri, 23 Jul 2004 19:59:16 +0000 (19:59 +0000)]
Remove the previous hack since it doesn't make a difference and is getting
in the way of debugging.

20 years agoUse kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocating
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().

20 years agoReinforce discouragement of the use of FULL_PREEMPTION.
Robert Watson [Fri, 23 Jul 2004 17:44:07 +0000 (17:44 +0000)]
Reinforce discouragement of the use of FULL_PREEMPTION.

20 years agoExport KTR_COMPILE as a sysctl so you can easily check from user space
Robert Watson [Fri, 23 Jul 2004 17:41:44 +0000 (17:41 +0000)]
Export KTR_COMPILE as a sysctl so you can easily check from user space
what event mask has been compiled into the kernel.

20 years agoDont expect interrupt from ATAPI_RESET, it doesn't deliver one.
Søren Schmidt [Fri, 23 Jul 2004 17:01:47 +0000 (17:01 +0000)]
Dont expect interrupt from ATAPI_RESET, it doesn't deliver one.

20 years agoNow that mlockall(2) is unbroken, use it to keep watchdogd(8) permanently
Brian Feldman [Fri, 23 Jul 2004 15:24:57 +0000 (15:24 +0000)]
Now that mlockall(2) is unbroken, use it to keep watchdogd(8) permanently
out of swap.

20 years agoLet ddb know powerpc is big endian so as to make ddb output
Andrew Gallatin [Fri, 23 Jul 2004 14:45:15 +0000 (14:45 +0000)]
Let ddb know powerpc is big endian so as to make ddb output
human readable.

Obtained from: sparc64/include/db_machdep.h

20 years agoDon't perform pipe endpoint locking during pipe_create(), as the pipe
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.

Suggested by: silby

20 years agoMake this WARNS=3 clean.
Lukas Ertl [Fri, 23 Jul 2004 11:36:35 +0000 (11:36 +0000)]
Make this WARNS=3 clean.

PR:            bin/38931
Submitted by:  Giorgos Keramidas <keramida@freebsd.org>

20 years agoAdd __pure and __pure2 where appropriate.
Tim J. Robbins [Fri, 23 Jul 2004 07:13:35 +0000 (07:13 +0000)]
Add __pure and __pure2 where appropriate.

20 years agoDocument incorrect handling of multibyte characters.
Tim J. Robbins [Fri, 23 Jul 2004 06:56:38 +0000 (06:56 +0000)]
Document incorrect handling of multibyte characters.

20 years agoUse kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocating
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().

20 years agoTweak markup of quoted strings and characters: use Dq instead of enclosing
Tim J. Robbins [Fri, 23 Jul 2004 06:06:58 +0000 (06:06 +0000)]
Tweak markup of quoted strings and characters: use Dq instead of enclosing
strings in ``obsolete quotes''. Use Li and Ql where appropriate.

20 years agoRemove unused variable.
David Schultz [Fri, 23 Jul 2004 06:01:00 +0000 (06:01 +0000)]
Remove unused variable.

Noticed by: Todd Miller <Todd.Miller@courtesan.com>

20 years agoAdd a lengthy discussion of why "tr a-z A-Z" and "tr A-Z a-z" are not the
Tim J. Robbins [Fri, 23 Jul 2004 05:44:04 +0000 (05:44 +0000)]
Add a lengthy discussion of why "tr a-z A-Z" and "tr A-Z a-z" are not the
right way to perform case-conversion.

20 years agoDetect kernel stack excursion into guard pages. Drop into KDB
Peter Grehan [Fri, 23 Jul 2004 05:33:24 +0000 (05:33 +0000)]
Detect kernel stack excursion into guard pages. Drop into KDB
with a wired stack if this is found.

Mostly obtained from:  NetBSD

20 years agoBring KDB stack size into line with thread stack size (4 pages).
Peter Grehan [Fri, 23 Jul 2004 05:31:14 +0000 (05:31 +0000)]
Bring KDB stack size into line with thread stack size (4 pages).

20 years agoAllow DSI exceptions to invoke DDB.
Peter Grehan [Fri, 23 Jul 2004 05:27:17 +0000 (05:27 +0000)]
Allow DSI exceptions to invoke DDB.

20 years agoIn setpgid(), since td is passed in as a system call argument, use it
Robert Watson [Fri, 23 Jul 2004 04:26:49 +0000 (04:26 +0000)]
In setpgid(), since td is passed in as a system call argument, use it
in preference to curthread, which costs slightly more.

20 years agoFix the following LOR on pf module unload:
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

Reported by: Pyun YongHyeon (a long time ago)

20 years agoRefine pf_check_proto_cksum() a bit in order to avoid additional in_pseudo()
Max Laier [Fri, 23 Jul 2004 03:31:42 +0000 (03:31 +0000)]
Refine pf_check_proto_cksum() a bit in order to avoid additional in_pseudo()
calls further down the stack. If we find the cksum to be okay we pretend
that the hardware did all the work and hence keep the upper layers from
checking again.

Submitted by: Pyun YongHyeon

20 years agoMark functions pure where applicable.
Tim J. Robbins [Fri, 23 Jul 2004 02:29:37 +0000 (02:29 +0000)]
Mark functions pure where applicable.

20 years agoMark functions pure where applicable. A notable exclusion is strcoll(),
Tim J. Robbins [Fri, 23 Jul 2004 02:20:05 +0000 (02:20 +0000)]
Mark functions pure where applicable. A notable exclusion is strcoll(),
which is not strictly pure because it calls malloc()/free() in some cases.

20 years agoAllow an effective uid of root to bypass mac_bsdextended rules; the MAC
Robert Watson [Fri, 23 Jul 2004 01:53:28 +0000 (01:53 +0000)]
Allow an effective uid of root to bypass mac_bsdextended rules; the MAC
Framework can restrict the root user, but this policy is not intended
to support that.

Stylish Swiss footwear provided for: trhodes

20 years agoThe ADDR16 relocations were assuming that non-local symbols had an
Peter Grehan [Fri, 23 Jul 2004 00:46:05 +0000 (00:46 +0000)]
The ADDR16 relocations were assuming that non-local symbols had an
addend of 0. This isn't correct, and was quite easy to break by
referring to the address of an element within a structure.

 However, fixing this exposed the fact that symbol lookups for
local variables were returning the base of the section they
were contained in. This case is detected by comparing the return
value from elf_lookup() to the relocbase+addend value: if it is
lesser, but greater than relocbase, then relocbase+addend is
taken to be the authoritative value.

bug reported by:  gallatin

20 years agoIf you insert a pccard modem and then eject it, you get a panic. This
Warner Losh [Thu, 22 Jul 2004 23:16:12 +0000 (23:16 +0000)]
If you insert a pccard modem and then eject it, you get a panic.  This
happens because the sio device was never opened and com->tp is
therefore NULL.  ttygone can't swallow a NULL, so guard against that
possibility.  Other places in this function make similar checks, so I
believe this is correct.

20 years agoMFi386 revision 1.421
Alan Cox [Thu, 22 Jul 2004 23:04:41 +0000 (23:04 +0000)]
MFi386 revision 1.421
 - Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in
   pmap_mapdev().  See revision 1.140 of kern/sys_pipe.c for a detailed
   rationale.

20 years agoRemove redundant inclusion of bus_if.h. It isn't needed in this file, as
Warner Losh [Thu, 22 Jul 2004 22:59:44 +0000 (22:59 +0000)]
Remove redundant inclusion of bus_if.h.  It isn't needed in this file, as
sys/bus.h includes it.

20 years agoMFp4:
Warner Losh [Thu, 22 Jul 2004 22:53:38 +0000 (22:53 +0000)]
MFp4:

Improve child_detached a little and make it conform better to
style(9).  Also, improve comment about what we'll be doing in the
future about driver_added.  Soon it will be possible to kldload usb
drivers and have them attach w/o a need to disconnect/reconnect them.

20 years agoActually free the unit when destroying the interface.
Brooks Davis [Thu, 22 Jul 2004 22:50:15 +0000 (22:50 +0000)]
Actually free the unit when destroying the interface.

Reported by: la at delfi.lt
Tested by: la at delfi.lt
PR: 68618