summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Build on Jeff Roberson's linker-set based dynamic per-CPU allocatorRobert Watson2009-07-14168-4307/+2500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (DPCPU), as suggested by Peter Wemm, and implement a new per-virtual network stack memory allocator. Modify vnet to use the allocator instead of monolithic global container structures (vinet, ...). This change solves many binary compatibility problems associated with VIMAGE, and restores ELF symbols for virtualized global variables. Each virtualized global variable exists as a "reference copy", and also once per virtual network stack. Virtualized global variables are tagged at compile-time, placing the in a special linker set, which is loaded into a contiguous region of kernel memory. Virtualized global variables in the base kernel are linked as normal, but those in modules are copied and relocated to a reserved portion of the kernel's vnet region with the help of a the kernel linker. Virtualized global variables exist in per-vnet memory set up when the network stack instance is created, and are initialized statically from the reference copy. Run-time access occurs via an accessor macro, which converts from the current vnet and requested symbol to a per-vnet address. When "options VIMAGE" is not compiled into the kernel, normal global ELF symbols will be used instead and indirection is avoided. This change restores static initialization for network stack global variables, restores support for non-global symbols and types, eliminates the need for many subsystem constructors, eliminates large per-subsystem structures that caused many binary compatibility issues both for monitoring applications (netstat) and kernel modules, removes the per-function INIT_VNET_*() macros throughout the stack, eliminates the need for vnet_symmap ksym(2) munging, and eliminates duplicate definitions of virtualized globals under VIMAGE_GLOBALS. Bump __FreeBSD_version and update UPDATING. Portions submitted by: bz Reviewed by: bz, zec Discussed with: gnn, jamie, jeff, jhb, julian, sam Suggested by: peter Approved by: re (kensmith) Notes: svn path=/head/; revision=195699
* Second attempt at eliminating .text relocations in shared librariesAlexander Kabaev2009-07-149-13/+14
| | | | | | | | | | | | | | | | | compiled with stack protector. Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work every time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kib) Notes: svn path=/head/; revision=195697
* - Change mmap() to fail requests with EINVAL that pass a length of 0. ThisJohn Baldwin2009-07-142-3/+3
| | | | | | | | | | | | | | | behavior is mandated by POSIX. - Do not fail requests that pass a length greater than SSIZE_MAX (such as > 2GB on 32-bit platforms). The 'len' parameter is actually an unsigned 'size_t' so negative values don't really make sense. Submitted by: Alexander Best alexbestms at math.uni-muenster.de Reviewed by: alc Approved by: re (kib) MFC after: 1 week Notes: svn path=/head/; revision=195693
* Add missing MLINKS for acl_{get,set}_link_fd(3).Edward Tomasz Napierala2009-07-141-0/+2
| | | | | | | Approved by: re (kib) Notes: svn path=/head/; revision=195692
* Re-add opt_inet.h, as we did in r193862 and lost yet again.Bjoern A. Zeeb2009-07-141-0/+1
| | | | | | | Approved by: re (kib) Notes: svn path=/head/; revision=195691
* Disable MSI by default for nVidia MCP55 chipset.Alexander Motin2009-07-141-1/+1
| | | | | | | | | | It is reported to be broken in the same way as MCP51. PR: kern/136429 Approved by: re (kib) Notes: svn path=/head/; revision=195690
* - Do aggresive saturation on various polynomial interpolators.Ariff Abdullah2009-07-141-93/+98
| | | | | | | | | | | | | This dramatically pushing 99.9% interpolations and quantizations error _below_ -180dB on 32bit dynamic range, resulting extremely high quality conversion. - Use BSPLINE interpolator for filter oversampling factor greater or equal than 64 (log2 6). Approved by: re (kib) Notes: svn path=/head/; revision=195689
* Change xpt_scan_bus to scsi_scan_bus and xpt_scan_lun to scsi_scan_lunEd Maste2009-07-141-10/+10
| | | | | | | | | in comments and printfs to match new function names after refacoring. Approved by: re Notes: svn path=/head/; revision=195688
* Fix leaks in probestart, probedone, and scsi_scan_bus. Also freeEd Maste2009-07-141-3/+8
| | | | | | | | | | | | | page_list using the matching malloc type for the allocation. Approved by: re Reviewed by: scottl [1] MFC after: 1 week [1] Original patch was against xpt_cam.c, prior to the cam refactoring. Notes: svn path=/head/; revision=195685
* Updates, mostly to add 802.11s support:Sam Leffler2009-07-142-38/+273
| | | | | | | | | | | | | o add missing Status and Reason codes o parse/display Action frames o parse/display Mesh data frames o parse/display BA frames Reviewed by: rpaulo Approved by: re (kib) Notes: svn path=/head/; revision=195684
* Fix a buglet that slipped into r195654. My buildworld/buildkernel sanityLawrence Stewart2009-07-141-1/+1
| | | | | | | | | | | check missed this because cxgb's TOM is currently commented out of the build system. Submitted by: Navdeep Parhar <np at FreeBSD dot org> Approved by: re (kensmith), kensmith (mentor temporarily unavailable) Notes: svn path=/head/; revision=195677
* Make mklocale work again, now that fwrite()'s return codes are different.Ed Schouten2009-07-141-2/+2
| | | | | | | | Submitted by: Navdeep Parhar <nparhar gmail com> Approved by: re (kib) Notes: svn path=/head/; revision=195676
* Adding hardware ID for RTL810x PCIe found on HP Pavilion DV2-1022AX.Tai-hwa Liang2009-07-142-0/+3
| | | | | | | | Reviewed by: yongari Approved by: re (kib, kensmith) Notes: svn path=/head/; revision=195675
* Match PCI Express root bridge _HID directly instead ofJung-uk Kim2009-07-133-1/+3
| | | | | | | | | | relying on _CID. Reviewed by: jhb Approved by: re (kib) Notes: svn path=/head/; revision=195666
* Fix copy-paste bug, enabling SIM PMP support, when it was not really found.Alexander Motin2009-07-131-1/+1
| | | | | | | Approved by: re (implicitly) Notes: svn path=/head/; revision=195665
* Revert the CISS driver to 64K i/o, the previous change was in error andScott Long2009-07-131-1/+1
| | | | | | | | | missing a lot of needed infrastructure. Approved by: re Notes: svn path=/head/; revision=195663
* Fix a few language nits.Joel Dahl2009-07-131-5/+6
| | | | | | | | Submitted by: Ben Kaduk <minimarmot@gmail.com> Approved by: re (blanket) Notes: svn path=/head/; revision=195662
* Fix inline function declaration and prototype.Rui Paulo2009-07-131-5/+4
| | | | | | | Approved by: re (kensmith) Notes: svn path=/head/; revision=195661
* Correct an error of omission in r195649 ("Add support to the virtual memoryAlan Cox2009-07-131-2/+1
| | | | | | | | | | | system for configuring machine-dependent memory attributes: ..."). In r195649, the "vm_cache_mode_t/vm_memattr_t" parameter was removed from vm_phys_alloc_contig(). Approved by: re (kensmith) Notes: svn path=/head/; revision=195660
* Fix Marvel SATA controllers operation, broken by rev. 188765,Alexander Motin2009-07-131-2/+2
| | | | | | | | | | by using uninitialized variable. Tested by: Chris Hedley Approved by: re (kensmith) Notes: svn path=/head/; revision=195659
* Move msg{snd,recv,get,ctl} manual pages from section 3 to 2.Edward Tomasz Napierala2009-07-138-26/+32
| | | | | | | Approved by: re (kib) Notes: svn path=/head/; revision=195656
* Fix a race in the manipulation of the V_tcp_sack_globalholes global variable,Lawrence Stewart2009-07-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | which is currently not protected by any type of lock. When triggered, the bug would sometimes cause a panic when the TCP activity to an affected machine eventually slowed during a lull. The panic only occurs if INVARIANTS is compiled into the kernel, and has laid dormant for some time as a result of INVARIANTS being off by default except in FreeBSD-CURRENT. Switch to atomic operations in the locations where the variable is changed. Reads have not been updated to be protected by atomics, so there is a possibility of accounting errors in any given calculation where the variable is read. This is considered unlikely to occur in the wild, and will not cause serious harm on rare occasions where it does. Thanks to Robert Watson for debugging help. Reported by: Kamigishi Rei <spambox at haruhiism dot net> Tested by: Kamigishi Rei <spambox at haruhiism dot net> Reviewed by: silby Approved by: re (rwatson), kensmith (mentor temporarily unavailable) Notes: svn path=/head/; revision=195655
* Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface toLawrence Stewart2009-07-137-22/+58
| | | | | | | | | | | | | | | | the TCP syncache. This returns struct tcpopt to being private within the TCP implementation, thus allowing it to be modified without ABI concerns. The patch breaks the ABI. Bump __FreeBSD_version to 800103 accordingly. The cxgb driver is the only TOE consumer affected by this change, and needs to be recompiled along with the kernel. Suggested by: rwatson Reviewed by: rwatson, kmacy Approved by: re (kensmith), kensmith (mentor temporarily unavailable) Notes: svn path=/head/; revision=195654
* Rename ATA probe driver to "aprobe" to resolve name conflict with SCSIAlexander Motin2009-07-131-4/+4
| | | | | | | | | and fix loading cam as module. Approved by: re (implicitly) Notes: svn path=/head/; revision=195653
* 1) Use our vendor domain at the pool.David Malone2009-07-131-11/+16
| | | | | | | | | | | | | | | 2) Point people at the pool website and encourage people to provide a server in the pool (as a courtesy to the pool guys). 3) Fix a spelling. 4) Comment out the local clock and include a link to documentation for use of the local clock on the ntp.org site. Approved by: re (kib) Notes: svn path=/head/; revision=195652
* Add support to the virtual memory system for configuring machine-Alan Cox2009-07-1230-106/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dependent memory attributes: Rename vm_cache_mode_t to vm_memattr_t. The new name reflects the fact that there are machine-dependent memory attributes that have nothing to do with controlling the cache's behavior. Introduce vm_object_set_memattr() for setting the default memory attributes that will be given to an object's pages. Introduce and use pmap_page_{get,set}_memattr() for getting and setting a page's machine-dependent memory attributes. Add full support for these functions on amd64 and i386 and stubs for them on the other architectures. The function pmap_page_set_memattr() is also responsible for any other machine-dependent aspects of changing a page's memory attributes, such as flushing the cache or updating the direct map. The uses include kmem_alloc_contig(), vm_page_alloc(), and the device pager: kmem_alloc_contig() can now be used to allocate kernel memory with non-default memory attributes on amd64 and i386. vm_page_alloc() and the device pager will set the memory attributes for the real or fictitious page according to the object's default memory attributes. Update the various pmap functions on amd64 and i386 that map pages to incorporate each page's memory attributes in the mapping. Notes: (1) Inherent to this design are safety features that prevent the specification of inconsistent memory attributes by different mappings on amd64 and i386. In addition, the device pager provides a warning when a device driver creates a fictitious page with memory attributes that are inconsistent with the real page that the fictitious page is an alias for. (2) Storing the machine-dependent memory attributes for amd64 and i386 as a dedicated "int" in "struct md_page" represents a compromise between space efficiency and the ease of MFCing these changes to RELENG_7. In collaboration with: jhb Approved by: re (kib) Notes: svn path=/head/; revision=195649
* add IEEE80211_SCAN_REQSam Leffler2009-07-121-0/+16
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=195645
* fix Jouni's email addressSam Leffler2009-07-127-7/+7
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=195644
* This patch adds a host route to an interface address (that is assignedQing Li2009-07-121-0/+46
| | | | | | | | | | | | | to a non loopback/ppp link type) through the loopback interface. Prior to the new L2/L3 rewrite, this host route was explicitly created when processing the IPv6 address assignment. This loopback host route is deleted when that IPv6 address is removed from the interface. Reviewed by: bz, gnn Approved by: re Notes: svn path=/head/; revision=195643
* Add calls to the experimental nfs client for the case of an "intr" mount,Rick Macklem2009-07-121-1/+16
| | | | | | | | | | so that signals that aren't supposed to terminate RPCs in progress are masked off during the RPC. Approved by: re (kensmith), kib (mentor) Notes: svn path=/head/; revision=195642
* Fix the handling of dotdot in lookup for the experimental nfs clientRick Macklem2009-07-121-0/+2
| | | | | | | | | in a manner analagous to the change in r195294 for the regular nfs client. Approved by: re (kensmith), kib (mentor) Notes: svn path=/head/; revision=195641
* Isochronous transfers only have 1 frame buffer, but multipleMarcel Moolenaar2009-07-121-1/+1
| | | | | | | | | | frame lengths. The frame buffer is at index 0. Approved by: re (kensmith) Obtained from: HPS Notes: svn path=/head/; revision=195640
* MFp4:Marcel Moolenaar2009-07-121-1/+2
| | | | | | | | | | | | | | | | | USB CORE: busdma improvement For single segment allocations the boundary field of the BUSDMA tag should be zero. Currently all single segment allocations are less than or equal to 4096 bytes, so the limit does not kick in. If any single segment USB allocations would be greater than 4K, then it would be a problem. Approved by: re (kensmith) Obtained from: HPS Notes: svn path=/head/; revision=195639
* Fix fwrite() to return 0 when size or nmemb are zero.Ed Schouten2009-07-122-4/+9
| | | | | | | | | | | Right now nmemb is returned when size is 0. In newer versions of the standards, it is explicitly required that fwrite() should return 0. Submitted by: Christoph Mallon Approved by: re (kib) Notes: svn path=/head/; revision=195637
* Test suite for the poll(2)/select(2) on fifos, pipes and sockets,Konstantin Belousov2009-07-1214-0/+883
| | | | | | | | | | and recorded results for several operating systems. Submitted by: bde Approved by: re (kensmith) Notes: svn path=/head/; revision=195636
* When VM_MAP_WIRE_HOLESOK is not specified and vm_map_wire(9) encountersKonstantin Belousov2009-07-121-1/+1
| | | | | | | | | | | | | | | non-readable and non-executable map entry, the entry is skipped from wiring and loop is aborted. But, since MAP_ENTRY_WIRE_SKIPPED was not set for the map entry, its wired_count is later erronously decremented. vm_map_delete(9) for such map entry stuck in "vmmaps". Properly set MAP_ENTRY_WIRE_SKIPPED when aborting the loop. Reported by: John Marshall <john.marshall riverwillow com au> Approved by: re (kensmith) Notes: svn path=/head/; revision=195635
* Pad the following TCP related structs to allow MFCs of upcoming features/fixesLawrence Stewart2009-07-123-2/+18
| | | | | | | | | | | | | | | | | | | back to the 8 branch: tcp_var.h - struct sackhint - struct tcpcb - struct tcpstat The patch breaks the ABI. Bump __FreeBSD_version to 800102 accordingly. User space tools that rely on the size of any of these structs (e.g. sockstat) need to be recompiled. Reviewed by: rpaulo, sam, andre, rwatson Approved by: re & mentor (gnn) Notes: svn path=/head/; revision=195634
* Rename option USBVERBOSE to USB_VERBOSE for 2 reasons:Marcel Moolenaar2009-07-122-2/+2
| | | | | | | | | | | | | | | 1. USB_VERBOSE is more consistent with USB_DEBUG, 2. sys/dev/usb/usb_device.c uses option USB_VERBOSE and not USBVERBOSE. POLA with the USBVERBOSE option as it's found in 7-STABLE has been considered but found insignificant in the face of the USB stack overhaul. Approved by: re (kensmith) Notes: svn path=/head/; revision=195633
* Increase the size of the page table on 64-bit PowerPC machines as aNathan Whitehorn2009-07-121-2/+0
| | | | | | | | | | | | bandaid to prevent exhaustion of the primary and secondary hash groups in the event of extreme stress on the PMAP layer (e.g. a forkbomb). This wastes memory, and should be revised to properly handle PTEG spills instead. Suggested by: grehan Approved by: re (kensmith) Notes: svn path=/head/; revision=195632
* Revert rev 192323 (nfs_common.c only):Marcel Moolenaar2009-07-121-3/+2
| | | | | | | | | | | | | | | | | | | | The D-cache flushing added here was to deal with I-cache incoherency observed on ia64. However, the problem was in the implementation of pmap_enter_object() for ia64: it was missing I-cache coherency logic for prefaulted pages. After this got added in rev 195625, testing showed that no D-cache flushing was required. The SIGILL that was observed on Book-E (see commit log for rev 192323) ended up not being related to I-cache incoherency, but was found to be caused by bad memory. This discovery further undermined the need for D-cache flushing in the NFS I/O code, triggering the reversal. Approved by: re (kensmith) Notes: svn path=/head/; revision=195631
* first cut at documenting ioctl api's for net80211Sam Leffler2009-07-123-247/+1303
| | | | | | | | | (replaces mostly incorrect information) Approved by: re (blanket) Notes: svn path=/head/; revision=195630
* In nvpair_native_embedded_array(), meaningless pointers are zeroed.Marcel Moolenaar2009-07-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The programmer was aware that alignment was not guaranteed in the packed structure and used bzero() to NULL out the pointers. However, on ia64, the compiler is quite agressive in finding ILP and calls to bzero() are often replaced by simple assignments (i.e. stores). Especially when the width or size in question corresponds with a store instruction (i.e. st1, st2, st4 or st8). The problem here is not a compiler bug. The address of the memory to zero-out was given by '&packed->nvl_priv' and given the type of the 'packed' pointer the compiler could assume proper alignment for the replacement of bzero() with an 8-byte wide store to be valid. The problem is with the programmer. The programmer knew that the address did not have the alignment guarantees needed for a regular assignment, but failed to inform the compiler of that fact. In fact, the programmer told the compiler the opposite: alignment is guaranteed. The fix is to avoid using a pointer of type "nvlist_t *" and instead use a "char *" pointer as the basis for calculating the address. This tells the compiler that only 1-byte alignment can be assumed and the compiler will either keep the bzero() call or instead replace it with a sequence of byte-wise stores. Both are valid. Approved by: re (kib) Notes: svn path=/head/; revision=195627
* Remove build timestamps from the following files:Colin Percival2009-07-117-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | /boot/kernel/hptrr.ko /etc/mail/*.cf /lib/libcrypto.so.5 /usr/bin/ntpq /usr/sbin/amd /usr/sbin/iasl /usr/sbin/ntpd /usr/sbin/ntpdate /usr/sbin/ntpdc There does not appear to be any purpose to having these timestamps, and they have the irritating consequence that the aforementioned files will be different every time they are rebuilt. After this commit, the only remaining build timestamps are in the kernel, the boot loaders, /usr/include/osreldate.h (the year in the copyright notice), and lib*.a (the timestamps on all of the included .o files). Reviewed by: scottl (hptrr), gshapiro (sendmail), simon (openssl), roberto (ntp), jkim (acpica) Approved by: re (kib) Notes: svn path=/head/; revision=195626
* On exec(2), when loading the ELF image, pmap_enter_object() isMarcel Moolenaar2009-07-111-0/+3
| | | | | | | | | | | | | | called to prefault pages. This is an obvious place for making sure the I-cache is coherent. It was missing though. As such, execution over NFS and ZFS file systems was failing. NFS was fixed the wrong way (by flushing the D-cache as part of the NFS code) in a previous commit. ZFS problems were encountered after that and indicated that something else was wrong... Approved by: re (kib) Notes: svn path=/head/; revision=195625
* Re-factoring for adding weighted routes introduced aKip Macy2009-07-111-1/+11
| | | | | | | | | | fairly irritating bug where the system will panic when RADIX_MPATH is enabled. This change fixes this. Approved by: re@ Notes: svn path=/head/; revision=195624
* Fix typo: kproc_resume,.9 -> kproc_resume.9.Colin Percival2009-07-111-1/+1
| | | | | | | Approved by: re (kib) Notes: svn path=/head/; revision=195622
* Fix .Dd value -- our mdoc macros don't know how to parse the $Mdocdate$Colin Percival2009-07-111-1/+1
| | | | | | | | | | tag, so the file was being treated as having no date (i.e., the current date was being inserted). Approved by: re (kib) Notes: svn path=/head/; revision=195621
* Fix something bogus deletion that got it during mesh commit.Rui Paulo2009-07-111-0/+1
| | | | | | | Approved by: re (implicit) Notes: svn path=/head/; revision=195620
* Document the new multichannel support.Joel Dahl2009-07-111-1/+51
| | | | | | | | Reviewed by: ariff Approved by: re (blanket) Notes: svn path=/head/; revision=195619
* Implementation of the upcoming Wireless Mesh standard, 802.11s, on theRui Paulo2009-07-1152-203/+6012
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net80211 wireless stack. This work is based on the March 2009 D3.0 draft standard. This standard is expected to become final next year. This includes two main net80211 modules, ieee80211_mesh.c which deals with peer link management, link metric calculation, routing table control and mesh configuration and ieee80211_hwmp.c which deals with the actually routing process on the mesh network. HWMP is the mandatory routing protocol on by the mesh standard, but others, such as RA-OLSR, can be implemented. Authentication and encryption are not implemented. There are several scripts under tools/tools/net80211/scripts that can be used to test different mesh network topologies and they also teach you how to setup a mesh vap (for the impatient: ifconfig wlan0 create wlandev ... wlanmode mesh). A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled by default on GENERIC kernels for i386, amd64, sparc64 and pc98. Drivers that support mesh networks right now are: ath, ral and mwl. More information at: http://wiki.freebsd.org/WifiMesh Please note that this work is experimental. Also, please note that bridging a mesh vap with another network interface is not yet supported. Many thanks to the FreeBSD Foundation for sponsoring this project and to Sam Leffler for his support. Also, I would like to thank Gateworks Corporation for sending me a Cambria board which was used during the development of this project. Reviewed by: sam Approved by: re (kensmith) Obtained from: projects/mesh11s Notes: svn path=/head/; revision=195618