summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make sure that we handle errors in device_get_children correctly.imp2008-08-231-1/+2
|
* Handle the error case properly for device_get_children.imp2008-08-231-4/+3
|
* Handle errors from device_get_children.imp2008-08-231-4/+9
|
* - Provide and consume module dependency information.marius2008-08-232-5/+8
| | | | | | - Fix whitespace bugs. MFC after: 3 days
* Allow the user to suppress the rate-limited pty(4) warning.ed2008-08-231-1/+5
| | | | | | | | | | | | | The pty(4) driver raises up to warnings when an old BSD-style PTY is created. The reason why I added this warning, was to make it easier to spot applications that allocate BSD-style PTY's, while they should just use openpty() or posix_openpt(). Add a sysctl, which allows you to override the number of remaining messages, making it possible to suppress the warnings. Requested by: kib Reviewed by: kib
* When device_get_children returns an error, ignore that bus' children.imp2008-08-231-1/+2
|
* Move the code that looks for the companion phy to a subroutine to makeimp2008-08-231-23/+22
| | | | | sure we get the error handling right in both places. This also simplifies the code somewhat.
* - Removed unused sc_node.marius2008-08-231-21/+9
| | | | | | | | | - Provide module dependency information. - Static'ize ebus_release_resource() in order to match prototype. - Remove outdated and/or obsolete comments. - Fix whitespace bugs. MFC after: 3 days
* There actually were bugs in the original handling that I missed lastimp2008-08-231-3/+4
| | | | | | | | | | night. Free the children after each pci bus that is searched. Otherwise we leak them. With free in the new place, we also have to free children before going to done when we find the device we're looking for. Also, if we can't get the children of a device, just ignore that bus.
* It turns out that my analysis of the error handling here was wrong.imp2008-08-232-10/+9
| | | | | | | When there's an error, we don't want to free the children, since it will be stack garbage. While we did fail to dereference it by setting devs to 0, we didn't fail to call free. We never failed to fail, it was the easiest thing to do.
* Introduce two related changes to the TrustedBSD MAC Framework:rwatson2008-08-2329-169/+461
| | | | | | | | | | | | | | | | | | | | | | | | | (1) Abstract interpreter vnode labeling in execve(2) and mac_execve(2) so that the general exec code isn't aware of the details of allocating, copying, and freeing labels, rather, simply passes in a void pointer to start and stop functions that will be used by the framework. This change will be MFC'd. (2) Introduce a new flags field to the MAC_POLICY_SET(9) interface allowing policies to declare which types of objects require label allocation, initialization, and destruction, and define a set of flags covering various supported object types (MPC_OBJECT_PROC, MPC_OBJECT_VNODE, MPC_OBJECT_INPCB, ...). This change reduces the overhead of compiling the MAC Framework into the kernel if policies aren't loaded, or if policies require labels on only a small number or even no object types. Each time a policy is loaded or unloaded, we recalculate a mask of labeled object types across all policies present in the system. Eliminate MAC_ALWAYS_LABEL_MBUF option as it is no longer required. MFC after: 1 week ((1) only) Reviewed by: csjp Obtained from: TrustedBSD Project Sponsored by: Apple, Inc.
* Provide and consume module dependency information.marius2008-08-232-0/+3
| | | | MFC after: 3 days
* Fix a race condition with concurrent LOOKUP namecache operations for a vnodejhb2008-08-231-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | not in the namecache when shared lookups are enabled (vfs.lookup_shared=1, it is currently off by default) and the filesystem supports shared lookups (e.g. NFS client). Specifically, if multiple concurrent LOOKUPs both miss in the name cache in parallel, each of the lookups may each end up adding an entry to the namecache resulting in duplicate entries in the namecache for the same pathname. A subsequent removal of the mapping of that pathname to that vnode (via remove or rename) would only evict one of the entries from the name cache. As a result, subseqent lookups for that pathname would still return the old vnode. This race was observed with shared lookups over NFS where a file was updated by writing a new file out to a temporary file name and then renaming that temporary file to the "real" file to effect atomic updates of a file. Other processes on the same client that were periodically reading the file would occasionally receive an ESTALE error from open(2) because the VOP_GETATTR() in nfs_open() would receive that error when given the stale vnode. The fix here is to check for duplicates in cache_enter() and just return if an entry for this same directory and leaf file name for this vnode is already in the cache. The check for duplicates is done by walking the per-vnode list of name cache entries. It is expected that this list should be very small in the common case (usually 0 or 1 entries during a cache_enter() since most files only have 1 "leaf" name). Reviewed by: ups, scottl MFC after: 2 months
* - Restore the behavior of enabling the MII buffer for an internalmarius2008-08-231-10/+22
| | | | | | | | | | | | PHY only and not also in the case of an external PHY currently doing full duplex, which accidentally got broken in r172334. It's still not clear to me why we need to enable the buffer for an internal PHY though. - Count excess and late collisions as output errors. [1] - Count receive errors as input errors. [1] Obtained from: NetBSD [1] MFC after: 3 days
* When getaudit(2) is unable to fit the terminal IPv6 address into therwatson2008-08-231-1/+1
| | | | | | | | | | | space provided by its argument structure, return EOVERFLOW instead of E2BIG. The latter is documented in Solaris's man page, but the former is implemented. In either case, the caller should use getaudit_addr(2) to return the IPv6 address. Submitted by: sson Obtained from: Apple, Inc. MFC after: 3 days
* Remove old BSD-style entries from /etc/ttys and increase pts(4) to 512.ed2008-08-237-3584/+1792
| | | | | | | | | Because we now use pts(4)-style PTY's exclusively, there is no use for these entries in /etc/ttys. Right now the pts(4) entries only go from 0 to 255. Because we're going to touch these files anyway, increase the number to 511. Discussed with: philip (ex-mentor)
* Remove clkbrd(4) as a separate device and compile it solely basedmarius2008-08-233-3/+1
| | | | | | | on the presence of fhc(4) instead; we by far don't support all of the functionality provide by the clock board but in general it's an integral part of FireHose-based systems which shouldn't be possible to omit.
* Cache the cred locally in _syncache_add() while holding the locks, sobz2008-08-231-0/+12
| | | | | | | | | | | | | we can be sure that it's valid. In case we abort early free it again else put it into the syncache. We need the cred in the syncache to be able to restrict what will be exportet by the sysctl helper function syncache_pcblist() (to netstat) within jails. PR: kern/126493 Reviewed by: rwatson (earlier versions) MFC after: 3 days
* - Add kbdmux(4); since sunkbd(4) was tought to emulate atkbd(4) likemarius2008-08-231-3/+5
| | | | | | | | ukbd(4) does and that emulation was enabled by default, all three of them work together with kbdmux(4) out of the box just fine. - Fix some whitespace bugs. MFC after: 3 days
* Remove unused tty_gone() checks inside ttyoutq_read_uio().ed2008-08-231-11/+0
| | | | | | | When my earlier MPSAFE TTY prototypes still implemented line disciplines, we needed a mechanism to abort read()'s on PTY master devices when inside the line discipline. Because this is no longer the case, these checks have become unneeded.
* Make stty(1) use tab0 and tab3 to handle tab completion.ed2008-08-233-8/+23
| | | | | | | | | | After the MPSAFE TTY import, we have support for the TAB0 and TAB3 flags to handle tab expansion, while we only used to support OXTABS. Switch stty(1) to use tab0 and tab3 to print whether tab expansion is turned on or off. Implement the oxtabs and tabs switches by setting the appropriate TABx value. Even though POSIX only lists this as being XSI, we'd better follow it.
* If we are unable to obtain a frequency list from either ACPI or the staticjhb2008-08-231-1/+88
| | | | | | | | tables, then attempt to build a simple list containing just the high and low frequencies based on the current CPU frequency calculated during boot and the contents of the MSR. MFC after: 1 month
* Remove unused variable nosleepwithlocks.antoine2008-08-231-7/+0
| | | | | | | PR: 126609 Submitted by: Mateusz Guzik MFC after: 1 month X-MFC: to stable/7 only, this variable is still used in stable/6
* Adjust the handling the various timer frequencies when using the lapicjhb2008-08-232-20/+34
| | | | | | | | | | | | | | | | | | timer. Previously, the various divisors were fixed which meant that while it gave somewhat reasonable stathz, etc. at hz=1000, it went off the rails with any other hz value. With these changes, we now pick a lapic timer hz based on the value of hz. If hz is >= 1500, then the lapic timer runs at hz. If 1500 hz >= 750, we run the lapic timer at hz * 2. If hz < 750, we run at hz * 4. We compute a divider at runtime to make stathz run as close to 128 as we can since stathz really wants to be run at something close to that frequency. Profiling just runs on every clock tick. So some examples: With hz = 100, the lapic timer now runs at 400 instead of 2000. stathz will be 133, and profhz = 400. With hz = 1000 (default), the lapic timer is still at 2000 (as it is now), stathz is at 133 (as it is now), and profhz will be 2000 (previously 666). MFC after: 2 weeks
* Add an explicit comment why we NULLify the two variables.bz2008-08-231-0/+1
| | | | | Reviewed by: rwatson MFC after: 3 days
* Document that devlistp and devcountp are only updated when there's noimp2008-08-231-1/+5
| | | | | error. Bump date.
* Revert bogusly committed file.imp2008-08-231-1/+0
|
* Set devs to 0 in case device_get_children return an error. The right thingimp2008-08-233-0/+4
| | | | to do here is nothing in that case...
* Actually revert last... Upon closer inspection the code works in theimp2008-08-231-2/+1
| | | | face of errors already... A bit unorthodox, but none-the-less valid.
* Handle errors in device_get_children gracefully.imp2008-08-231-1/+2
|
* Handle errors from device_get_chidlren.imp2008-08-231-2/+5
| | | | Free child list when there's more children than we expected.
* Cope with errors from device_get_children(). These errors can happenimp2008-08-231-4/+7
| | | | | | | only in low memory situations, so the error fork of these fixes is lightly tested, but they should do the least-wrong thing... Submitted by: Hans Petter Selasky
* Cosmetic nit.imp2008-08-231-2/+0
|
* Add MIPS support.imp2008-08-231-0/+43
| | | | Reviewed by: jb@
* Allow the MD UMA allocator to use VM routines like kmem_*(). Existing code ↵nwhitehorn2008-08-231-1/+1
| | | | | | requires MD allocator to be available early in the boot process, before the VM is fully available. This defines a new VM define (UMA_MD_SMALL_ALLOC_NEEDS_VM) that allows an MD UMA small allocator to become available at the same time as the default UMA allocator. Approved by: marcel (mentor)
* Instead of passing MNT_UPDATE, MNT_SNAPSHOT, MNT_RELOAD fromrodrigc2008-08-231-2/+3
| | | | | | | | userspace to kernel via nmount(), pass in the strings "update", "snapshot", "reload". We want to move away from passing MNT_ flags from userspace -> kernel via nmount(), and instead favor passing the string options.
* Minor style nits.imp2008-08-231-5/+3
|
* In nmount(), when we see the "force" option,rodrigc2008-08-231-1/+7
| | | | | | | | | | | set the MNT_FORCE flag, but do not persist "force" in the options list, since it is a command, not a persistent property of a mount. Similarly, when we see "reload", set MNT_RELOAD, but delete "reload" from the options list. MFC after: 1 week
* Submit a band-aid for interrupt set up race.kmacy2008-08-221-0/+6
| | | | MFC after: 1 month
* Fix two small bugs in tcsetattr().ed2008-08-221-7/+6
| | | | | | | | | | | | | | | | | | - According to POSIX, tcsetattr() must not fail when any of the bits in the structure are unsupported, but it must leave the unsupported flags alone. - The CIGNORE flag (set by TCSASOFT, extension) was not cleared from c_cflag, which means using it would cause it to be applied during its entire lifespan. Eventually make sure we clear the flag. I don't really like CIGNORE, but I think we must keep it alive right now. With our new TTY layer, we don't actually need this mechanism, because if you leave c_cflag, c_ispeed and c_ospeed alone, we won't make a call into the device driver anyway. Reported by: naddy Tested by: naddy
* Hook back ntp to the build now that I fixed it.roberto2008-08-221-1/+1
| | | | Pointy hat to: me
* Don't try enumerating APICs when running on top of xenkmacy2008-08-221-0/+2
| | | | | | (fixes boot on 64-bit dom0s) MFC after: 1 month
* cosmetic changes and style fixesmarius2008-08-228-45/+61
|
* Add forgotten libopts subdir.roberto2008-08-221-0/+13
| | | | MFC after: 2 weeks
* Avoid misaligned access of struct frame.marius2008-08-221-4/+6
| | | | MFC after: 3 days
* Add a label for myself.jhb2008-08-221-0/+1
|
* Use bus_foo() rather than bus_space_foo() and remove bus handle and tagjhb2008-08-223-33/+28
| | | | from softc.
* Use ppc_detach() for device_detach instead of ppc_attach().jhb2008-08-221-1/+1
| | | | MFC after: 1 week
* Whitespace fix.jhb2008-08-221-1/+1
|
* Remove unused UNITOSOFTC() macro.jhb2008-08-221-2/+0
|
OpenPOWER on IntegriCloud