wollman [Mon, 28 Oct 2002 00:15:43 +0000 (00:15 +0000)]
Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard). The configuration is done
malloc(3)-style, with either an environment variable or a symlink.
iedowse [Sun, 27 Oct 2002 23:23:51 +0000 (23:23 +0000)]
Fix a case in kern_rename() where a vn_finished_write() call was
missed. This bug has been present since the vn_start_write() and
vn_finished_write() calls were first added in revision 1.159. When
the case is triggered, any attempts to create snapshots on the
filesystem will deadlock and also prevent further write activity
on that filesystem.
marcel [Sun, 27 Oct 2002 23:00:46 +0000 (23:00 +0000)]
In ipi_send(), perform a mf instruction prior to initiating the IPI.
This guarantees that loads and stores emitted before the fence are
made visible before the IPI becomes pended.
Remove the mf.a instruction after initiating the IPI. There's no
guarantee that the IPI becomes pended prior to subsequent reads or
writes. Even if there was a guarantee, it would mostly be without
any benefit.
wollman [Sun, 27 Oct 2002 18:09:49 +0000 (18:09 +0000)]
Implement the new 1003.1-2001 pathconf() keys, including the Advisory
Information option. Other filesystem implementations should do something
similar.
wollman [Sun, 27 Oct 2002 18:07:41 +0000 (18:07 +0000)]
Change the way support for asynchronous I/O is indicated to applications
to conform to 1003.1-2001. Make it possible for applications to actually
tell whether or not asynchronous I/O is supported.
Since FreeBSD's aio implementation works on all descriptor types, don't
call down into file or vnode ops when [f]pathconf() is asked about
_PC_ASYNC_IO; this avoids the need for every file and vnode op to know about
it.
wollman [Sun, 27 Oct 2002 18:03:02 +0000 (18:03 +0000)]
Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys. Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.
Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong. They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago. (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)
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.