jake [Sun, 27 Oct 2002 17:22:43 +0000 (17:22 +0000)]
Don peril sensitive sun glasses and change the default system call vector
for sparc64 from trap #9 to trap #65. This is one of the ABI "blessed"
system call vectors and is different from any other system that we might
want to emulate, making the emulation easier by reducing the number of
code paths that need to be shared. Compatibility with old applications
is provided with COMPAT_FREEBSD4.
Add defines for a few special traps that we may need to implement for
compatibility with 32bit applications, and add comments on which vectors
are used for what in other systems, and which are available.
Pass magic flags to trap() for deprecated or unimplemented system call
vectors so they will deliver SIGSYS instead of SIGILL.
This piggy backs nicely with the recent sigaction(2) system call number
change, and provided the rules are followed for upgrading past it, this
change should not be noticed.
des [Sun, 27 Oct 2002 17:20:49 +0000 (17:20 +0000)]
Slight amendment to rev 1.34: instead of considering any short read an
error, only report an error if no data was read at all (unless len was
0 to start with). Otherwise, the final read of practically any transfer
will end in a fatal error.
des [Sun, 27 Oct 2002 16:11:21 +0000 (16:11 +0000)]
Introduce _fetch_writev(), which is the conn_t version of writev(2). In
the SSL case, it is no different from the old _fetch_write(), but in the
non-SSL case it uses writev(2) to send the entire vector as a single
packet (provided it can fit in one packet). Implement _fetch_write()
and _fetch_putln() in terms of _fetch_writev().
This should improve performance in the non-SSL case (by reducing protocol
overhead) and solve the problem where too-smart-for-their-own-good
firewalls reject FTP packets that do not end in CRLF.
des [Sun, 27 Oct 2002 15:43:40 +0000 (15:43 +0000)]
Eliminate two cases of undefined behaviour: total in _fetch_write() was
not initialized before use, and _http_growbuf() did not return a value
on success.
Reported by: Peter Edwards <pmedwards@eircom.net>
MFC after: 2 weeks
des [Sun, 27 Oct 2002 15:15:13 +0000 (15:15 +0000)]
Add an ETA timer that kicks in after 30 seconds.
Re-add alarm(2) calls around the calls to fetchStat(3) and fetchXGet(3),
since these calls can still time out on DNS lookups or TCP connect(2).
Remove the alarm(2) calls in the main loop, since all methods properly
handle transfer timeouts (as opposed to connection timeouts).
Set the sigalrm flag if a timeout occurs in the main loop.
Move the signal: label up a little so we still set the atime and mtime
when the transfer times out or is interrupted, so that restarted transfers
will work as expected (as long as the file still exists).
des [Sun, 27 Oct 2002 15:08:21 +0000 (15:08 +0000)]
Back out the previous commit, and fix the bug rather than try to hide its
symptoms: make timeouts and short transfers fatal, and set errno to an
appropriate value (ETIMEDOUT for a timeout, EPIPE for a short transfer).
tjr [Sun, 27 Oct 2002 11:30:36 +0000 (11:30 +0000)]
Correct visibility for v*wscanf(), wcstoll() and wcstoull(). These functions
did not exist in ISO C Amd. 1. Add #ifdef __LONG_LONG_SUPPORTED and lint
comments around wcstoll() and wcstoull().
rwatson [Sun, 27 Oct 2002 07:12:34 +0000 (07:12 +0000)]
Implement mac_check_system_sysctl(), a MAC Framework entry point to
permit MAC policies to augment the security protections on sysctl()
operations. This is not really a wonderful entry point, as we
only have access to the MIB of the target sysctl entry, rather than
the more useful entry name, but this is sufficient for policies
like Biba that wish to use their notions of privilege or integrity
to prevent inappropriate sysctl modification. Affects MAC kernels
only. Since SYSCTL_LOCK isn't in sysctl.h, just kern_sysctl.c,
we can't assert the SYSCTL subsystem lockin the MAC Framework.
rwatson [Sun, 27 Oct 2002 07:03:29 +0000 (07:03 +0000)]
Hook up mac_check_system_reboot(), a MAC Framework entry point that
permits MAC modules to augment system security decisions regarding
the reboot() system call, if MAC is compiled into the kernel.
rwatson [Sun, 27 Oct 2002 06:54:06 +0000 (06:54 +0000)]
Merge from MAC tree: rename mac_check_vnode_swapon() to
mac_check_system_swapon(), to reflect the fact that the primary
object of this change is the running kernel as a whole, rather
than just the vnode. We'll drop additional checks of this
class into the same check namespace, including reboot(),
sysctl(), et al.
marcel [Sun, 27 Oct 2002 03:23:05 +0000 (03:23 +0000)]
o Add functionality to add a GPT partition,
o Use DCE compliant UUID functions and provide local
implementations if they don't exist,
o Move dumping of the map to show.c and print the
partition type,
o Some cleanups and rearrangements.
The default GPT partition type is UFS. When no starting block
or size are specified, the tool will create a partition in the
first free space it find (or that fits, depending on the size).
imp [Sat, 26 Oct 2002 22:50:31 +0000 (22:50 +0000)]
Note: 5.0 requires more space. If you don't have 30MB free on /, then
you are going to get hurt badly if you try to do an update from
sources. Make a note of this. While 'experts' could install it in
less space, I think 30MB is a good number.
mux [Sat, 26 Oct 2002 18:16:19 +0000 (18:16 +0000)]
In VOP_LOOKUP, don't deny DELETE and RENAME operations
when ISLASTCN is not set. The actual file which is being
looked up may live in a different filesystem.
bmah [Sat, 26 Oct 2002 17:13:01 +0000 (17:13 +0000)]
Get rid of the boilerplate upgrading information in the release notes,
and point to the Early Adopter's Guide instead, at least for the next
release or two.
rwatson [Sat, 26 Oct 2002 14:38:24 +0000 (14:38 +0000)]
Slightly change the semantics of vnode labels for MAC: rather than
"refreshing" the label on the vnode before use, just get the label
right from inception. For single-label file systems, set the label
in the generic VFS getnewvnode() code; for multi-label file systems,
leave the labeling up to the file system. With UFS1/2, this means
reading the extended attribute during vfs_vget() as the inode is
pulled off disk, rather than hitting the extended attributes
frequently during operations later, improving performance. This
also corrects sematics for shared vnode locks, which were not
previously present in the system. This chances the cache
coherrency properties WRT out-of-band access to label data, but in
an acceptable form. With UFS1, there is a small race condition
during automatic extended attribute start -- this is not present
with UFS2, and occurs because EAs aren't available at vnode
inception. We'll introduce a work around for this shortly.
phantom [Sat, 26 Oct 2002 13:53:22 +0000 (13:53 +0000)]
Add pthread_attr_get_np() function. This is FreeBSD non-portable POSIX threads
extenston function. It supposed to provide facility to get already created
thread's attributes. Looks like it's last thing we need to make JDK's Hotspot
building without requirement to have source tree.
imp [Sat, 26 Oct 2002 06:25:11 +0000 (06:25 +0000)]
A simple make world is too dangerous for most upgrades. Instead, copy
the updating from stable section, and remove the kludge-o-rounds that
are in there.
Sometimes make world is safe, sometimes not. Let's document the safe
way to deal.
imp [Sat, 26 Oct 2002 06:21:00 +0000 (06:21 +0000)]
Note GEOM removal of the compatibility slice, and what you, the
upgrader needs to do about it.
Also, greatly expand the the upgrading from -stable part of this file.
It appears that you need new boot blocks to ensure that the right
kernel is booted single user.
bmah [Sat, 26 Oct 2002 04:48:55 +0000 (04:48 +0000)]
Hook the early adopter's guide into the release build. Its basename
is "EARLY", which is kind of an odd name, but I couldn't think of
anything better that fit the traditional 8.3 naming convention for
release documentation files.
fenner [Fri, 25 Oct 2002 23:02:54 +0000 (23:02 +0000)]
Fix two typos. Using "-eq" instead of "=" in a [ caused an error when
an entry in /etc/sysctl.conf didn't exist. Fixing this exposed a minor
typo "exits" vs. "exist".
However, there doesn't appear to be any provision to run this with
the "lastload" argument, meaning that the error will never appear.
jhb [Fri, 25 Oct 2002 20:22:12 +0000 (20:22 +0000)]
Use the newer "+" modifier on output contraints when a register or
memory datum is used for both input and output instead of using
matching constraints.
phk [Fri, 25 Oct 2002 20:09:45 +0000 (20:09 +0000)]
Reduce the GEOM verbosity under bootverbose to something more sufferable.
This is not quite the set of information I would want, but the tree where
I have the "correct" version is messed up with conflicts.
mux [Fri, 25 Oct 2002 19:41:32 +0000 (19:41 +0000)]
- Rename the DDB specific %z printf format to %y.
- Make DDB use %y instead of %z.
- Teach GCC about %y.
- Implement support for the C99 %z format modifier.
Approved by: re@
Reviewed by: peter
Tested on: i386, sparc64
peter [Fri, 25 Oct 2002 19:15:29 +0000 (19:15 +0000)]
Provide a bit of anti-foot-shooting protection. Make sure that in the
non-cross cases without DESTDIR, that the bin/sh that we're about to
install works. Otherwise, a 'make installworld' without having already
rebooted with a post-signal-fix kernel is a rather big disaster when
important things like /bin/sh coredump.
peter [Fri, 25 Oct 2002 19:10:58 +0000 (19:10 +0000)]
Split 4.x and 5.x signal handling so that we can keep 4.x signal
handling clean and functional as 5.x evolves. This allows some of the
nasty bandaids in the 5.x codepaths to be unwound.
Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an
anti-foot-shooting measure in place, 5.x folks need this for a while) and
finish encapsulating the older stuff under COMPAT_43. Since the ancient
stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *'
to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn
is supposed to take), add a compile time check to prevent foot shooting
there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc.
Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago).
Approved by: re
iwasaki [Fri, 25 Oct 2002 18:46:36 +0000 (18:46 +0000)]
Change method to determine base memory size.
Try INT 15H/E820H first, then fall back to the old compatibility
method (INT 12H).
This is a workaround for newer machines which have broken INT 12H BIOS
service implementation.
phk [Fri, 25 Oct 2002 18:44:42 +0000 (18:44 +0000)]
#include <geom/geom.h> to get proper prototypes. Contrary to my fears we
seem to have all the prerequisites already.
Call g_waitidle() as the first thing in vfs_mountroot() so that we have
it out of the way before we even decide if we should call .._ask() or
.._try().
Call the g_dev_print() function to provide better guidance for the
root-mount prompt.
tmm [Fri, 25 Oct 2002 17:42:14 +0000 (17:42 +0000)]
Initialize tick_MHz and related variables much earlier. After the last
revision of tick.c, this was done at SI_SUB_CLOCKS, which is too late
because tick_MHz is required for DELAY() to work.
tmm [Fri, 25 Oct 2002 17:31:31 +0000 (17:31 +0000)]
Fix iommu_dvmamap_sync() to use the right address when flushing the
streaming cache. This bug could have the potential to cause data
corruption on systems with Psycho U2P bridges (Sabre bridges have no
streaming cache).
However, due to the usual driver architecture, it is believed that
corruption did occur only in rare cases (if at all).