summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix the new NFS client so that it doesn't do an NFSv3rmacklem2011-05-311-2/+11
| | | | | | | | | | Pathconf RPC for cases where the reply doesn't include the answer. This fixes a problem reported by avg@ where the NFSv3 Pathconf RPC would fail when "ls -l" did an lpathconf(2) for _PC_ACL_NFS4. Tested by: avg MFC after: 2 weeks
* Fix apparent garbage in the message buffer.ken2011-05-313-58/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we have had a fix in place (options PRINTF_BUFR_SIZE=128) to fix scrambled console output, the message buffer and syslog were still getting log messages one character at a time. While all of the characters still made it into the log (courtesy of atomic operations), they were often interleaved when there were multiple threads writing to the buffer at the same time. This fixes message buffer accesses to use buffering logic as well, so that strings that are less than PRINTF_BUFR_SIZE will be put into the message buffer atomically. So now dmesg output should look the same as console output. subr_msgbuf.c: Convert most message buffer calls to use a new spin lock instead of atomic variables in some places. Add a new routine, msgbuf_addstr(), that adds a NUL-terminated string to a message buffer. This takes a priority argument, which allows us to eliminate some races (at least in the the string at a time case) that are present in the implementation of msglogchar(). (dangling and lastpri are static variables, and are subject to races when multiple callers are present.) msgbuf_addstr() also allows the caller to request that carriage returns be stripped out of the string. This matches the behavior of msglogchar(), but in testing so far it doesn't appear that any newlines are being stripped out. So the carriage return removal functionality may be a candidate for removal later on if further analysis shows that it isn't necessary. subr_prf.c: Add a new msglogstr() routine that calls msgbuf_logstr(). Rename putcons() to putbuf(). This now handles buffered output to the message log as well as the console. Also, remove the logic in putcons() (now putbuf()) that added a carriage return before a newline. The console path was the only path that needed it, and cnputc() (called by cnputs()) already adds a carriage return. So this duplication resulted in kernel-generated console output lines ending in '\r''\r''\n'. Refactor putchar() to handle the new buffering scheme. Add buffering to log(). Change log_console() to use msglogstr() instead of msglogchar(). Don't add extra newlines by default in log_console(). Hide that behavior behind a tunable/sysctl (kern.log_console_add_linefeed) for those who would like the old behavior. The old behavior led to the insertion of extra newlines for log output for programs that print out a string, and then a trailing newline on a separate write. (This is visible with dmesg -a.) msgbuf.h: Add a prototype for msgbuf_addstr(). Add three new fields to struct msgbuf, msg_needsnl, msg_lastpri and msg_lock. The first two are needed for log message functionality previously handled by msglogchar(). (Which is still active if buffering isn't enabled.) Include sys/lock.h and sys/mutex.h for the new mutex. Reviewed by: gibbs
* Don't need (and can't use) -L to copy links here.imp2011-05-311-1/+1
|
* Fix a couple of spelling errors.imp2011-05-311-3/+3
| | | | Submitted by: bcr@
* - Document the -H option and 'H' key alongside other options and keysjhb2011-05-312-6/+12
| | | | | | | | | | | rather than at the bottom of the manpage. - Remove an obsolete comment about SWAIT being a stale state. It was resurrected for a different purpose in FreeBSD 5 to mark idle ithreads. - Add a comment documenting that the SLEEP and LOCK states typically display the name of the event being waited on with lock names being prefixed with an asterisk and sleep event names not having a prefix. MFC after: 1 week
* On multi-core, multi-threaded PPC systems, it is important that the threadsnwhitehorn2011-05-3115-25/+25
| | | | | | | | | | | | be brought up in the order they are enumerated in the device tree (in particular, that thread 0 on each core be brought up first). The SLIST through which we loop to start the CPUs has all of its entries added with SLIST_INSERT_HEAD(), which means it is in reverse order of enumeration and so AP startup would always fail in such situations (causing a machine check or RTAS failure). Fix this by changing the SLIST into an STAILQ, and inserting new CPUs at the end. Reviewed by: jhb
* Add a new option to toggle the display of the system idle process (per-CPUjhb2011-05-315-7/+34
| | | | | | | | | | | idle threads). The process is displayed by default (subject to whether or not system processes are displayed) to preserve existing behavior. The system idle process can be hidden via the '-z' command line argument or the 'z' key while top is running. When it is hidden, top more closely matches the behavior of FreeBSD <= 4.x where idle time was not accounted to any process. MFC after: 2 weeks
* Remove some further INET related symbols from pf to allow the modulebz2011-05-313-1/+14
| | | | | | | | | | | to not only compile bu load as well for testing with IPv6-only kernels. For the moment we ignore the csum change in pf_ioctl.c given the pending update to pf45. Reported by: dru Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
* Start teaching pc-sysinstall about IPv6.bz2011-05-313-28/+249
| | | | | | | | | | | | | | | | Add some additional empty string checks for IPv4 and try to configure a netmask along with the address rather than doing things twice. Contrary to AUTO-DHCP, IPv6-SLAAC will accept static configuration as well, which we will use at least for resolv.conf currently and if we were given a static address configure that as an alias as well. The pc-sysinstaller changes going along were committed to PC-BSD as r10773. Reviewed by: kmoore Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
* Conditionally compile in the af_inet and af_inet6, af_nd6 modules.bz2011-05-316-6/+52
| | | | | | | | | | | | | | | | | | | | | If compiled in for dual-stack use, test with feature_present(3) to see if we should register the IPv4/IPv6 address family related options. In case there is no "inet" support we would love to go with the usage() and make the address family mandatory (as it is for anything but inet in theory). Unfortunately people are used to ifconfig IF up/down etc. as well, so use a fallback of "link". Adjust the man page to reflect these minor details. Improve error handling printing a warning in addition to the usage telling that we do not know the given address family in two places. Reviewed by: hrs, rwatson Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 2 weeks
* It is generally considered useful for release media to have kernels on them.nwhitehorn2011-05-311-2/+4
| | | | Submitted by: joel
* Add quirks to hint 4K physical sector (Advanced Format) for ATA disks notmav2011-05-311-2/+91
| | | | | | | | reporting it properly (none? of known disks now). Hitachi and WDC AF disks seem could be identified more or less formally. For Seagate and Samsung enumerate some found models/series. For other disks it can be forced with kern.cam.ada.X.quirks=1 tunable.
* Minor wording adjustments to usbdump(8).bcr2011-05-311-4/+4
| | | | | | | PR: docs/157317 Submitted by: Warren Block (wblock at wonkity dot com) Reviewed by: hps@ MFC after: 5 days
* Imagine situation where a security problem is found in setuid binary.pjd2011-05-311-0/+5
| | | | | | | | | | User upgrades his system to fix the problem, but if he has any ZFS snapshots for the file system which contains problematic binary, any user can mount the snapshot and execute vulnerable binary. Prevent this from happening by always mounting snapshots with setuid turned off. MFC after: 2 weeks
* Correctly check MAC running status before disabling TX/RX MACs.yongari2011-05-311-1/+1
|
* No logner set an IPv4 loopback address by default in defaults/rc.conf.bz2011-05-312-9/+21
| | | | | | | | | | | | | | | | | | If not specified, network.subr will add it automatically if we have INET support (1). In network.subr only call the address family up/down functions if the respective AF is available. Switch to new kern.features variables for inet and inet6 as the inet sysctl tree is also available for IPv6-only kernels leading to unexpected results. Suggested by: hrs (1) Reviewed by: hrs Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
* Update to firmware interface 1.3.10np2011-05-303-6/+235
| | | | MFC after: 1 week
* sh: Add tests for some somewhat obscure aspects of function definitions.jilles2011-05-302-0/+12
|
* posix_spawn(): Do not fail when trying to close an fd that is not open.jilles2011-05-301-5/+2
| | | | | | | | | | | As noted in Austin Group issue #370 (an interpretation has been issued), failing posix_spawn() because an fd specified with posix_spawn_file_actions_addclose() is not open is unnecessarily harsh, and there are existing implementations that do not fail posix_spawn() for this reason. Reviewed by: ed MFC after: 10 days
* - Specialized ingress queues that take interrupts for other ingressnp2011-05-303-219/+303
| | | | | | | | | | | | | queues. Try to have a set of these per port when possible, fall back to sharing a common pool between all ports otherwise. - One control queue per port (used to be one per hardware channel). - t4_eth_rx now handles Ethernet rx only. - sysctls to display pidx/cidx for some queues. MFC after: 1 week
* L2 table code. This is enough to get the T4's switch + L2 rewritenp2011-05-3010-13/+629
| | | | | | | | | | | | | | | | | | | filters working. (All other filters - switch without L2 info rewrite, steer, and drop - were already fully-functional). Some contrived examples of "switch" filters with L2 rewriting: # cxgbetool t4nex0 iport 0 dport 80 action switch vlan +9 eport 3 Intercept all packets received on physical port 0 with TCP port 80 as destination, insert a vlan tag with VID 9, and send them out of port 3. # cxgbetool t4nex0 sip 192.168.1.1/32 ivlan 5 action switch \ vlan =9 smac aa:bb:cc:dd:ee:ff eport 0 Intercept all packets (received on any port) with source IP address 192.168.1.1 and VLAN id 5, rewrite the VLAN id to 9, rewrite source mac to aa:bb:cc:dd:ee:ff, and send it out of port 0. MFC after: 1 week
* Clean up the unneeded cpp macro INLINE_REM_PIO2L.kargl2011-05-305-11/+2
| | | | | Reviewed by: das Approved by: das (mentor)
* Unbreak NOINET kernels after r222488.bz2011-05-301-2/+2
| | | | | | | Reviewed by: rwatson Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems! Pointy hat: to myself for missing this during review?
* Contrary to the rc.conf framework, when manualy enabling IPv6 we havebz2011-05-301-1/+1
| | | | | | | to -ifdiabled ourselves. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
* Enable setting the short-GI bit when TX'ing HT rates but only if theadrian2011-05-301-6/+14
| | | | | | | | | | | | | | | hardware supports it. Since ni->ni_htcap in hostap mode is what the remote end has advertised, not what has been negotiated/decided, we need to check ourselves what the current channel width is and what the hardware supports before enabling short-GI. It's important that short-GI isn't enabled when it isn't negotiated and when the hardware doesn't support it (ie, short-gi for 20mhz channels on any chip < AR9287.) I've quickly verified this on the AR9285 in 11n mode.
* Set default A-MPDU density/size.adrian2011-05-301-0/+15
|
* Document kern.geom.part.check_integrity sysctl variable.ae2011-05-301-1/+17
|
* Bump document date.bcr2011-05-301-1/+1
| | | | | I accidently committed the actual change (typo fix) in r222492, which is a completely unrelated change.
* Add a short description about NO_CHECKSUM.bcr2011-05-302-2/+4
| | | | | | PR: docs/155980 Submitted by KOIE Hidetaka (koie at suri co jp) MFC after: 7 days
* Mention in ath(4) that ath_pci is required now.adrian2011-05-301-0/+15
|
* Add ath_ahb and ath_pci module manpages.adrian2011-05-303-0/+119
|
* Update chipset support list for ath_hal.adrian2011-05-301-5/+9
|
* Decompose the current single inpcbinfo lock into two locks:rwatson2011-05-3017-435/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The existing ipi_lock continues to protect the global inpcb list and inpcb counter. This lock is now relegated to a small number of allocation and free operations, and occasional operations that walk all connections (including, awkwardly, certain UDP multicast receive operations -- something to revisit). - A new ipi_hash_lock protects the two inpcbinfo hash tables for looking up connections and bound sockets, manipulated using new INP_HASH_*() macros. This lock, combined with inpcb locks, protects the 4-tuple address space. Unlike the current ipi_lock, ipi_hash_lock follows the individual inpcb connection locks, so may be acquired while manipulating a connection on which a lock is already held, avoiding the need to acquire the inpcbinfo lock preemptively when a binding change might later be required. As a result, however, lookup operations necessarily go through a reference acquire while holding the lookup lock, later acquiring an inpcb lock -- if required. A new function in_pcblookup() looks up connections, and accepts flags indicating how to return the inpcb. Due to lock order changes, callers no longer need acquire locks before performing a lookup: the lookup routine will acquire the ipi_hash_lock as needed. In the future, it will also be able to use alternative lookup and locking strategies transparently to callers, such as pcbgroup lookup. New lookup flags are, supplementing the existing INPLOOKUP_WILDCARD flag: INPLOOKUP_RLOCKPCB - Acquire a read lock on the returned inpcb INPLOOKUP_WLOCKPCB - Acquire a write lock on the returned inpcb Callers must pass exactly one of these flags (for the time being). Some notes: - All protocols are updated to work within the new regime; especially, TCP, UDPv4, and UDPv6. pcbinfo ipi_lock acquisitions are largely eliminated, and global hash lock hold times are dramatically reduced compared to previous locking. - The TCP syncache still relies on the pcbinfo lock, something that we may want to revisit. - Support for reverting to the FreeBSD 7.x locking strategy in TCP input is no longer available -- hash lookup locks are now held only very briefly during inpcb lookup, rather than for potentially extended periods. However, the pcbinfo ipi_lock will still be acquired if a connection state might change such that a connection is added or removed. - Raw IP sockets continue to use the pcbinfo ipi_lock for protection, due to maintaining their own hash tables. - The interface in6_pcblookup_hash_locked() is maintained, which allows callers to acquire hash locks and perform one or more lookups atomically with 4-tuple allocation: this is required only for TCPv6, as there is no in6_pcbconnect_setup(), which there should be. - UDPv6 locking remains significantly more conservative than UDPv4 locking, which relates to source address selection. This needs attention, as it likely significantly reduces parallelism in this code for multithreaded socket use (such as in BIND). - In the UDPv4 and UDPv6 multicast cases, we need to revisit locking somewhat, as they relied on ipi_lock to stablise 4-tuple matches, which is no longer sufficient. A second check once the inpcb lock is held should do the trick, keeping the general case from requiring the inpcb lock for every inpcb visited. - This work reminds us that we need to revisit locking of the v4/v6 flags, which may be accessed lock-free both before and after this change. - Right now, a single lock name is used for the pcbhash lock -- this is undesirable, and probably another argument is required to take care of this (or a char array name field in the pcbinfo?). This is not an MFC candidate for 8.x due to its impact on lookup and locking semantics. It's possible some of these issues could be worked around with compatibility wrappers, if necessary. Reviewed by: bz Sponsored by: Juniper Networks, Inc.
* Upgrade jail(2) to latest jail(2) API to make the regression test workbz2011-05-301-2/+9
| | | | | | | again. Eventually should switch to jail_set(2). Reported by: rwatson MFC after: 10 days
* Rework TIMEWAIT regression test so that kernel-allocated port numbers arerwatson2011-05-301-39/+84
| | | | | | | | used rather than a fixed userspace one, avoiding conflicts between the two test runs. MFC after: 3 days Sponsored by: Juniper Networks, Inc.
* Add missing include of stdio.h.rwatson2011-05-301-0/+1
| | | | | MFC after: 3 days Sponsored by: Juniper Networks, Inc.
* In the tcpdrop regression test, allow the kernel to allocate us a portrwatson2011-05-301-37/+44
| | | | | | | | | rather than using a fixed port number. This means that the regression test can be run many times in a row without waiting on TIMEWAIT to release a hard-coded port number. MFC after: 3 days Sponsored by: Juniper Networks, Inc.
* Add missing #include of err.h.rwatson2011-05-301-0/+1
| | | | | MFC after: 3 days Sponsored by: Juniper Networks, Inc.
* While doing it right for current configuration, fix the entry for rc.confbz2011-05-301-1/+1
| | | | | | | adding the missing mandatory "inet6" keyword. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
* Fix read_ivar implementation for MMC and SD.jchandra2011-05-303-26/+26
| | | | | | | | | | | 1. Both mmc_read_ivar() and sdhci_read_ivar() use the expression '*(int *)result = val' to assign to result which is uintptr_t *. This does not work on big-endian 64 bit systems. 2. The media_size ivar is declared as 'off_t' which does not fit into uintptr_t in 32bit systems, change this to long. Submitted by: kanthms at netlogicmicro com (initial version)
* Wrap long line.ae2011-05-301-1/+2
| | | | MFC after: 2 weeks
* Add tablearg support for ipfw setfib.ae2011-05-304-15/+30
| | | | | PR: kern/156410 MFC after: 2 weeks
* Include forgotten framework changes to get some of the new menu files ↵julian2011-05-303-2/+5
| | | | | | installed correctly on non x86/amd systems. pointy-hut to devin
* Use kproc_exit() instead of returning from the management function onnwhitehorn2011-05-291-1/+1
| | | | systems with no manageable thermal control devices.
* Split netconfig into three parts:bz2011-05-294-43/+351
| | | | | | | | | | | | | | | - netconfig - what auto will call which in turn will check for IPv4 and IPv6 to be available and ask the user to configure it by calling - netconfig_ipv4 doing DHCP and static IPv4 addresses, and - netconfig_ipv6 doing rtsol and static IPv6 addresses, and then checking, querying and updating resolv.conf upon return. Both DHCP and rtsol (in the future) might update resolv.conf already so we seed ourselves from that file if available. Reviewed by: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
* If READ from the local node failed we send the request to the remotetrociny2011-05-291-1/+1
| | | | | | | node. There is no use in doing this for synchronization requests. Approved by: pjd (mentor) MFC after: 1 week
* Modify the umount(8) command so that it doesn't dormacklem2011-05-291-3/+4
| | | | | | | | | | | | | a sync(2) syscall before unmount(2) for the "-f" case. This avoids a forced dismount from getting stuck for an NFS mountpoint in sync() when the server is not responsive. With this commit, forced dismounts should normally work for the NFS clients, but can take up to about 1minute to complete. PR: kern/157365 Reviewed by: kib MFC after: 2 weeks
* Check for IPv4 or IPv6 to be available by the kernel to notbz2011-05-294-53/+111
| | | | | | | | | | provoke errors trying to query options not available. Make it possible to compile out INET or INET6 only parts. Reviewed by: jamie Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 10 days
* Add a check for MNTK_UNMOUNTF at the beginning of nfs_sync()rmacklem2011-05-291-1/+11
| | | | | | | | | | in the old NFS client so that a forced dismount doesn't get stuck in the VFS_SYNC() call that happens before VFS_UNMOUNT() in dounmount(). Analagous to r222329 for the new NFS client. An additional change is needed before forced dismounts will work. PR: kern/157365 MFC after: 2 weeks
* Add some error handling here: if a sensor returns an error code (a negativenwhitehorn2011-05-291-1/+5
| | | | | | | Kelvin temperature, which is impossible except for some contrived magnetic spin systems), use the previous measurement from that sensor instead of corrupting everything and randomly changing the fans or shutting off the machine.
OpenPOWER on IntegriCloud