imp [Wed, 21 Jan 2009 17:28:24 +0000 (17:28 +0000)]
Make the command reporting be under boot verbose.
Also, report a few other things under boot verbose.
Small style nit to make new code look like old code in this file.
kib [Wed, 21 Jan 2009 14:51:38 +0000 (14:51 +0000)]
Move the code from ufs_lookup.c used to do dotdot lookup, into
the helper function. It is supposed to be useful for any filesystem
that has to unlock dvp to walk to the ".." entry in lookup routine.
jhb [Wed, 21 Jan 2009 14:42:00 +0000 (14:42 +0000)]
Move the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP:
VOP_MARKATIME() since unlike the rest of VOP_SETATTR(), VA_MARKATIME
can be performed while holding a shared vnode lock (the same functionality
is done internally by VOP_READ which can run with a shared vnode lock).
Add missing locking of the vnode interlock to the ufs implementation and
remove a special note and test from the NFS client about not supporting the
feature.
kientzle [Wed, 21 Jan 2009 06:55:27 +0000 (06:55 +0000)]
Merge-from-Googlecode r419
In archive_write_disk: If archive_write_header() fails to create
the file, that's a failure and should return ARCHIVE_FAILED.
Metadata restore failures still return ARCHIVE_WARN, because
that's non-critical. Fix test_write_disk_secure test to
verify the correct return code in one case; add test_write_disk_failures
to do another very simple test of restore failure.
This should fix cpio coredumping when it tries to restore to
a write-protected directory.
thompsa [Wed, 21 Jan 2009 04:19:18 +0000 (04:19 +0000)]
Add functions WITNESS so it can be asserted that the lock is not released for a
section of code, this uses WITNESS_NORELEASE() and WITNESS_RELEASEOK() to mark
the boundaries. Both functions require the lock to be held when calling.
This is intended for scenarios like a bus asserting that the bus lock is not
dropped during a driver call. There doesn't appear to be a man page to
document this in.
mav [Tue, 20 Jan 2009 22:26:09 +0000 (22:26 +0000)]
Check for infinite recursion possible on some broken PPTP/L2TP/... VPN setups.
Mark packets with mbuf_tag on first interface passage and drop on second.
kib [Tue, 20 Jan 2009 22:00:19 +0000 (22:00 +0000)]
The r187467 should remove all pages for V_NORMAL case too, because
indirect block pages are not removed by the mentioned invocation of
the vnode_pager_setsize().
Put a common code into the helper function ffs_pages_remove().
jkim [Tue, 20 Jan 2009 20:22:28 +0000 (20:22 +0000)]
- Add support for 8110SCe part. Some magic registers were taken from
Linux driver.
- Swap hardware revisions for 8110S and 8169S as Linux driver claims.
jkim [Tue, 20 Jan 2009 19:58:01 +0000 (19:58 +0000)]
- Do not read and write RX configuration register multiple times.
- Always program RX configuration register from scratch instead of
doing read/modify/write.
- Rename re_setmulti() to re_set_rxmode() to be reflect reality.
- Simplify hash filter logic a little while I am here.
luigi [Tue, 20 Jan 2009 18:16:31 +0000 (18:16 +0000)]
Fix a number of (innocuous) warnings, and remove a useless test.
There are still several signed/unsigned warnings left, which
require a bit more study for a proper fix.
This file has grown beyond reasonable limits.
We really need to split it into separate components (ipv4, ipv6,
dummynet, nat, table, userland-kernel communication ...) so we can
make mainteinance easier.
rdivacky [Tue, 20 Jan 2009 17:15:12 +0000 (17:15 +0000)]
Remove inlining of functions that are used mostly in different object files.
This gets rid of gnu89 style inlining. Also silence gcc by assigning two
variables NULL. This lets use to remove NO_WERROR.
nwhitehorn [Tue, 20 Jan 2009 14:09:12 +0000 (14:09 +0000)]
Fix a race condition in kiic(4) made possible by the way the device's STOP
condition is sent. We used to put the bus in the STOP state, but returned
without waiting for that to actually occur.
jeff [Tue, 20 Jan 2009 12:33:04 +0000 (12:33 +0000)]
- Permit timestamps to be as far as 2048 ticks apart before we complain
about invalid timestamps. Nehalem CPUs seem to be synchronized but only
within a fraction of a microsecond.
- Make the Counter code more flexible to poor timestamps. In general we
now complain a lot but render as much as we can.
- Change the scaler behavior so it works better with very long and very
short traces. We now set the maximum scale such that it properly
displays the entire file by default and doesn't permit zooming out
beyond the file. This improves other awkward navigation behavior.
The interval is now set very small which can't be achieved by simply
dragging the mouse. Clicking to the left of or right of the scaler bar
will produce increments of a single, very small, interval now.
kib [Tue, 20 Jan 2009 12:07:49 +0000 (12:07 +0000)]
The context switch to the 32bit binary does not properly restore
the fsbase value. The switch loads the fs segment register, that
invalidates the value in fsbase msr, thus value in %r9 can not be
considered the current value for fsbase anymore.
Unconditionally reload fsbase when switching to 32bit binary.
ed [Tue, 20 Jan 2009 11:34:28 +0000 (11:34 +0000)]
Properly implement the VT100 SCS sequences in xterm-mode.
Even though VT100-like devices can display non-ASCII characters, they do
not use an 8-bit character set. Special escape sequences allow the VT100
to switch character maps. The special graphics character set stores the
box drawing characters, starting at 0x60, ending at 0x7e. This means
we now pass the character map tests in vttest, even the save/restore
cursor test, combined with character maps. dialog(1) also works a lot
better now.
This commit also includes some other minor fixes:
- Default to 24 lines in teken_demo when using xterm emulation.
- Make white foreground and background work in teken_demo.
kib [Tue, 20 Jan 2009 11:30:22 +0000 (11:30 +0000)]
When extending inode size, we call vnode_pager_setsize(), to have a
address space where to put vnode pages, and then call UFS_BALLOC(),
to actually allocate new block and map it. When UFS_BALLOC() returns
error, sometimes we forget to revert the vm object size increase,
allowing for the pages that are not backed by the logical disk blocks.
Revert vnode_pager_setsize() back when UFS_BALLOC() failed, for
ffs_truncate() and ffs_write().
kib [Tue, 20 Jan 2009 11:27:45 +0000 (11:27 +0000)]
FFS puts the extended attributes blocks at the negative blocks for the
vnode, from -1 down. When vinvalbuf(vp, V_ALT) is done for the vnode, it
incorrectly does vm_object_page_remove(0, 0), removing all pages from
the underlying vm object, not only the pages that back the extended
attributes data.
Change vinvalbuf() to not remove any pages from the object when
V_NORMAL or V_ALT are specified. Instead, the only in-tree caller
in ffs_inode.c:ffs_truncate() that specifies V_ALT explicitely
removes the corresponding page range. The V_NORMAL caller
does vnode_pager_setsize(vp, 0) immediately after the call to
vinvalbuf(V_NORMAL) already.
mckay [Tue, 20 Jan 2009 04:21:21 +0000 (04:21 +0000)]
Add a limit on namecache entries.
In normal operation, the number of cache entries is roughly equal to the
number of active vnodes. However, when most of the recently accessed
vnodes have many hard links, the number of cache entries can be 32000
times as large, exhausting kernel memory and provoking a panic in
kmem_malloc().
sobomax [Tue, 20 Jan 2009 02:08:21 +0000 (02:08 +0000)]
Tone down warning about the quality of the NTFS VFS module. It appears that
not all developers share luigi opinion about quality of sysutils/fusefs-ntfs
compared to our kernel NTFS module.
sobomax [Mon, 19 Jan 2009 16:19:53 +0000 (16:19 +0000)]
Mention the fact that the NTFS kernel support isn't
very well maintained and point user to sysutils/fusefs-ntfs, which
at the time of this writing seems to be a better alternative.
sobomax [Mon, 19 Jan 2009 15:59:05 +0000 (15:59 +0000)]
In the CAVEATS section mention the fact that the NTFS kernel support isn't
very well maintained and point user to sysutils/fusefs-ntfs, which
at the time of this writing seems to be a better alternative.
das [Mon, 19 Jan 2009 06:19:51 +0000 (06:19 +0000)]
- Add support for multibyte decimal_point encodings, e.g., U+066B.
A forthcoming gdtoa import is needed to make this fully work.
- Improve the way "nan(...)" is parsed.
yongari [Mon, 19 Jan 2009 02:31:27 +0000 (02:31 +0000)]
Sometimes RTL8168B seems to take long time to access GMII registers
in device attach phase. Double GMII register access timeout value
to fix the issue.
mav [Sun, 18 Jan 2009 19:25:36 +0000 (19:25 +0000)]
Use m_unshare()+m_copyback() instead of m_freem()+m_devget() to keep
original mbuf chain headers. It can be less efficient in some cases, but it
looks better then mess of copying headers into the nonempty chain.
stas [Sun, 18 Jan 2009 14:04:56 +0000 (14:04 +0000)]
- Obtain inode sizes and location of the first inode based on the contents
of superblock rather than using hardcoded values. This fixes ext2fs on
filesystems with inode sized other than 128.
mav [Sun, 18 Jan 2009 12:03:43 +0000 (12:03 +0000)]
Remove strict limitation on minimal multilink MRRU. RFC claims that MRRU
of 1500 must be supported, but allows smaller values to be negotiated.
Enforce specified MRRU for outgoing frames.
alc [Sun, 18 Jan 2009 08:00:55 +0000 (08:00 +0000)]
Correct an error in revision 1.170 of this file. When get_pv_entry() is
forced to reclaim pv entries, the one pv entry that it returns should not
be freed.
jeff [Sun, 18 Jan 2009 05:44:31 +0000 (05:44 +0000)]
- Add summary information to the title once the file is parsed rather than
printing it to the terminal. Now only parse errors go to the terminal.
- Speedup drawing by raising and lowering tags only once everything has
been drawn. Surprisingly, it now takes a little longer to parse than
it does to draw.
- Parameterize the layout with X_ and Y_ defines that determine the sizes
of various things.
- Remove unnecessary tags.
jeff [Sun, 18 Jan 2009 04:49:01 +0000 (04:49 +0000)]
- Significantly speedup hiding and displaying multiple rows by writing an
optimized single pass function for each. This reduces the number of
tkinter calls required to the minimum.
- Add a right-click context menu for sources. Supported commands hide
the source, hide the whole group the source is in, and bring up a stat
window.
- Add a source stat frame that gives an event frequency table as well as
the total duration for each event type that has a duration. This can
be used to see, for example, the total time a thread spent running or
blocked by a wchan or lock.
ed [Sat, 17 Jan 2009 23:01:40 +0000 (23:01 +0000)]
Fix for my previous commit: color mapping is not 1:1.
Cons25 doesn't seem to use a straight 1:1 mapping to the ANSI colors,
but uses the same color numbers as at least used by syscons on i386. I
suspect if you change the definitions on a different architecture,
things may break? Not sure.
Add a small array to convert syscons-style color codes to ANSI
equivalents, which are used by libteken internally. I didn't notice this
bug, because I only tested my code with black, white and green, all of
them shared the same numbers.
ed [Sat, 17 Jan 2009 22:53:53 +0000 (22:53 +0000)]
Make vidcontrol's color setting work again.
It turns out I forgot to implement two escape sequences that allows the
user to change the default foreground and background colors. I thought
they were implemented by syscons itself, but vidcontrol just generates
some escape sequences, which get interpreted by the terminal emulator.
phk [Sat, 17 Jan 2009 20:30:06 +0000 (20:30 +0000)]
Release the evil twin of nanobsd.sh: sysbuild.sh
quoth the README:
I have been running -current on my laptop since before FreeBSD 2.0 was
released and along the way developed this little trick to making the
task easier.
sysbuild.sh is a way to build a new FreeBSD system on a computer from
a specification, while leaving the current installation intact.
sysbuild.sh assume you have two partitions that can hold your rootfs
and can be booted, and roughly speaking, all it does is build a new
system into the one you don't use, from the one you do use.
A partition named /freebsd is assumed to be part of your layout, and
that is where the sources and ports will be found.
If you know how nanobsd works, you will find a lot of similarity.
das [Sat, 17 Jan 2009 18:57:12 +0000 (18:57 +0000)]
When f[w]printf() is called on an unbuffered file like stdout, it
sets up a fake buffered FILE and then effectively calls itself
recursively. Unfortunately, gcc doesn't know how to do tail call
elimination in this case, and actually makes things worse by
inlining __sbprintf(). This means that f[w]printf() to stderr was
allocating about 5k of stack on 64-bit platforms, much of which was
never used.
I've reorganized things to eliminate the waste. In addition to saving
some stack space, this improves performance in my tests by anywhere
from 5% to 17% (depending on the test) when -fstack-protector is
enabled. I found no statistically significant performance difference
when stack protection is turned off. (The tests redirected stderr to
/dev/null.)
ed [Sat, 17 Jan 2009 16:37:13 +0000 (16:37 +0000)]
Allow experimental libteken features to be tested without changing code.
The teken library already supports UTF-8 handling and xterm emulation,
but we have reasons to disable this right now. Because we should make it
easy and interesting for people to experiment with these features, allow
them to be set in kernel configuration files.
Before this commit we had a flag called `TEKEN_CONS25' to enable
cons25-style emulation. I'm calling it the opposite now, `TEKEN_XTERM',
because we want to enable it in kernel configuration files explicitly.
ed [Sat, 17 Jan 2009 15:56:38 +0000 (15:56 +0000)]
Fix handling of pts(4) device names in comsat(8). Also catch fork() errors.
Pseudo-terminals allocated with posix_openpt(2) will have more slashes
in their path names than comsat(8) allows, so allow slashes when the
character device name starts with "pts/".
This patch is loosely based on NetBSD's changes, revision 1.33. Because
it also included the changes to fork(), I imported them here as well.
Maybe we could import even more fixes from the other BSD's?
Original commit message from the NetBSD folks:
PR/30170: Markus W Kilbinger: src/libexec/comsat complains
about: '/' in "/dev/pts/1"
des [Sat, 17 Jan 2009 13:34:56 +0000 (13:34 +0000)]
The FTP_TIMEOUT and HTTP_TIMEOUT environment variables were ignored because
T_secs already had a non-zero default. Unbreak by moving the default to
ftp_timeout / http_timeout.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
MFC after: 2 weeks
jeff [Sat, 17 Jan 2009 11:19:15 +0000 (11:19 +0000)]
- Add a new source configuration menu option that allows hiding and
displaying sources.
- Add functions to the main SchedGraph to facilitate source hiding. The
source is simply moved off screen and all other sources are moved to
compensate.
jeff [Sat, 17 Jan 2009 07:24:25 +0000 (07:24 +0000)]
- Rewrite the parser to support the new generic schedgraph interface.
This no longer requires any custom classes or parsers to support new
event types.
- Add an optional command line argument for specifying the clock frequency
in ghz. This is useful for traces that do not include KTR_SCHED.
Sponsored by: Nokia
- Add support for sorting rows by clicking and dragging them to their new
position.
- Add support for configuring the cpu background colors.
- Improve the scaling so a better center is maintained as you zoom. This
is not perfect due to precision loss with floats used in the window
views.
- Add new colors and a random assignment for unknown event types. A table
is used for known event types. This is the only event specific
information.
jeff [Sat, 17 Jan 2009 07:17:57 +0000 (07:17 +0000)]
- Implement generic macros for producing KTR records that are compatible
with src/tools/sched/schedgraph.py. This allows developers to quickly
create a graphical view of ktr data for any resource in the system.
- Add sched_tdname() and the pcpu field 'name' for quickly and uniformly
identifying records associated with a thread or cpu.
- Reimplement the KTR_SCHED traces using the new generic facility.
Obtained from: attilio
Discussed with: jhb
Sponsored by: Nokia
jhb [Fri, 16 Jan 2009 22:22:30 +0000 (22:22 +0000)]
Disable decoding of BARs by devices before we trash the value in the BAR
by writing all 1's to it to determine its length. This fixes issues with
MCFG on at least some machines where a trashed BAR claimed subsequent
attempts at PCI config transactions because the addresses in the MCFG
window fell in the decoding range of the BAR.
In general it is a bad idea to leave the BARs enabled while we are
frobbing with them in this manner.
jhb [Fri, 16 Jan 2009 22:16:54 +0000 (22:16 +0000)]
Correct the sense of the "use32" terenary operator so that it uses
'lib32' for 32-bit binaries on amd64 and 'lib' for 64-bit binaries.
Remove an #ifdef __i386__ that defined use32 to the wrong value on
i386 to workaround the bug in the terenary operator.
sam [Fri, 16 Jan 2009 20:38:42 +0000 (20:38 +0000)]
Fix 1/2 and 1/4 width channel handling for non-GSM operation:
o correct typo that caused random channel selection
o explicitly add 1/2 and 1/4 width channels because channel lookups match
flags that include IEEE80211_CHANNEL_HALF and IEEE80211_CHANNEL_QUARTER
ed [Fri, 16 Jan 2009 15:47:35 +0000 (15:47 +0000)]
Allow jot(1) regression tests to be checked out on Windows filesystems.
The jot(1) regression tests directory contained two tests named `wx' and
`wX', which doesn't work on case insensitive filesystems. Rename `wX' to
`wX1'.
ed [Fri, 16 Jan 2009 15:00:30 +0000 (15:00 +0000)]
Rename mail(1)'s aux.c to util.c.
The name `aux' is reserved on Windows file systems. aux.c in the mail(1)
directory contains some random utility functions. I'm renaming this file
to util.c to make it possible to check out this directory on Windows.
ed [Fri, 16 Jan 2009 14:45:48 +0000 (14:45 +0000)]
Remove unused files from the digi(4) driver.
The digi(4) driver directory contains some files that cannot be checked
out on Windows filesystems. This isn't a big deal, but the files aren't
used anyway.
There are still some other places where checkouts on Windows don't work,
such as VFS_MOUNT.9/vfs_mount.9. This should already be a small
improvement.
qingli [Fri, 16 Jan 2009 09:01:45 +0000 (09:01 +0000)]
The RTF_LLINFO was revived unconditionally, but within the kernel the
check on the sysctl argument value being RTF_LLINFO is conditioned on
the COMPAT_ROUTE_FLAGS kernel option. This mismatch caused the L2
table retrieval failure, and the arp/ndp -an command displays empty L2
tables.
yongari [Fri, 16 Jan 2009 08:06:55 +0000 (08:06 +0000)]
Add hardware MAC statistics support. Also added some reserved
statistics register definition. Users can get current MAC
statistics from dev.msk.%d.stats sysctl node(%d is unit number of
a device).
nwhitehorn [Thu, 15 Jan 2009 23:14:59 +0000 (23:14 +0000)]
Revert revision 186833 and try a different strategy to allow this device to
work when the bus attaches its own children. Instead of hardcoding a unit
number and returning BUS_PROBE_NOWILDCARD, which will break multiple iicbus
systems, check in the probe routine whether the device address is 0. Real
I2C devices will never have this address, but devices added with
BUS_ADD_CHILD() will.