Tim Kientzle [Fri, 30 Apr 2004 18:17:51 +0000 (18:17 +0000)]
Speed up hardlink detection by using a self-sizing hash
table rather than the old linear list search.
On my "hardlink detection torture test", this reduced
user time from 4700 seconds down to 4.2 seconds
and wallclock time from 1:24:48 down to 1:08.
(Yes, that's over one THOUSAND times reduction in user time. ;-)
In the worst case, the new code doubles peak memory usage,
though it could actually reduce memory usage in many cases.
Thomas Moestl [Fri, 30 Apr 2004 17:25:47 +0000 (17:25 +0000)]
Remove the sio EBus attachment, which never worked with an unpatched
driver because sio(4) uses ISA-specific functions. uart(4) has full
support for the respective hardware and should be used instead.
Peter Wemm [Fri, 30 Apr 2004 16:32:40 +0000 (16:32 +0000)]
Checkpoint commit for an alternative WIP kernel module loader that isn't
as dependent on binutils features/quirks as the current one. This one
loads plain .o files without having to mess with shared object mode.
This happens to be essential on amd64, because binutils hasn't implemented
all the quirks/features that we need for producing the hack non-PIC shared
objects. As it turned out, .o format isn't all that inconvenient after
all. It looks like the ability to use the same .o files for linking
directly into a static kernel or loading as a module might be worth it.
It is still very much a work-in-progress, but it is almost usable. Other
changes are still needed in order to use it though, these have not been
committed yet. There is still a memory corruption/overrun bug somewhere.
For example, test modules load and work, but the machine explodes a few
minutes later in vm_forkproc() or the like. Notable missing things
include kldxref support, and loader(8) support. I wanted to figure out
a working baseline set of code first.
Ken Smith [Fri, 30 Apr 2004 13:52:09 +0000 (13:52 +0000)]
Sorry for doing this backwards, but as with most release related stuff
we only pay attention to it during release time and at the moment it's
a -stable release in progress.
This is a MFS I guess, moving rev 1.536.2.113 to HEAD. I ran out of
time to follow through with doing this last night. Sorry for the delay.
Adding a couple of variables to make tweaking the CD-ROM label and .iso
filenames easier.
Allow disks with a GPT to be used on big-endian machines. The GPT is
little-endian by definition and needs byte-swap operations for any
multi-byte field. While here fix indentation.
Ruslan Ermilov [Thu, 29 Apr 2004 18:58:38 +0000 (18:58 +0000)]
Convert block comments into C-style that is understood by cpp(1).
Keep line comments in assembler style. A few lines that match
the '^[[:space:]]+#' regexp still need to be fixed, somehow.
Revert previous change to this file because it breaks some
things which compare /etc/fstab entries to results from
getfsstat(). The real way to fix this is to make 'ufs2'
a recognized filesystem (for real, no beating around the
bush).
This should fix things like 'umount -a -t ufs' now.
Appologies for the previous breakage.
Tim Kientzle [Thu, 29 Apr 2004 05:19:42 +0000 (05:19 +0000)]
Implement ARCHIVE_EXTRACT_UNLINK for regular files. This supports the
-U flag to bsdtar. Essentially, this option breaks existing hard
links. According to SUSv2, tar is supposed to overwrite existing
files on extract by default which, in particular, preserves
existing hard links. Note that this is yet another bug in gtar; it
appears to always break existing links. (Maybe gtar's -U is broken?)
I'm unsure about how to handle this for other file types; the current
code always unlinks first unless the NO_OVERWRITE flag is specified.
I've commented this issue liberally and will come back to it later.
Daniel Eischen [Wed, 28 Apr 2004 20:36:53 +0000 (20:36 +0000)]
Keep track of threads waiting in kse_release() to avoid a race
condition where kse_wakeup() doesn't yet see them in (interruptible)
sleep queues. Also add an upcall check to sleepqueue_catch_signals()
suggested by jhb.
This commit should fix recent mysql hangs.
Reviewed by: jhb, davidxu
Mysql'd by: Robin P. Blanchard <robin.blanchard at gactr uga edu>
Ruslan Ermilov [Wed, 28 Apr 2004 14:31:44 +0000 (14:31 +0000)]
After talking to Bruce Evans and reading more standards specs,
switch to using C99-style comments everywhere in preprocessed
assembler. The reason is that lines starting with the regexp
'^[[:space:]]#' are treated as preprocessing directives, and
while it seems to work now with GCC, it's not necessarily has
to work. Use C99 comments `//' for the trailing comments to
save whitespace.
Protect som cross-script invocations by checks to see that the target
script exists. This allows pruning of rc.d scripts without getting
too many ugly boottime error message
Initdiskless must run before ipfw, or people will not be able to
use the conf/* stuff for their firewall configuration.
Running ipfw before could seem to make sense in that it would allow
one to setup access to the NFS server on a "default-deny" kernel,
but it is pretty obvious to the casual observer that such a configuration
never makes it far enough to mount the NFS-root in the first place.
Thomas Moestl [Wed, 28 Apr 2004 13:06:46 +0000 (13:06 +0000)]
Fix the EBus driver to work with the new PCI code. Unlike other PCI
bridges, the EBus bridge has resource ranges it claims exclusively to
map its children into in its BARs. Hence, we need to allocate these
completely and manage them for the children, instead of just passing
allocations through to the PCI layer as we did before.
While being there, split ebus_probe(), which did also contain code
normally belonging into the attach method, into ebus_probe() and
ebus_attach(), and perform some minor cleanups.
Tim Kientzle [Wed, 28 Apr 2004 04:34:07 +0000 (04:34 +0000)]
Add the libarchive-formats.5 manpage. This summarizes the various
archive formats supported by libarchive, with some information about
the relative strengths and weaknesses of each format and notes about
issues with libarchive's support for those formats.
This page should make it unnecessary to list all of the libarchive
formats in the manpage of each program that uses libarchive.
Such programs can simply refer to libarchive-formats(5).
Tim Kientzle [Wed, 28 Apr 2004 03:44:08 +0000 (03:44 +0000)]
Add read support for four more common cpio variants:
* little-endian old-style binary cpio archives
* big-endian old-style binary cpio archives
* SVR4 portable archives without CRC
* SVR4 portable archives with CRC
Note that I don't yet verify the CRC for the last one, and I'm
not quite certain I'm correctly parsing device numbers.
David Schultz [Wed, 28 Apr 2004 01:27:36 +0000 (01:27 +0000)]
Various quibbles:
- Print a diagnostic if kdumpenv() fails. This can occur due to MAC
restrictions or lack of memory. Catch all kenv(2) failures as well.
- Just of the heck of it, DTRT if the kernel environment size changes
at the wrong time. The old code could fail silently or fail to
null-terminate a buffer if you got exceptionally unlucky.
- Sort and GC the #includes.
David Schultz [Wed, 28 Apr 2004 01:27:33 +0000 (01:27 +0000)]
If the buffer supplied to kenv(KENV_DUMP, ...) isn't big enough,
return the number of bytes needed instead of 0. The manpage claims
that we do this anyway.
John Baldwin [Tue, 27 Apr 2004 20:03:26 +0000 (20:03 +0000)]
- The i8254 uses IRQ 0, not IRQ 8. Correct i8254_intsrc to reference the
correct interrupt source.
- Cache a pointer to the i8254_intsrc's pending method to avoid several
pointer indirections in i8254_get_timecount().
When using this in non-NFSroot circumstances, `mount -t nfs` may
return empty. Add a dummy element to prevent the alternate action
of the shell builtin "set"
Ruslan Ermilov [Tue, 27 Apr 2004 15:00:29 +0000 (15:00 +0000)]
- Added rad_demangle() for demangling user-passwords (needed for
MS-CHAPv1 MPPE-keys).
- Added rad_demangle_mppe_key() for demangling mppe-keys (needed
for MPPE-keys).
- Added some typecasts for avoiding compiler warnings.
- Fix: better handle wrong usage of the lib (if the programmer
has not called rad_create_request() but rad_put_*(), then a
weird error message was returned).
- Added a new function for putting the Message-Authenticator.
- Verify the Message-Authenticator, if it was found inside a
response packet and silently drop the packet, if the validation
failed.
- Implicitly put the Message-Authenticator, if the EAP-Message
attribute was added.
- Added some missing defines.
Guy Helmer [Tue, 27 Apr 2004 14:43:03 +0000 (14:43 +0000)]
Invoke tzset(3) within the main loop to catch changes to /etc/localtime
when running as a daemon in the hope that it will fix situations
where the CMOS clock was apparently set using the stale TZ offset.
Use pci_get_progif to decide if this is one of the primary/secondary
channels. This also work when PCI native mode has been selected
(patch for /sys/dev/pci/pci.c needed for that) since pci_get_progif
uses the saved value for progif, not the one stored after we may have
changed from legacy mode to native PCI mode.
Mike Heffner [Tue, 27 Apr 2004 00:31:36 +0000 (00:31 +0000)]
Import the latest (4/26/04) CVS lukemftp. This adds the ability to
have a prefix string on the progressbar and brings in a patch by mux@
to fix the condition when connect() returns EINTR.
Tim Kientzle [Mon, 26 Apr 2004 23:37:54 +0000 (23:37 +0000)]
Update file flag handling.
The new fflags support in archive_entry supports Linux and FreeBSD
file flags and is a bit more gracious about unrecognized flag names
than strtofflags(3). This involves some minor API breakage.
The default tar format ("restricted pax") now enables pax extensions
when archiving files that have flags. In particular, copying dir
heirarchies with 'bsdtar cf - -C src . | bsdtar xpf - -C dest' now
preserves file flags. (Note the "p" on extract!)
While I'm here, fill in some additional explanation in the
archive_entry.3 manpage, fill in some missing MLINKS, mark some
overlooked internal functions 'static', and make a few minor style
fixes.
Give jail(8) the feature to allow raw sockets from within a
jail, which is less restrictive but allows for more flexible
jail usage (for those who are willing to make the sacrifice).
The default is off, but allowing raw sockets within jails can
now be accomplished by tuning security.jail.allow_raw_sockets
to 1.
Turning this on will allow you to use things like ping(8)
or traceroute(8) from within a jail.
The patch being committed is not identical to the patch
in the PR. The committed version is more friendly to
APIs which pjd is working on, so it should integrate
into his work quite nicely. This change has also been
presented and addressed on the freebsd-hackers mailing
list.
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
PR: kern/65800
Removes the check for the existence of the sysctl variable
debug.watchdog since it is not created by hardware watchdog(4) devices.
The watchdog(4) device is always compiled in the kernel, so removing the
check should not cause any problems.
Andrew Gallatin [Mon, 26 Apr 2004 17:49:05 +0000 (17:49 +0000)]
MFamd64: implement the PG_UNMANAGED flag on vm_pages.
Alan noticed that alpha ignored PG_UNMANAGED when we were looking into
pmap_emulate_reference() panics. Perhaps this will help.