rafan [Sat, 15 Nov 2008 09:23:48 +0000 (09:23 +0000)]
- Update ncurses to 5.7-20081102 (5.7 release) and build glue
- This also removes $FreeBSD$ from two now unmodifed source files
ncurses/tinfo/lib_raw.c and ncurses/tinfo/lib_baudrate.c
MFC after: 2 months (after 7.1 and 6.4 are released)
imp [Sat, 15 Nov 2008 05:22:06 +0000 (05:22 +0000)]
First step in cleaning up CIS parsing and /dev/cardbus*.cis: remove
redundant malloc/free. Add comments about how this should really be
done. Fix an overly verbose comment about under 1MB mapping: go ahead
and set the bits, but we ignore them.
jkim [Sat, 15 Nov 2008 01:43:34 +0000 (01:43 +0000)]
- Revive fdc(4) per-device flag 0x10, which was removed in r1.284[1].
- If the flag is set and auto-select fails, assume disk is not present.
- Set disk empty flag only when the floppy controller reset is needed.
It fixes regression introduced in r1.311, which prevented it from ignoring
errors. Now fdformat(1) and dd(1) with conv=noerror option can continue
when read/write errors occur as they should.
- Do not retry disk probing as it is extremely slow and pointless.
- Move the disk probing code into a separate function.
- Do not reset disk empty flag if write-protect check fails somehow.
dfr [Fri, 14 Nov 2008 11:27:53 +0000 (11:27 +0000)]
Switch the default rpc implementation for NFS back to the new code. I believe
I have fixed the reported problems - if you still have trouble with it, please
contact me with as much detail as possible so that I can track down any other
issues as quickly as possible.
ed [Fri, 14 Nov 2008 08:35:54 +0000 (08:35 +0000)]
Per request, keep privilege number 20 reserved.
In my commit that moved uname(), setdomainname() and getdomainname() to
COMPAT_FREEBSD4, I also removed PRIV_SETDOMAINNAME, because it was
already protected by userland_sysctl(). We'd better keep the number 20
reserved, to prevent it from being used again.
rwatson [Fri, 14 Nov 2008 01:24:52 +0000 (01:24 +0000)]
When repeatedly accessing a thread credential, cache the credential
pointer in a local thread. While this is unlikely to significantly
improve performance given modern compiler behavior, it makes the code
more readable and reduces diffs to the Mac OS X version of the same
code (which stores things in creds in the same way, but where the
cred for a thread is reached quite differently).
Discussed with: sson
MFC after: 1 month
Sponsored by: Apple Inc.
Obtained from: TrustedBSD Project
n_hibma [Thu, 13 Nov 2008 21:49:07 +0000 (21:49 +0000)]
Hide the attach message. This needs to be done in the probe as well, as
the softc is reset a few times during probing.
Print 'changing to modem mode' messages if booting verbose to show the
reason for the time delay. Note: Some devices (Huawei for one) take 20
seconds to appear on the USB bus).
ed [Thu, 13 Nov 2008 19:05:27 +0000 (19:05 +0000)]
Convert telnetd(8) to use posix_openpt(2).
Some time ago I got some reports MPSAFE TTY broke telnetd(8). Even
though it turned out to be a different problem within the TTY code, I
spotted a small issue with telnetd(8). Instead of allocating PTY's using
openpty(3) or posix_openpt(2), it used its own PTY allocation routine.
This means that telnetd(8) still uses /dev/ptyXX-style devices.
I've also increased the size of line[]. Even though 16 should be enough,
we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives
us a little more freedom.
Also enable -DSTREAMSPTY. Otherwise telnetd(8) strips the PTY's pathname
to the latest slash instead of just removing "/dev/" (e.g. /dev/pts/0 ->
0, instead of pts/0).
ambrisko [Thu, 13 Nov 2008 17:40:21 +0000 (17:40 +0000)]
For now on every 10 cyclinder groups flush the buffer cache to free
up space. If the buffer cache fills up then the disk systems can
grind to a halt. Better tuning can be figured out later.
Tested by: Tim, others and work
Reviewed by: Kostik Belousov
PR: 128832
dfr [Thu, 13 Nov 2008 14:36:52 +0000 (14:36 +0000)]
Use the remote address for access control, not the local address. This fixes
the nfsd problems that some people have with the new code.
Add support for the vfs.nfsrv.nfs_privport sysctl which denies access unless
the client is using a port number less than 1024. Not really sure if this is
particularly useful since it doesn't add any real security.
dfr [Thu, 13 Nov 2008 11:35:18 +0000 (11:35 +0000)]
Temporarily switch NFS back to the old RPC code while I try to diagnose and
fix the problems a few people have noticed with the new code. People who want
to continue testing the new code or who need RPCSEC_GSS support should use
the new option NFS_NEWRPC to select it.
yongari [Thu, 13 Nov 2008 04:11:01 +0000 (04:11 +0000)]
Fix Rx/Tx checksum offload ioctl handling. Now checksum offload
can be controlled by ifconfig(8). Note, VLAN hardware tagging
controls still lacks required handler but it requires more driver
cleanups so I didn't touch that part.
rwatson [Thu, 13 Nov 2008 00:21:01 +0000 (00:21 +0000)]
The audit queue limit variables are size_t, so use size_t for the audit
queue length variables as well, avoiding storing the limit in a larger
type than the length.
Submitted by: sson
Sponsored by: Apple Inc.
MFC after: 1 week
ambrisko [Wed, 12 Nov 2008 22:44:50 +0000 (22:44 +0000)]
- Fix from jhb for failing I/O request when bus_dmamap_load fails.
- Fix to ioctl path in which the length could be 0 which means
no data in/out from LSI.
- Fix to ioctl path in which the data in the sense data space
of the ioctl packet is a really a pointer to some location in
user-space. From LSI re-worked a bit by me.
- Add HW support for next gen cards from LSI.
jhb [Wed, 12 Nov 2008 22:14:05 +0000 (22:14 +0000)]
Various style and whitespace fixes. Previously parts of this file used
8 space indent, parts used 4 space indent, and other parts used a weird
mixture (8 spaces for first indent, 4 spaces for the rest).
nwhitehorn [Wed, 12 Nov 2008 17:33:36 +0000 (17:33 +0000)]
Probe ADB miscellaneous devices (ID 7) instead of stopping at ID 6. This
allows us to probe the brightness and volume control buttons on PPC Apple
laptops, though there is not yet a driver to do anything useful with them.
rrs [Wed, 12 Nov 2008 14:16:39 +0000 (14:16 +0000)]
-Improvement: Add '\n' on debug output in sctp_lower_sosend().
-Improvement: panic() on INVARIANTS kernels if memory allocation
fails for a tagblock in sctp_add_vtag_to_timewait().
-Bugfix: Protect code in sctp_is_in_timewait() by
SCTP_INP_INFO_WLOCK/SCTP_INP_INFO_WUNLOCK.
-Cleanup: Get rid of unused variable now in sctp_init_asoc().
-Bugfix: Reuse the correct vtag in sctp_add_vtag_to_timewait().
-Cleanup: Get rid of unused constant SCTP_TIME_WAIT_SHORT
in sctp_constants.h.
-Improvement: Use all hash buckets of the vtag hash table.
-Cleanup: Get rid of then unused constant SCTP_STACK_VTAG_HASH_SIZE_A.
-Bugfix: Handle SHUTDOWN;SACK packet correctly.
-Bugfix: Last TSN in a gap ack block was not being "ack'd"
in the internal scoreboard.
Obtained from: (with help from Michael Tuexen)
keramida [Wed, 12 Nov 2008 13:58:59 +0000 (13:58 +0000)]
Add a quirk for Belkin USB Bluetooth adapters (F8T012xx1 series)
The same (vendor, product) tuple is used for aue(4) adapters,
but I am not sure if the quirk is correct. I'm using the USB
device 'release' info to skip aue(4) detection right now, but
if there's a better way to differentiate between USB-LAN and
USB Bluetooth we should update the quirk.
yongari [Wed, 12 Nov 2008 09:52:06 +0000 (09:52 +0000)]
Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet
controller. The controller is also known as L1E(AR8121) and
L2E(AR8113/AR8114). Unlike its predecessor Attansic L1,
AR8121/AR8113/AR8114 uses completely different Rx logic such that
it requires separate driver. Datasheet for AR81xx is not available
to open source driver writers but it shares large part of Tx and
PHY logic of L1. I still don't understand some part of register
meaning and some MAC statistics counters but the driver seems to
have no critical issues for performance and stability.
The AR81xx requires copy operation to pass received frames to upper
stack such that ale(4) consumes a lot of CPU cycles than that of
other controller. A couple of silicon bugs also adds more CPU
cycles to address the known hardware bug. However, if you have fast
CPU you can still saturate the link.
Currently ale(4) supports the following hardware features.
- MSI.
- TCP Segmentation offload.
- Hardware VLAN tag insertion/stripping with checksum offload.
- Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload.
- Tx/Rx interrupt moderation.
- Hardware statistics counters.
- Jumbo frame.
- WOL.
AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or
P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick
who sent the hardware to me. Without his donation writing a driver
for AR81xx would never have been possible. Big thanks to all people
who reported feedback or tested patches.
HW donated by: koitsu
Tested by: bsam, Joao Barros <joao.barros <> gmail DOT com >
Jan Henrik Sylvester <me <> janh DOT de >
Ivan Brawley < ivan <> brawley DOT id DOT au >,
CURRENT ML
dfr [Wed, 12 Nov 2008 09:36:35 +0000 (09:36 +0000)]
Allow v3 GETATTR requests even when weakly authenticated. Change the error
return for for weakly authenticated requests from REJECTEDCRED to WEAKAUTH
for consistency with Solaris.
ed [Wed, 12 Nov 2008 09:04:44 +0000 (09:04 +0000)]
Don't forget to relock the TTY after uiomove() returns an error.
Peter Holm just discovered this funny bug inside the TTY code: if
uiomove() in ttydisc_write() returns an error, we forget to relock the
TTY before jumping out of ttydisc_write(). Fix it by placing
tty_unlock() and tty_lock() around uiomove().
csjp [Tue, 11 Nov 2008 21:57:03 +0000 (21:57 +0000)]
Add support for extended header BSM tokens. Currently we use the
regular header tokens. The extended header tokens contain an IP
or IPv6 address which makes it possible to identify which host an
audit record came from when audit records are centralized.
If the host information has not been specified, the system will
default to the old style headers. Otherwise, audit records that
are created as a result of system calls will contain host information.
This implemented has been designed to be consistent with the Solaris
implementation. Host information is set/retrieved using the A_GETKAUDIT
and A_SETKAUDIT auditon(2) commands. These commands require that a
pointer to a auditinfo_addr_t object is passed. Currently only IP and
IPv6 address families are supported.
The users pace bits associated with this change will follow in an
openbsm import.
dds [Tue, 11 Nov 2008 17:15:57 +0000 (17:15 +0000)]
Fix the code to conform to the "or more" part of the following POSIX
specification and regression test regress:25.
"A function can be preceded by one or more '!' characters, in which
case the function shall be applied if the addresses do not select
the pattern space."
dds [Tue, 11 Nov 2008 17:10:24 +0000 (17:10 +0000)]
Add a test for the "or more" part of the following POSIX specification.
"A function can be preceded by one or more '!' characters, in which
case the function shall be applied if the addresses do not select
the pattern space."
ed [Tue, 11 Nov 2008 14:55:59 +0000 (14:55 +0000)]
Several cleanups related to pipe(2).
- Use `fildes[2]' instead of `*fildes' to make more clear that pipe(2)
fills an array with two descriptors.
- Remove EFAULT from the manual page. Because of the current calling
convention, pipe(2) raises a segmentation fault when an invalid
address is passed.
- Introduce kern_pipe() to make it easier for binary emulations to
implement pipe(2).
- Make Linux binary emulation use kern_pipe(), which means we don't have
to recover td_retval after calling the FreeBSD system call.
gallatin [Tue, 11 Nov 2008 12:25:08 +0000 (12:25 +0000)]
Avoid scheduling firmware taskqs when cold.
This prevents a panic which occurs when a driver attempts to load
firmware at boot via firmware_get() when the firmware module has not
been preloaded. firmware_get() will enqueue a task using a struct
taskqueue allocated on the stack, and the machine will crash much
later in the firmware taskq thread when taskqs are started and the
struct taskqueue is garbage.
jkim [Tue, 11 Nov 2008 00:14:10 +0000 (00:14 +0000)]
Make ispfw(4) play nice with individual firmware modules.
- Do not let individual KLD module unregister firmware image loaded by ispfw
or vice versa.
- Make 'kldunload ispfw' actually unregister all firmware images loaded by
ispfw, not just 'isp_1040'.
- Print which KLD module actually loaded the firmware image.
- Remove unused return value from do_load_fw() and do_unload_fw() and remove
duplicate sys/param.h while I am here.
peter [Mon, 10 Nov 2008 23:26:52 +0000 (23:26 +0000)]
Fix a signal emulation bug introduced in r163018 (and present in 7.x).
This prevents 32 bit signal handlers from finding out what the faulting
address is. Both the secret 4th argument and siginfo->si_addr are zero.
kientzle [Mon, 10 Nov 2008 05:24:13 +0000 (05:24 +0000)]
Include more detailed explanation of this case, since it's pretty
subtle why it comes out the way it does. Once you realize that it
depends on the archiving order, it's also important to realize that
filesystem differences aren't going to break this case. (Some of the
other tests have had to be extensively rewritten to make them
independent of the order in which a particular filesystem returns file
entries.)
(This commit also serves to note the PR number that I accidentally
omitted from the previous commit.)
kientzle [Mon, 10 Nov 2008 05:04:55 +0000 (05:04 +0000)]
Test --strip-components and fix it to actually work. Jaakko did a
good job writing this test; it exercises a lot of subtle cases. The
trickiest one is that a hardlink to something that didn't get
extracted should not itself be extracted. In some sense, this is not
the desired behavior (we'd rather restore the file), but it's the best
you can do in a single-pass restore of a tar archive.
The test here should be extended to exercise cpio and newc formats as
well, since their hardlink models are different, which will lead to
different handling of some of these edge cases.
sobomax [Sun, 9 Nov 2008 23:44:32 +0000 (23:44 +0000)]
Improve on 184781 - instead of ignoring the file when the only difference
is CVS Id, replace the old one with the new one automatically. While I
don't see much difference, some people think it's somehow better that way.
jkoshy [Sun, 9 Nov 2008 17:37:54 +0000 (17:37 +0000)]
- Separate PMC class dependent code from other kinds of machine
dependencies. A 'struct pmc_classdep' structure describes operations
on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep'
structures depending on the CPU in question.
Inside PMC class dependent code, row indices are relative to the
PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates
global row indices before invoking class dependent operations.
- Augment the OP_GETCPUINFO request with the number of PMCs present
in a PMC class.
- Move code common to Intel CPUs to file "hwpmc_intel.c".
Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.
Looking at our source code history, it seems the uname(),
getdomainname() and setdomainname() system calls got deprecated
somewhere after FreeBSD 1.1, but they have never been phased out
properly. Because we don't have a COMPAT_FREEBSD1, just use
COMPAT_FREEBSD4.
Also fix the Linuxolator to build without the setdomainname() routine by
just making it call userland_sysctl on kern.domainname. Also replace the
setdomainname()'s implementation to use this approach, because we're
duplicating code with sysctl_domainname().
I wasn't able to keep these three routines working in our
COMPAT_FREEBSD32, because that would require yet another keyword for
syscalls.master (COMPAT4+NOPROTO). Because this routine is probably
unused already, this won't be a problem in practice. If it turns out to
be a problem, we'll just restore this functionality.
matteo [Sun, 9 Nov 2008 09:01:09 +0000 (09:01 +0000)]
Revert to previous revision.
I should not commit anything at 3.50 AM.
In addition to danfe's comments, I got others.
I'll work on a better version of the patch.
jkoshy [Sun, 9 Nov 2008 08:36:35 +0000 (08:36 +0000)]
Change the meaning of a "*" argument to option -c to mean 'all
unhalted CPUs', instead of 'all CPUs'. This change brings
pmccontrol(8) in line with pmcstat(8).
hrs [Sun, 9 Nov 2008 01:10:21 +0000 (01:10 +0000)]
Add workaround for a back reference when no corresponding
parenthesized subexpression is defined. For example, the
following command line caused unexpected behavior like
segmentation fault:
On RELENG_6 (and probably RELENG_7) we see our syscons windows and
pseudo-terminals have the following buffer sizes:
| LINE RAW CAN OUT IHIWT ILOWT OHWT LWT COL STATE SESS PGID DISC
| ttyv0 0 0 0 7680 6720 2052 256 7 OCcl 1146 1146 term
| ttyp0 0 0 0 7680 6720 1296 256 0 OCc 82033 82033 term
These buffer sizes make no sense, because we often have much more output
than input, but I guess having higher input buffer sizes improves
guarantees of the system.
On MPSAFE TTY I just sent both the input and output buffer sizes to 7
KB, which is pretty big on a standard FreeBSD install with 8 syscons
windows and some PTY's. Reduce the baud rate to 9600 baud, which means
we now have the following buffer sizes:
| LINE INQ CAN LIN LOW OUTQ USE LOW COL SESS PGID STATE
| ttyv0 1920 0 0 192 1984 0 199 7 2401 2401 Oil
| pts/0 1920 0 0 192 1984 0 199 5631 1305 2526 Oi
This is a lot smaller, but for pseudo-devices this should be good
enough. You need to do a lot of punching to fill up a 7.5 KB input
buffer. If it turns out things don't work out this way, we'll just
switch to 19200 baud.
mav [Sat, 8 Nov 2008 06:25:57 +0000 (06:25 +0000)]
Don't use curthread to resolve file descriptor. Request may be queued, so
thread will be different. Instead require sender to send process ID
together with file descriptor.