cperciva [Sat, 2 Aug 2008 00:09:41 +0000 (00:09 +0000)]
Add "IDS" command to freebsd-update. This was present in the original
version of freebsd-update, but I took it out when I rewrote everything
and added FreeBSD Update to the base system because I didn't think it
was useful. It turns out that quite a few people liked it and wanted
it back.
Requested by: Royce Williams + others
MFC after: 2 weeks
julian [Fri, 1 Aug 2008 22:21:03 +0000 (22:21 +0000)]
The IPFW code accepts the use of the tablearg keyword along with the skipto
keyword. But it doesn't work. Two options.. make it no longer accept it,
or actually make it work.. I chose the 2nd..
Allow the tablearg to be used to specify a skipto destination.
This is actually a very powerful construct if used correctly, or a sink
of cpu cycles if used badly.
antoine [Fri, 1 Aug 2008 22:13:39 +0000 (22:13 +0000)]
Make "1000baseT" the description and "1000baseTX" the alias for
IFM_1000_T instead of the reverse. It is possible FreeBSD doesn't
even support 1000baseTX.
This changes ifconfig(8) output.
Requested by: gavin@ and bms@
See also: http://docs.freebsd.org/cgi/mid.cgi?20050307191901.H32508
jhb [Fri, 1 Aug 2008 21:52:41 +0000 (21:52 +0000)]
Tweak the support for using ldd on 32-bit objects a bit further.
Specifically, build a 32-bit /usr/bin/ldd32 on amd64 which handles 32-bit
objects. Since it is a 32-bit binary, it can fork a child process which
can dlopen() a 32-bit shared library. The current 32-bit support in ldd
can't do this because it does the dlopen() from a 64-bit process. In order
to preserve an intuitive interface for users, the ldd binary automatically
execs /usr/bin/ldd32 for 32-bit objects. The end result is that ldd on
amd64 now transparently handles 32-bit shared libraries in addition to
32-bit binaries.
csjp [Fri, 1 Aug 2008 21:38:46 +0000 (21:38 +0000)]
Annotate why we do not call BPF_CHECK_DIRECTION() in this tapping routine.
There is no way for the caller to tell us which direction this packet is
going. With the bpf_mtap{2} routines, we can check the interface pointer.
jhb [Fri, 1 Aug 2008 21:33:07 +0000 (21:33 +0000)]
Use the new bus device_shutdown hook for performing the shutdown action
on the ee16 parts rather than explicitly registering an event handler
that wasn't being torn down on detach.
jhb [Fri, 1 Aug 2008 20:39:18 +0000 (20:39 +0000)]
- Use an sx lock to serialize writes since they update the checksum.
- Remove D_NEEDGIANT as the rtc drivers already have their own locks, so
this doesn't need Giant.
des [Fri, 1 Aug 2008 02:48:36 +0000 (02:48 +0000)]
Upgrade to OpenSSH 5.1p1.
I have worked hard to reduce diffs against the vendor branch. One
notable change in that respect is that we no longer prefer DSA over
RSA - the reasons for doing so went away years ago. This may cause
some surprises, as ssh will warn about unknown host keys even for
hosts whose keys haven't changed.
des [Fri, 1 Aug 2008 01:30:26 +0000 (01:30 +0000)]
These two files have no local patches except to prevent expansion of the
original $FreeBSD$ keywords. Revert those changes, and simply disable
keyword expansion.
das [Fri, 1 Aug 2008 01:24:25 +0000 (01:24 +0000)]
Fix some problems with asinf(), acosf(), atanf(), and atan2f():
- Adjust several constants for float precision. Some thresholds
that were appropriate for double precision were never changed
when these routines were converted to float precision. This
has an impact on performance but not accuracy. (Submitted by bde.)
- Reduce the degrees of the polynomials used. A smaller degree
suffices for float precision.
- In asinf(), use double arithmetic in part of the calculation to
avoid a corner case and some complicated arithmetic involving a
division and some buggy constants. This improves performance and
accuracy.
Max error (ulps):
asinf acosf atanf
before 0.925 0.782 0.852
after 0.743 0.804 0.852
As bde points out, it's cheaper for asin*() and acos*() to use
polynomials instead of rational functions, but that's a task for
another day.
emax [Fri, 1 Aug 2008 00:36:43 +0000 (00:36 +0000)]
Implement ratelimiting for debug messages. For now, allow at most
one message per second. In the future might add a sysctl knob for
each socket family to fine tune this.
Enhance pmap_change_attr(). Specifically, avoid 2MB page demotions, cache
mode changes, and cache and TLB invalidation when some or all of the
specified range is already mapped with the specified cache mode.
Parse sysctl settings from /etc/sysctl.conf.local after /etc/sysctl.conf
if it exists. This mirrors similar behavior for /boot/loader.conf and
/etc/rc.conf.
In mac_bsdextended's auditctl and acct policy access control checks,
return success if the passed vnode pointer is NULL (rather than
panicking). This can occur if either audit or accounting are
disabled while the policy is running.
Since the swapoff control has no real relevance to this policy,
which is concerned about intent to write rather than water under the
bridge, remove it.
PR: kern/126100
Reported by: Alan Amesbury <amesbury at umn dot edu>
MFC after: 3 days
Add thr_pread_{int,long,ptr} and thr_pwrite_{int,long,ptr} to
help abstract the sizes and endianness of the primary types of
the target. These currently use the native characteristics.
das [Thu, 31 Jul 2008 19:57:50 +0000 (19:57 +0000)]
As in other parts of libm, mark a few constants as volatile to prevent
spurious optimizations. gcc doesn't support FENV_ACCESS, so when it
folds constants, it assumes that the rounding mode is always the
default and floating point exceptions never matter.
Currently, BSM audit pathname token generation for chrooted or jailed
processes are not producing absolute pathname tokens. It is required
that audited pathnames are generated relative to the global root mount
point. This modification changes our implementation of audit_canon_path(9)
and introduces a new function: vn_fullpath_global(9) which performs a
vnode -> pathname translation relative to the global mount point based
on the contents of the name cache. Much like vn_fullpath,
vn_fullpath_global is a wrapper function which called vn_fullpath1.
Further, the string parsing routines have been converted to use the
sbuf(9) framework. This change also removes the conditional acquisition
of Giant, since the vn_fullpath1 method will not dip into file system
dependent code.
The vnode locking was modified to use vhold()/vdrop() instead the vref()
and vrele(). This will modify the hold count instead of modifying the
user count. This makes more sense since it's the kernel that requires
the reference to the vnode. This also makes sure that the vnode does not
get recycled we hold the reference to it. [1]
Merge of the source for igb and em into dev/e1000, this
proved to be necessary to make the static drivers work
in EITHER/OR or BOTH configurations. Modules will still
build in sys/modules/igb or em as before.
This also updates the igb driver for support for the 82576
adapter, adds shared code fixes, and etc....
ed [Wed, 30 Jul 2008 21:18:38 +0000 (21:18 +0000)]
Add POSIX -p flag to make(1).
This article [1] describes the -p flag for make(1):
Write to standard output the complete set of macro definitions and
target descriptions. The output format is unspecified.
We already support a similar flag (-d g1), but unlike -p, it still
executes commands. Our implementation just turns it into -d g1, but also
sets flag `printGraphOnly', which will cause make(1) to skip execution.
Trim some noise from some #ifdef's. This had leaked into the compat32
support for bpf(4) due to hacks in the Y! tree for a truss32 binary
(since superseded by native support for 32-bit binaries in truss itself).
The original adduser/rmuser scripts in Perl used to modify the PATH
setting. When the scripts were converted to Bourne shell, this was
removed. The adduser script was changed to use an explicit path for
the pw(8) command so that /usr/sbin did not have to be in the user's
PATH. The rmuser script continued to assume that /usr/sbin was in the
user's path, however. This fixes the rmuser script to use an explicit
path for pw(8) similar to adduser.
The behaviour of the lockmgr going back at least to the 4.4BSD-Lite2 was
to downgrade the exclusive lock to shared one when exclusive lock owner
requested shared lock. New lockmgr panics instead.
The vnode_pager_lock function requests shared lock on the vnode backing
the OBJT_VNODE, and can be called when the current thread already holds
an exlcusive lock on the vnode. For instance, it happens when handling
page fault from the VOP_WRITE() uiomove that writes to the file, with
the faulted in page fetched from the vm object backed by the same file.
We then get the situation described above.
Verify whether the vnode is already exclusively locked by the curthread
and request recursed exclusive vnode lock instead of shared, if true.
Set all of the "optimum performance" PHY registers for the 15D parts as
well as the 15C since it seems to be required in practice. The Linux
natsemi.c driver mostly does this as well.
PR: kern/112179
Submitted by: Mark Willson mark - hydrus org uk
MFC after: 1 week
des [Wed, 30 Jul 2008 15:37:13 +0000 (15:37 +0000)]
According to a proposed Norwegian standard for alphabetization of which
I've obtained a draft, <u:> is indeed equivalent to u (to my surprise),
and <th> sorts immediately after z.
The correct ordering is algorithmic (based on the EOR) and can not be
accurately represented as a table.
ed [Wed, 30 Jul 2008 12:39:18 +0000 (12:39 +0000)]
Remove the use of lbolt from the VFS syncer.
It seems we only use `lbolt' inside the VFS syncer and the TTY layer
now. Because I'm planning to replace the TTY layer next month, there's
no reason to keep `lbolt' if it's only used in a single thread inside
the kernel.
Because the syncer code wanted to wake up the syncer thread before the
timeout, it called sleepq_remove(). Because we now just use a condvar(9)
with a timeout value of `hz', we can wake it up using cv_broadcast()
without waking up any unrelated threads.
ed [Wed, 30 Jul 2008 12:32:42 +0000 (12:32 +0000)]
Don't make subr_clist.c depend on the TTY layer.
After the import of the new TTY layer, the TTY_QUOTE definition will not
be present anymore. To make sure clists will still work as expected,
introduce an internal definition called QUOTEMASK.
Maybe we can decide to remove the quote bits entirely, but we still have
to look into this. There may be drivers that still use the quote bits.
Update routed to use the RFC 3678 protocol-independent multicast API. Use
IP_MULTICAST_IF with struct ip_mreqn (obtained from Linux) to tell the
stack which interface index to use for sending IPv4 datagrams.
Bring back the save/restore of the %ds, %es, %fs and %gs registers for
the 32bit images on amd64.
Change the semantic of the PCB_32BIT pcb flag to request the context
switch code to operate on the segment registers. Its previous meaning
of saving or restoring the %gs base offset is assigned to the new
PCB_GS32BIT flag.
FreeBSD 32bit image activator sets the PCB_32BIT flag, while Linux 32bit
emulation sets PCB_32BIT | PCB_GS32BIT.