summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* simplify code by removing bit_fns and replacing with the use of a temporary maskkmacy2009-04-201-56/+20
|
* Close some but not all writer-writer races when maintaining IPv6rwatson2009-04-201-1/+18
| | | | | | interface address lists by locking the interface address list lock. MFC after: 2 weeks
* - Give a warning and start the oscillator if it was not previouslystas2009-04-204-25/+72
| | | | | | | | runned. - Rename ds1672 -> rtc to follow the other drivers. - Refactor/simplify the code a bit. MFC after: 2 weeks
* Sometimes we can call ed_detach() before the mtx has been initialized.imp2009-04-201-2/+4
| | | | Avoid it if it hasn't been initialized.
* Make mse(4) use si_drv1, instead of using unit numbers.ed2009-04-201-16/+12
| | | | Discussed with: imp
* Fix typo.kib2009-04-201-1/+1
| | | | | Noted by: jhb MFC after: 2 weeks
* vlan(4) no longer depends on miibus(4).antoine2009-04-202-13/+1
| | | | | Reviewed by: jhb@ MFC after: 1 month
* Lock interface address lists before iterating over them in nd6.rwatson2009-04-201-0/+5
| | | | MFC after: 2 weeks
* Conditionally add the interface name and address if availablebz2009-04-204-4/+14
| | | | | | | | | | so that a ppp running in `receiver' (server) mode can properly update routes, for example to update the MTU. Submitted by: loos.br gmail.com (Luiz Otavio O Souza) PR: bin/130159 PR: kern/125079, kern/122068, bin/126892 MFC after: 3 days
* In ufs_checkpath(), recheck that '..' still points to the inode withkib2009-04-203-41/+55
| | | | | | | | | | | | | | | | | | the same inode number after VFS_VGET() and relock of the vp. If '..' changed, redo the lookup. To reduce code duplication, move the code to read '..' dirent into the static helper function ufs_dir_dd_ino(). Supply the source inode number as an argument to ufs_checkpath() instead of the source inode itself. The inode is unlocked, thus it might be reclaimed, causing accesses to the freed memory. Use vn_vget_ino() to get the '..' vnode by its inode number, instead of directly code VFS_VGET() and relock, to properly busy the mount point while vp lock is dropped. Noted and reviewed by: tegge Tested by: pho MFC after: 1 month
* In ip_input(), cache the received mbuf's network interface in a localrwatson2009-04-201-16/+23
| | | | | | | | variable. Acquire the interface address list lock when iterating over the interface address list searching for a matching received broadcast address. MFC after: 2 weeks
* On the exit of the child process which parent either set SA_NOCLDWAITkib2009-04-201-4/+4
| | | | | | | | | | | | | | | or ignored SIGCHLD, unconditionally wake up the parent instead of doing this only when the child is a last child. This brings us in line with other U**xes that support SA_NOCLDWAIT. If the parent called waitpid(childpid), then exit of the child should wake up the parent immediately instead of forcing it to wait for all children to exit. Reported by: Alan Ferrency <alan pair com> Submitted by: Jilles Tjoelker <jilles stack nl> PR: 108390 MFC after: 2 weeks
* Adjust route(4) manual page to remove rtm_use field, which was removedtrasz2009-04-201-1/+0
| | | | | | from the route.h some time ago. Reviewed by: rwatson
* In icmp_reflect(), acquire the inteface address list lock whenrwatson2009-04-201-12/+28
| | | | | | | searching for a source address to use. MFC after: 2 weeks Reviewed by: bz
* - Unlock softc mutex on failure.stas2009-04-201-8/+15
| | | | MFC after: 1 week
* Don't conditionally define CACHE_LINE_SHIFT, as we anticipate sizingrwatson2009-04-208-19/+3
| | | | | | | | | | | | a fair number of static data structures, making this an unlikely option to try to change without also changing source code. [1] Change default cache line size on ia64, sparc64, and sun4v to 128 bytes, as this was what rtld-elf was already using on those platforms. [2] Suggested by: bde [1], jhb [2] MFC after: 2 weeks
* - Properly unlock mutex on failure in channel_trigger. Before thisstas2009-04-201-8/+15
| | | | | | the function just returned with the mutex held. MFC after: 1 week
* Provide locking for PowerPC interrupt sources config.raj2009-04-201-5/+20
| | | | Reviewed by: attilio
* While we currently still seem to have a gateway address, for futurebz2009-04-201-2/+5
| | | | | | | | | | | | | | stability, check for gw to be set before adding the flag and the address to the routing message. r186308, backed out in r191305, already tried to do that, and in addition ignore AF_LINK types of gateway addresses to work around a problem that r167797 had introduced on the kernel side always setting RTF_GATEWAY if a gateway address was passed into the kernel. The proper solution for this is still under discussion so I am hesitant to re-add the special AF_LINK treatment for now. MFC after: 3 days
* Back out r186308:bz2009-04-201-3/+1
| | | | | | | | | | | in case of AF_LINK, which the kernel still returns for an RTAX_GATEWAY as an empty sockaddr_dl in the classic tun<n> case. Copying the address into the message payload, but not the RTA_GATEWAY flag results in rt_xaddrs() in the kernel tripping over that and parsing the next attribute set with a flag, i.e. RTA_NETMASK, with the gateway address, resulting in bogus route entry. MFC after: 3 days
* Get rid of the device index number stored in the sa(4) unit number.ed2009-04-201-21/+12
| | | | | | The device index number stored in the unit number of sa(4) devices is only used to print debug messages. Get rid of this index number and use devtoname() to just print the entire device name.
* Prefer <sys/param.h> to <machine/param.h> for the definition ofrwatson2009-04-201-1/+1
| | | | | | | CACHE_LINE_SIZE. Submitted by: bde MFC after: 2 weeks
* Merge r191298 into HEAD.roberto2009-04-201-2/+2
| | | | | | | | | | | | Prevent a buffer overflow in ntpq. Patch taken from the PR database after being committed to the official ntp tree and present in 4.2.4p7-rc2. It will be MFH to the upcoming 7.2 pending re approval. Obtained from: https://support.ntp.org/bugs/show_bug.cgi?id=1144 MFC after: 3 days Security: http://www.securityfocus.com/bid/34481 CVE-2009-0159
* For RTL8139C+ controllers, have controller handle padding shortyongari2009-04-202-4/+7
| | | | | | | | | | | | | checksum offload frames. Software workaround used for broken controllers(RTL8169, RTL8168, RTL8168B) seem to cause watchdog timeouts on RTL8139C+. Introduce a new flag RL_FLAG_AUTOPAD to mark automatic padding feature of controller and set it for RTL8139C+ and controllers that use new descriptor format. This fixes watchdog timeouts seen on RTL8139C+. Reported by: Dimitri Rodis < DimitriR <> integritasystems dot com > Tested by: Dimitri Rodis < DimitriR <> integritasystems dot com >
* MFamd64/i386alc2009-04-201-39/+70
| | | | | | | | | | | | | | | | | | | | | | | | | Introduce pmap_try_insert_pv_entry(), a function that conditionally creates a pv entry if the number of entries is below the high water mark for pv entries. Introduce pmap_enter_quick_locked() and use it to reimplement pmap_enter_object(). The old implementation was broken. For example, it could block while holding a mutex lock. Change pmap_enter_quick_locked() to fail rather than wait if it is unable to allocate a page table page. This prevents a race between pmap_enter_object() and the page daemon. Specifically, an inactive page that is a successor to the page that was given to pmap_enter_quick_locked() might become a cache page while pmap_enter_quick_locked() waits and later pmap_enter_object() maps the cache page violating the invariant that cache pages are never mapped. Similarly, change pmap_enter_quick_locked() to call pmap_try_insert_pv_entry() rather than pmap_insert_entry(). Generally speaking, pmap_enter_quick_locked() is used to create speculative mappings. So, it should not try hard to allocate memory if free memory is scarce. Tested by: gonzo
* Cleanup resource allocation code a bit. Store the rids on theimp2009-04-205-47/+48
| | | | | resources rather than on the softc. When we allocate resources for PC Card, if we only get 16 ports, try again to get the others.
* Pass int arguments to auditon(2)'s A_GETCOND API rather than longrwatson2009-04-191-6/+6
| | | | | | | | | arguments. This change should be MFC'd with OpenBSM 1.1 since they are interdependent. MFC after: 2 weeks Obtained from: TrustedBSD Project Sponsored by: Apple, Inc.
* Temporarily relax the constraints on argument size checking for A_GETCOND;rwatson2009-04-191-12/+6
| | | | | | | login(1) isn't quite ready for them yet on 64-bit systems as it continues to use the conventions of the old version of the API. Reported by: stas, Jakub Lach <jakub_lach at mailplus.pl>
* Explicitly include machine/param.h for CACHE_LINE_SIZE.rwatson2009-04-191-0/+2
| | | | MFC after: 2 weeks
* Now that the kernel defines CACHE_LINE_SIZE in machine/param.h, userwatson2009-04-198-16/+0
| | | | | | | | that definition in the custom locking code for the run-time linker rather than local definitions. Pointed out by: tinderbox MFC after: 2 weeks
* Lock the interface address list when searching for a matching interfacerwatson2009-04-191-5/+13
| | | | | | | by address, or when implementing 'me' rules on IPv6. Prefer the field name if_addrhead to the macro if_addrlist. MFC after: 2 weeks
* In divert_packet(), lock the interface address list before iterating overrwatson2009-04-191-1/+5
| | | | | | it in search of an address. MFC after: 2 weeks
* Lock interface address lists in in_pcbladdr() when searching for arwatson2009-04-191-1/+12
| | | | | | | source address for a connection and there's no route or now interface for the route. MFC after: 2 weeks
* Protect against some writer-writer races in in_control() by acquiringrwatson2009-04-191-3/+7
| | | | | | | the interface address list lock around interface address list modifications. More to do here. MFC after: 2 weeks
* Lock the interface address list while building replies torwatson2009-04-191-0/+2
| | | | | | NGM_CISCO_COOKIE messages in ng_iface. MFC after: 2 weeks
* Lock interface address list when building a reply to NGM_EIFACE_GET_IFADDRSrwatson2009-04-191-0/+3
| | | | | | messages in ng_eiface. MFC after: 2 weeks
* Lock interface address list lock around ifaddr inserts and deletesrwatson2009-04-191-1/+5
| | | | | | | in at_control(). This locking is not yet complete but should prevent some classes of race conditions. MFC after: 2 weeks
* Build sound modules on PowerPC.nwhitehorn2009-04-191-0/+1
|
* Lock the interface address list while iterating a network interface'srwatson2009-04-191-0/+3
| | | | | | | address list when searching for a link-layer address to use during uuid generation. MFC after: 2 weeks
* Add description and cautionary note regarding CACHE_LINE_SIZE.rwatson2009-04-198-0/+32
| | | | | MFC after: 2 weeks Suggested by: alc
* In both pageout oom handler and vm_daemon, acquire the reference tokib2009-04-191-8/+21
| | | | | | | | | | the vmspace of the examined process instead of directly accessing its vmspace, that may change. Also, as an optimization, check for P_INEXEC flag before examining the process. Reported and tested by: pho (previous version) Reviewed by: alc MFC after: 3 week
* For each architecture, define CACHE_LINE_SHIFT and a derivedrwatson2009-04-198-0/+39
| | | | | | | | | | | | | CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available. Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems). MFC after: 2 weeks Discussed on: arch@
* A script for plucking packages and their runtime dependencies forphk2009-04-191-0/+96
| | | | nanobsd images.
* Don't try to setup interrupts for drivers that don't support them.rnoland2009-04-191-19/+22
| | | | | | | | This causes sis and probably a couple of other driver to panic and fail. Tested by: cpghost <cpghost@cordula.ws> PR: 133554 MFC after: 3 days
* Merge OpenBSM 1.1 from OpenBSM vendor branch to head.rwatson2009-04-1962-2904/+4977
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenBSM history for imported revision below for reference. MFC after: 2 weeks Sponsored by: Apple, Inc. Obtained from: TrustedBSD Project OpenBSM 1.1 - Change auditon(2) parameters and data structures to be 32/64-bit architecture independent. Add more information to man page about auditon(2) parameters. - Add wrapper functions for auditon(2) to use legacy commands when the new commands are not supported. - Add default for 'expire-after' in audit_control to expire trail files when the audit directory is more than 10 megabytes ('10M'). - Interface to convert between local and BSM fcntl(2) command values has been added: au_bsm_to_fcntl_cmd(3) and au_fcntl_cmd_to_bsm(3), along with definitions of constants in audit_fcntl.h. - A bug, introduced in OpenBSM 1.1 alpha 4, in which AUT_RETURN32 tokens generated by audit_submit(3) were improperly encoded has been fixed. - Fix example in audit_submit(3) man page. Also, make it clear that we want the audit ID as the argument. - A new audit event class 'aa', for post-login authentication and authorization events, has been added.
| * Vendor import of OpenBSM 1.1, which incorporates the following changesrwatson2009-04-1960-2902/+4971
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since the last imported OpenBSM release: OpenBSM 1.1 - Change auditon(2) parameters and data structures to be 32/64-bit architecture independent. Add more information to man page about auditon(2) parameters. - Add wrapper functions for auditon(2) to use legacy commands when the new commands are not supported. - Add default for 'expire-after' in audit_control to expire trail files when the audit directory is more than 10 megabytes ('10M'). - Interface to convert between local and BSM fcntl(2) command values has been added: au_bsm_to_fcntl_cmd(3) and au_fcntl_cmd_to_bsm(3), along with definitions of constants in audit_fcntl.h. - A bug, introduced in OpenBSM 1.1 alpha 4, in which AUT_RETURN32 tokens generated by audit_submit(3) were improperly encoded has been fixed. - Fix example in audit_submit(3) man page. Also, make it clear that we want the audit ID as the argument. - A new audit event class 'aa', for post-login authentication and authorization events, has been added. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc.
| * Vendor import of OpenBSM 1.1 beta1, which incorporates the followingrwatson2009-03-0228-289/+890
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes since the last imported OpenBSM release: OpenBSM 1.1 beta 1 - The filesz parameter in audit_control(5) now accepts suffixes: 'B' for Bytes, 'K' for Kilobytes, 'M' for Megabytes, and 'G' for Gigabytes. For legacy support no suffix defaults to bytes. - Audit trail log expiration support added. It is configured in audit_control(5) with the expire-after parameter. If there is no expire-after parameter in audit_control(5), the default, then the audit trail files are not expired and removed. See audit_control(5) for more information. - Change defaults in audit_control: warn at 5% rather than 20% free for audit partitions, rotate automatically at 2mb, and set the default policy to cnt,argv rather than cnt so that execve(2) arguments are captured if AUE_EXECVE events are audited. These may provide more usable defaults for many users. - Use au_domain_to_bsm(3) and au_socket_type_to_bsm(3) to convert au_to_socket_ex(3) arguments to BSM format. - Fix error encoding AUT_IPC_PERM tokens. Obtained from: TrustedBSD Project Sponsored by: Apple Inc.
* | Merge OpenBSM 1.1 changes to the FreeBSD 8.x kernel:rwatson2009-04-1911-76/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add and use mapping of fcntl(2) commands to new BSM constant space. - Adopt (int) rather than (long) arguments to a number of auditon(2) commands, as has happened in Solaris, and add compatibility code to handle the old comments. Note that BSM_PF_IEEE80211 is partially but not fully removed, as the userspace OpenBSM 1.1alpha5 code still depends on it. Once userspace is updated, I'll GCC the kernel constant. MFC after: 2 weeks Sponsored by: Apple, Inc. Obtained from: TrustedBSD Project Portions submitted by: sson
* | Remove support for FUTEX_REQUEUE operation.dchagin2009-04-193-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Glibc does not use this operation since 2.3.3 version (Jun 2004), as it is racy and replaced by FUTEX_CMP_REQUEUE operation. Glibc versions prior to 2.3.3 fall back to FUTEX_WAKE when FUTEX_REQUEUE returned EINVAL. Any application directly using FUTEX_REQUEUE without return value checking are definitely broken. Limit quantity of messages per process about unsupported operation. Approved by: kib (mentor) MFC after: 1 month
* | struct malloc_type has had a 'magic' field statically initialized torwatson2009-04-191-1/+13
| | | | | | | | | | | | | | M_MAGIC by MALLOC_DEFINE() for a long time; add assertions that malloc_type's passed to malloc(), free(), etc have that magic set. MFC after: 2 weeks
OpenPOWER on IntegriCloud