imp [Sat, 7 Aug 2004 04:17:03 +0000 (04:17 +0000)]
Since we upgraded compilers, and the kernel build to match, we can't build
new kernels on older userlands. Document this fact in the entry that talked
about the system upgrade.
marcel [Sat, 7 Aug 2004 04:03:18 +0000 (04:03 +0000)]
Create an EFI partition when the user wants auto defaults. There's
some confusion as to how large the EFI system partition should be,
but 100MB seems to be either the maximum, the minimum or the default
size, so make the EFI partition 100MB.
kientzle [Sat, 7 Aug 2004 03:09:28 +0000 (03:09 +0000)]
libarchive now has two complete build systems. The usual "Makefile"
is present for FreeBSD. If you "make distfile" on FreeBSD, you will
soon have a tar.gz file suitable for deploying to other systems
(complete with the expected "configure" script, etc). This latter
relies (at least for now) on the GNU auto??? tools. (I like autoconf
okay, but someday I hope to write a custom Makefile.in and dispense
with automake, which is somewhat odious.)
As part of this, I've cleaned up some of the conditional
compilation options, added make-foo to construct archive.h dynamically
(it now contains some version constants), and added some useful
informational files.
kientzle [Sat, 7 Aug 2004 02:50:05 +0000 (02:50 +0000)]
Pass the pointy hat, please: Don't blow away the high-order
mode bits when setting permissions from ACL data.
Thanks to: David Gilbert for first reporting this and
Jimmy Olgeni for noticing that it only occurred on
ACL-enabled filesystems.
marcel [Sat, 7 Aug 2004 01:19:54 +0000 (01:19 +0000)]
o Save pointers to the chunks for root, home, swap, usr, var and tmp in
global variables. On ia64, save a pointer to the efi chunk as well.
o At the same time, change checkLabels() to define these globals instead
of having the caller of checkLabels() pass addresses to variables for
these. Change the two callers correspondingly.
o Spent a bit more time adjusting try_auto_label() to prepate for having
the EFI partition created on ia64.
o Remove efi_mountpoint(). The EFI chunk is now available without having
to iterate over the disks and chunks to find it every time we need it.
o On ia64, now that the root chunk is globally available, set the
vfs.root.mountfrom tunable in loader.conf. This avoids that one cannot
boot into FreeBSD after an install. The kernel cannot find the root
device without a little help...
grehan [Sat, 7 Aug 2004 00:20:00 +0000 (00:20 +0000)]
Always isync after a mtmsr. While perhaps not strictly necessary for PSL_EE
bit banging according to the OEA, it's better to be conservative than
having to continually audit uses of this inline.
rwatson [Fri, 6 Aug 2004 22:25:35 +0000 (22:25 +0000)]
Flag a broad range of VFS operations as GIANT_REQUIRED in order to
catch leaking into VFS without Giant.
Inch Giant a little lower in several file descriptor operations on
vnodes to cover only VFS operations that need it, rather than file
flag reading, etc.
njl [Fri, 6 Aug 2004 22:23:53 +0000 (22:23 +0000)]
Fix a panic in ata_generic_transaction(). The DMA pointer of the channel
was being unconditionally dereferenced but was NULL for PIO requests.
Check the request flags for a DMA transaction before dereferencing.
rwatson [Fri, 6 Aug 2004 22:06:14 +0000 (22:06 +0000)]
In thread_exit(), include more information about the thread/process
context in the KTR trace record. In particular, include the same
information as passed for mi_switch() and fork_exit() KTR trace
records.
rwatson [Fri, 6 Aug 2004 22:04:33 +0000 (22:04 +0000)]
Push UIDINFO_UNLOCK() slightly earlier in chgsbize(), as it's not
needed if we print the local variable version of the limit rather
than the shared version.
rwatson [Fri, 6 Aug 2004 22:00:55 +0000 (22:00 +0000)]
Avoid acquiring Giant for some common light-weight or already MPSAFE
fcntl() operations, including:
F_DUPFD dup() alias
F_GETFD retrieve close-on-exec flag
F_SETFD set close-on-exec flag
F_GETFL retrieve file descriptor flags
For the remaining fcntl() operations, do acquire Giant, especially
where we call into fo_ioctl() as a result. We're not yet ready to
push Giant into fo_ioctl(). Once we do, this can all become quite a
bit prettier.
rwatson [Fri, 6 Aug 2004 21:56:26 +0000 (21:56 +0000)]
Generate KTR trace records for syscall enter and exit in i386 system
calls. Note that the information included is a bit different from the
existing KTR traces generated on powerpc, as I'm primarily interested
in kernel context (thread, syscall #, proc, etc), not the user
arguments to the system call. Some convergence would be useful here.
rwatson [Fri, 6 Aug 2004 21:52:38 +0000 (21:52 +0000)]
Generate KTR trace records for uma_zalloc_arg() and uma_zfree_arg().
This doesn't trace every event of interest in UMA, but provides
enough basic information to explain lock traces and sleep patterns.
rwatson [Fri, 6 Aug 2004 21:49:00 +0000 (21:49 +0000)]
Cut a KTR record whenever a callout is invoked. Mark whether it runs
with Giant or not, and include the function point so it can be looked
up against the kernel symbol table during trace analysis.
kensmith [Fri, 6 Aug 2004 20:08:38 +0000 (20:08 +0000)]
I've had 'make release' problems on a large/fast dual processor machine
with doFS.sh consistently dying here because the device didn't exist
in the namespace fast enough after doing the mdconfig. But the device
did eventually show up. There have been similar complaints on mailing
lists that might boil down to this being the problem too.
This is obviously a hack, if anyone knows what might cause a delay
between mdconfig running and when the name appears in the /dev namespace
(inside a chroot-ed environment if that matters) I'd be happy to back
this out.
marcel [Fri, 6 Aug 2004 17:07:40 +0000 (17:07 +0000)]
Now that make(1) passes variables that were given on the command line
to subordinate make(1) invocations through MAKEFLAGS, we cannot add
CFLAGS onto the make(1) command line. This will conflict with the
individual makefiles wanting to append to it, which is not respected
when CFLAGS is given on the command line. Hence build breakage.
So, put CFLAGS in the environment instead.
marcel [Fri, 6 Aug 2004 15:51:31 +0000 (15:51 +0000)]
Do not use hardware flow control for the moment. There are some issues
with it that need to be understood better before they can be resolved.
This takes time and time is already in short supply.
jmg [Fri, 6 Aug 2004 15:06:06 +0000 (15:06 +0000)]
remove /boot/kernel from the default path.. There is already code that
will prepend the current kernel booting... This prevents a problem of
loading /boot/kernel's modules when a different kernel has no modules,
but you left your module_load="YES" in loader.conf...
pjd [Fri, 6 Aug 2004 09:55:40 +0000 (09:55 +0000)]
Fix I/O leakage. We're cloning bios in g_stripe_start_fast(), but when
something goes wrong while running in "fast" mode, we free all bios and
falling back to "economic" mode. Freeing bios, doesn't mean decrease
bio_children, so bio_inbed couldn't be equal to bio_children and request
was never finished.
Decrease bio_children manually when destroying bios.
Reported by: Sam Lawrance <boris@brooknet.com.au>, simon
roam [Fri, 6 Aug 2004 09:08:33 +0000 (09:08 +0000)]
Do not attempt to clean up data that has not been initialized yet.
This fixes two kernel panics on boot when the xl driver fails to
allocate bus/port/memory resources.
cperciva [Fri, 6 Aug 2004 08:49:51 +0000 (08:49 +0000)]
Crypto is now part of the "base" distribution, and the old "release.3"
target no longer exists. Renumber the old release.[4-9] targets to
release.[3-8].
cperciva [Fri, 6 Aug 2004 07:27:08 +0000 (07:27 +0000)]
Join the 21st century: Cryptography is no longer an optional component
of releases. The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.
Approved by: re (scottl), markm
Discussed on: freebsd-current, in late April 2004
njl [Fri, 6 Aug 2004 04:50:56 +0000 (04:50 +0000)]
Refine updates to PCI irq routing. Check _STA and _CRS but only print a
message if they are incorrect. Also, remove the hack of allowing the
initial irq setting to not be in _PRS. As before, the old behavior can be
regained by defining ACPI_OLD_PCI_LINK.
rwatson [Fri, 6 Aug 2004 03:45:45 +0000 (03:45 +0000)]
Pass pcbinfo structures to in6_pcbnotify() rather than pcbhead
structures, allowing in6_pcbnotify() to lock the pcbinfo and each
inpcb that it notifies of ICMPv6 events. This prevents inpcb
assertions from firing when IPv6 generates and delievers event
notifications for inpcbs.
rwatson [Fri, 6 Aug 2004 03:39:28 +0000 (03:39 +0000)]
In ithread_schedule(), when we plan to go harvest some entropy as
a result of scheduling an ithread, cut a KTR_INTR trace record so
that it's clear in tracing interrupt activity where and when the
entropy harvesting code is invoked.
cperciva [Fri, 6 Aug 2004 02:44:58 +0000 (02:44 +0000)]
When reseting a pending callout, perform the deregistration in
callout_reset rather than calling callout_stop. This results in a few
lines of code duplication, but it provides a significant performance
improvement because it avoids recursing on callout_lock.
rwatson [Fri, 6 Aug 2004 02:08:31 +0000 (02:08 +0000)]
When iterating the UDP inpcb list processing an inbound broadcast
or multicast packet, we don't need to acquire the inpcb mutex
unless we are actually using inpcb fields other than the bound port
and address. Since we hold the pcbinfo lock already, these can't
change. Defer acquiring the inpcb mutex until we have a high
chance of a match. This avoids about 120 mutex operations per UDP
broadcast packet received on one of my work systems.
des [Thu, 5 Aug 2004 23:54:04 +0000 (23:54 +0000)]
Just because we have a serial console attached does not mean we don't
want a splash screen.
There seems to be some confusion in the syscons code as to the meaning of
the SC_KERNEL_CONSOLE flag. Its absence is sometimes interpreted to mean
"I am not the system console", and sometimes to mean "I am not the only
VGA console" (see the font loading code for an example of the latter).
Someone with better syscons fu than myself should take a closer look.
green [Thu, 5 Aug 2004 21:54:11 +0000 (21:54 +0000)]
Turn on the new contigmalloc(9) by default. There should not actually
be a reason to use the old contigmalloc(9), but if desired, it the
vm.old_contigmalloc setting can be tuned/sysctld back to 0 for now.
mlaier [Thu, 5 Aug 2004 20:41:38 +0000 (20:41 +0000)]
Use in_cksum_skip() to calculate in4_cksum instead of doing handrolled magic
(that does not compile with !gcc). Moreover we get the benefit for all archs
that have a hand optimized in_cksum_skip().
Submitted by: yongari
Tested by: me (i386, extensivly), pf4freebsd ML (various)
marcel [Thu, 5 Aug 2004 17:44:07 +0000 (17:44 +0000)]
Don't use type unknown for partitions that we don't care about because
the chunk will never be added to the list in that case. Use type mbr
for GPT nested MBRs and use type part for any partition we don't know
or care about. Since the subtype is 0, this should not cause confusion.
jhb [Thu, 5 Aug 2004 15:48:18 +0000 (15:48 +0000)]
Fix the code in rman that merges adjacent unallocated resources to use a
better check for 'adjacent'. The old code assumed that if two resources
were adjacent in the linked list that they were also adjacent range wise.
This is not true when a resource manager has to manage disparate regions.
For example, the current interrupt code on i386/amd64 will instruct
irq_rman to manage two disjoint regions: 0-1 and 3-15 for the non-APIC
case. If IRQs 1 and 3 were allocated and then released, the old code
would coalesce across the 1 to 3 boundary because the resources were
adjacent in the linked list thus adding 2 to the area of resources that
irq_rman managed as a side effect. The fix adds extra checks so that
adjacent unallocated resources are only merged with the resource being
freed if the start and end values of the resources also match up. The
patch also consolidates the checks for adjacent resources being allocated.
cognet [Thu, 5 Aug 2004 14:07:24 +0000 (14:07 +0000)]
Only use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,
in order to unbreak arm make world. The right way to do it with soft floats
will be figured out later.
Discussed with: das
njl [Thu, 5 Aug 2004 06:54:16 +0000 (06:54 +0000)]
Work around non-compliant BIOS PCI link devices. Some systems have the
following behavior:
* Link devices return invalid status (_STA) values. The results are very
unreliable -- sometimes never present. Just ignore the status and pick
the best configuration from _PRS.
* Link devices return invalid current settings (_CRS). Even after setting
the link value, many systems still return a different setting for _CRS.
When setting an IRQ, don't bother to check _CRS to see if we succeeded.
Note that we still check _CRS before routing and this should be addressed
as well.
Since this is a sensitive area, leave the old behavior accessible via
uncommenting the define for ACPI_OLD_PCI_LINK at the top of the file. Once
this has been thoroughly tested, this option and the code it covers will
be removed.
Thanks to Len Brown at Intel for informing us of these issues as he worked
around them in Linux.
njl [Thu, 5 Aug 2004 06:29:12 +0000 (06:29 +0000)]
Remove the attempt to cache the previous page mapped at our identity
location (for the wake code). It should not be needed since we don't
map other pages at the same location and if there was an old mapping, it
would be restored by a fault. The old code had serious problems, namely
that it was restoring the new page it had just removed (not opage) and
it could only guess at the right protection (since there's no
pmap_extract_protect function). Thanks to Alan Cox for explaining much
of this to me.
Also, remove a commented-out initializecpu() call since it is not needed.
Restoring the cpu context is better than attempting to init from scratch.
kan [Thu, 5 Aug 2004 06:00:05 +0000 (06:00 +0000)]
Move boot2 BSS zeroing into btx startup code out of boot1. boot1 does not
have clear idea on boot2 BSS size and leaves portion of it not zeroed out.
btxcsu.s is in much better position for this job.
Obtained from: DragonflyBSD (with minor adjustments)
gshapiro [Thu, 5 Aug 2004 03:09:54 +0000 (03:09 +0000)]
Fix the startup logic for sendmail. If sendmail_enable=yes, don't start
the submit and outbound daemon, else if sendmail_submit_enable=yes, don't
start the outbound daemon. Only one daemon should be started.
Also, do not rebuild database maps at boot time. The code didn't pay
attention to SENDMAIL_MAP_TYPE and assumed 'hash'. Also, admins may
not want maps automatically rebuilt just because the back end database
has changed. Finally, some maps are built with mode tools than just
makemap (e.g., using cidrexpand on the access text file before sending
it to makemap).
yongari [Thu, 5 Aug 2004 02:52:33 +0000 (02:52 +0000)]
Implement TCP/UDP Transmit/Receive checksum offload.
Since HME doesn't compensate the checksum for UDP datagram which
can yield to 0x0, UDP transmit checksum offload is disabled by
default. The UDP Transmit checksum offload can be reactivated
by setting special link option link0 with ifconfig(8).
rwatson [Thu, 5 Aug 2004 02:37:36 +0000 (02:37 +0000)]
Do a lockless read of the BPF interface structure descriptor list head
before grabbing BPF locks to see if there are any entries in order to
avoid the cost of locking if there aren't any. Avoids a mutex lock/
unlock for each packet received if there are no BPF listeners.
das [Thu, 5 Aug 2004 01:46:11 +0000 (01:46 +0000)]
Replace s_isnan.c and s_isnanf.c with the more compact s_isnan.c from
libc. The externally-visible effect of this is to add __isnanl() to
libm, which means that libm.so.2 can once again link against libc.so.4
when LD_BIND_NOW is set. This was broken by the addition of fdiml(),
which calls __isnanl().