summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use proper form of gnu designated initalizers. This letsrdivacky2009-06-242-2/+2
| | | | | | | clang compile this files. Approved by: ed (mentor) Silence from: harti (maintainer?)
* Printf fewer warnings when adding a route to an atalk address fails;rwatson2009-06-241-10/+2
| | | | | | userspace will print the error. MFC after: 3 days
* In if_setlladdr(), use IF_ADDR_LOCK() and ifaddr references to improverwatson2009-06-241-3/+15
| | | | | | the safety of link layer address manipulation. MFC after: 6 weeks
* In ARP input, more consistently acquire and release ifaddr references.rwatson2009-06-241-2/+14
| | | | MFC after: 6 weeks
* Break at_ifawithnet() into two variants:rwatson2009-06-245-94/+149
| | | | | | | | | | | | | | | - at_ifawithnet(), which acquires an locks it needs and returns an at_ifaddr reference. - at_ifawithnet_locked(), which relies on the caller locking at_ifaddr_list, and returns a pointer rather than a reference. Update various consumers to prefer one or the other, including ether and fddi output, to properly release at_ifaddr references. Rework at_control() to manage locking and references in a manner identical to in_control(). MFC after: 6 weeks
* Reduce debugging output for netatalk routing events.rwatson2009-06-241-44/+6
| | | | MFC after: 3 days
* Initialize the uip to silence gcc warning that seems to sneak in in somekib2009-06-241-0/+1
| | | | | | build environments. Reported by: alc, bf1783 at googlemail com
* Lock if_addrhead when iterating, and where necessary acquire and releaserwatson2009-06-241-21/+27
| | | | | | ifadr references in if_sppp. MFC after: 6 weeks
* Make stf_getsrcifa6() return a reference to an in6_ifaddr rather thanrwatson2009-06-241-1/+9
| | | | | | a pointer, and dispose of the references when no longer needed. MFC after: 6 weeks
* Do not stop the loop when an empty or deleted directory entry is found.jhay2009-06-241-1/+3
| | | | Rather just skip over it.
* Add detection of UFS filesystems.cperciva2009-06-242-4/+61
| | | | | | | PR: bin/135565 Submitted by: Daniel O'Connor Reviewed by: randi MFC after: 1 month
* The bits set in a page's dirty mask are a subset of the bits set in itsalc2009-06-242-10/+8
| | | | | | | | valid mask. Consequently, there is no need to perform a bit-wise and of the page's dirty and valid masks in order to determine which parts of a page are dirty and valid. Eliminate an unnecessary #include.
* Slight comment fix.ariff2009-06-241-5/+4
|
* Update SCCS IDs for Berkeley DB 1.86 merge.delphij2009-06-242-2/+2
|
* style: operators should appear at the line end if we have to wrap.delphij2009-06-241-2/+2
|
* Add a note about the implication of secure level setting against kldload,delphij2009-06-231-0/+6
| | | | and cross reference security(7).
* Merge fmtcheck() prototype change.delphij2009-06-231-1/+1
| | | | Obtained from: NetBSD
* Use const instead of __const, and merge the license change from NetBSD.delphij2009-06-231-9/+3
| | | | Obtained from: NetBSD
* - Use size_t instead of int when appropriate;delphij2009-06-2311-26/+22
| | | | | | - Use C99 sparse initialization. With these changes ifconfig(8) is WARNS=2 clean.
* %.s expects an int as the length specifier, so cast properly.delphij2009-06-231-1/+2
|
* Use strlcpy() instead of manually setting the last byte of the array to \0.delphij2009-06-231-8/+4
|
* Use strlcpy() instead of explicitly set \0 on the tail of the array.delphij2009-06-231-2/+1
|
* Staticify internal routines.delphij2009-06-234-7/+7
|
* Merge NetBSD revision 1.14: humanize_number.c is now 2-clause BSD licensed.delphij2009-06-231-8/+1
| | | | | | | (humanize_number.3 intentionally hold back until I make sure why we didn't merged dehumanize_number(3)). Obtained from: NetBSD
* K&R -> ANSIdelphij2009-06-233-10/+5
|
* Use C99 initialization when necessary; apply static to internal rountines.delphij2009-06-231-5/+5
| | | | This makes nfsstat WARNS=3 clean.
* K&R -> ANSIdelphij2009-06-231-3/+1
|
* Make algorithm a bit more bulletproof.mav2009-06-232-4/+4
|
* Use getprogname() instead of referencing __progname.delphij2009-06-231-3/+2
|
* Quote -x tracing output so it is unambiguous.jilles2009-06-231-2/+17
| | | | | | It is usually but not always suitable for re-input to the shell. Approved by: ed (mentor) (implicit)
* Implement a facility for dynamic per-cpu variables.jeff2009-06-2342-40/+547
| | | | | | | | | | | | | | | - Modules and kernel code alike may use DPCPU_DEFINE(), DPCPU_GET(), DPCPU_SET(), etc. akin to the statically defined PCPU_*. Requires only one extra instruction more than PCPU_* and is virtually the same as __thread for builtin and much faster for shared objects. DPCPU variables can be initialized when defined. - Modules are supported by relocating the module's per-cpu linker set over space reserved in the kernel. Modules may fail to load if there is insufficient space available. - Track space available for modules with a one-off extent allocator. Free may block for memory to allocate space for an extent. Reviewed by: jhb, rwatson, kan, sam, grehan, marius, marcel, stas
* Remove duplicate if-statement on gmt_is_set in gmtsub().edwin2009-06-231-8/+6
| | | | MFC after: 1 week
* - Added code to read bootcode firwmare version.davidch2009-06-232-43/+131
| | | | | | - Created dedicated shared memory access routines. MFC after: One week
* - Use cpuset_t and the CPU_ macros in place of cpumask_t so that ULEjeff2009-06-231-19/+19
| | | | | supports arbitrary numbers of cpus rather than being limited by cpumask_t to the number of bits in a long.
* Make callers to in6_selectsrc() and in6_pcbladdr() pass in memorybz2009-06-239-92/+87
| | | | | | | | | to save the selected source address rather than returning an unreferenced copy to a pointer that might long be gone by the time we use the pointer for anything meaningful. Asked for by: rwatson Reviewed by: rwatson
* Fix variable name.mav2009-06-231-1/+1
|
* Add tests for r194774.jilles2009-06-231-0/+9
| | | | Approved by: ed (mentor) (implicit)
* Do not fork for a subshell if it is the last thing this shell is doingjilles2009-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | (EV_EXIT). The fork is still done as normal if any traps are active. In many cases, the fork can be avoided even without this change by using {} instead of (), but in practice many scripts use (), likely because the syntax is simpler. Example: sh -c '(/bin/sleep 10)& sleep 1;ps -p $! -o comm=' Now prints "sleep" instead of "sh". $! is more useful this way. Most shells (dash, bash, pdksh, ksh93, zsh) seem to print "sleep" for this. Example: sh -c '( ( ( (ps jT))))' Now shows no waiting shell processes instead of four. Most shells (dash, bash, pdksh, ksh93, zsh) seem to show zero or one. PR: bin/74404 Approved by: ed (mentor) (implicit)
* When mountd.c parses the nfsv4 root line(s) in /etc/exports, itrmacklem2009-06-231-1/+13
| | | | | | | | allocates data structures that are never linked into the tree or free'd. As such, mountd would leak memory every time it parsed an nfsv4 root line. This patch frees up those structures to plug the leak. Approved by: kib (mentor)
* Rework r193814:mav2009-06-232-70/+63
| | | | | | | | | | | While general idea of patch was good, it was not working properly due the way it was implemented. When we are using same timer interrupt for several of hard/prof/stat purposes we should not send several IPIs same time to other CPUs. Sending several IPIs same time leads to terrible accounting/profiling results due to strong synchronization effect, when the second interrupt handler accounts processing of the first one. Interlink timer events in a such way, that no more then one IPI is sent for any original timer interrupt.
* Improve my last commit: use a separate condvar to serialize.ed2009-06-232-2/+5
| | | | | | | The advantage of using a separate condvar is that we can just use cv_signal(9) instead of cv_broadcast(9). It makes no sense to wake up multiple threads. It also makes the TTY code easier to understand. t_dcdwait sounds totally unrelated.
* Add one more reference to SEE ALSO. Sort while here.joel2009-06-231-2/+6
| | | | Submitted by: ariff
* Use dcdwait to block threads to serialize writes.ed2009-06-231-2/+3
| | | | | | | | I suspect the usage of bgwait causes a lot of spurious wakeups when threads are blocked in the background, because they will be woken up each time a write() call is performed. Also wakeup dcdwait when the TTY is abandoned.
* Bring in a few mdoc/language fixes.joel2009-06-231-13/+25
| | | | Submitted by: ru
* Usermode portion of the support for swap allocation accounting:kib2009-06-239-14/+75
| | | | | | | | | | | - update for getrlimit(2) manpage; - support for setting RLIMIT_SWAP in login class; - addition to the limits(1) and sh and csh limit-setting builtins; - tuning(7) documentation on the sysctls controlling overcommit. In collaboration with: pho Reviewed by: alc Approved by: re (kensmith)
* Implement global and per-uid accounting of the anonymous memory. Addkib2009-06-2329-88/+664
| | | | | | | | | | | | | | | | | | | | | | | | | | | rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved for the uid. The accounting information (charge) is associated with either map entry, or vm object backing the entry, assuming the object is the first one in the shadow chain and entry does not require COW. Charge is moved from entry to object on allocation of the object, e.g. during the mmap, assuming the object is allocated, or on the first page fault on the entry. It moves back to the entry on forks due to COW setup. The per-entry granularity of accounting makes the charge process fair for processes that change uid during lifetime, and decrements charge for proper uid when region is unmapped. The interface of vm_pager_allocate(9) is extended by adding struct ucred *, that is used to charge appropriate uid when allocation if performed by kernel, e.g. md(4). Several syscalls, among them is fork(2), may now return ENOMEM when global or per-uid limits are enforced. In collaboration with: pho Reviewed by: alc Approved by: re (kensmith)
* sh: Improve handling of setjmp/longjmp volatile:jilles2009-06-234-61/+18
| | | | | | | | | | | - remove ineffective and unnecessary (void) &var; [1] - remove some unnecessary volatile keywords - add a necessary volatile keyword - save the old handler before doing something that could use the saved value Submitted by: Christoph Mallon [1] Approved by: ed (mentor)
* - Update regarding the support for SBus GEM added in r194763.marius2009-06-231-9/+25
| | | | - Improve the description a bit and add a reference to vlan(4).
* - Initialize the ifnet structure, especially if_dname, before probingmarius2009-06-237-317/+575
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the PHYs as some PHY drivers use it (but probably shouldn't). How gem(4) has worked with brgphy(4) on powerpc without this so far is unclear to me. - Introduce a dying flag which is set during detach and checked in gem_ioctl() in order to prevent active BPF listeners to clear promiscuous mode which may lead to the tick callout being restarted which will trigger a panic once it's actually gone. - In gem_stop() reset rather than just disable the transmitter and receiver in order to ensure we're not unloading DMA maps still in use by the hardware. [1] - The blanking time is specified in PCI clocks so we should use twice the value when operating at 66MHz. - Spell some 2 as ETHER_ALIGN and a 19 as GEM_STATUS_TX_COMPLETION_SHFT to make the actual intentions clear. - As we don't unload the peak attempts counter ignore its overflow interrupts. - Remove a stale setting of a variable to GEM_TD_INTERRUPT_ME which isn't used afterwards. - For optimum performance increment the TX kick register in multiples of 4 if possible as suggested by the documentation. - Partially revert r164931; drivers should only clear the watchdog timer if all outstanding TX descriptors are done. - Fix some debugging strings. - Add a missing BUS_DMASYNC_POSTWRITE in gem_rint(). - As the error paths in the interrupt handler are generally unlikely predict them as false. - Add support for the SBus version of the GEM controller. [2] - Add some lock assertions. - Improve some comments. - Fix some more or less cosmetic issues in the code of the PCI front-end. - Change some softc members to be unsigned where more appropriate and remove unused ones. Approved by: re (kib) Obtained from: NetBSD (partially) [2], OpenBSD [1] MFC after: 2 weeks
* Add a limit for child jails via the "children.cur" and "children.max"jamie2009-06-234-28/+93
| | | | | | parameters. This replaces the simple "allow.jails" permission. Approved by: bz (mentor)
OpenPOWER on IntegriCloud