summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Allow a single read(2) system call on an audit pipe to retrieve data fromrwatson2008-11-011-40/+32
| | | | | | | more than one audit record at a time in order to improve efficiency. MFC after: 2 months Sponsored by: Apple, Inc.
* Correct the documented declaration of the archive_write_callback tokientzle2008-11-011-2/+2
| | | | | | | | match the code. PR: docs/128089 Submitted by: Mel MFC after: 3 days
* Remove obsolete pseudocode from VOP_ACCESS.9, replacing it with somethingtrasz2008-11-011-37/+4
| | | | | | closer to reality. Approved by: rwatson (mentor)
* Fix a few typos/spelling errors in my comments from the last commit,imp2008-11-011-7/+7
| | | | | | plus a few others that had lingered in this driver... Submitted by: "b." bf2006a att yahoo KIBO com
* - Add one more supported adapter (1)brueffer2008-11-011-4/+5
| | | | | | - Fix a couple of typos Submitted by: Horvath Andras (1)
* Clamp the values of t_column to 5 digits in `pstat -t' and `show all ttys'.ed2008-11-012-2/+2
| | | | | | | | We often run into these very high column numbers when we run curses applications, because they don't print any newlines. This messes up the table output of `pstat -t'. If these numbers get really high, they aren't of any use to the reader anyway. Convert them to `99999' when they run out of bounds.
* Reimplement the /dev/console device node.ed2008-11-014-245/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the pieces of code that I had left alone during the development of the MPSAFE TTY layer, was tty_cons.c. This file actually has two different functions: - It contains low-level console input/output routines (cnputc(), etc). - It creates /dev/console and wraps all its cdevsw calls to the appropriate TTY. This commit reimplements the second set of functions by moving it directly into the TTY layer. /dev/console is now a character device node that's basically a regular TTY, but does a lookup of `si_drv1' each time you open it. d_write has also been changed to call log_console(). d_close() is not present, because we must make sure we don't revoke the TTY after writing a log message to it. Even though I'm not convinced this is in line with the future directions of our console code, it is a good move for now. It removes recursive locking from the top half of the TTY layer. The previous implementation called into the TTY layer with Giant held. I'm renaming tty_cons.c to kern_cons.c now. The code hardly contains any TTY related bits, so we'd better give it a less misleading name. Tested by: Andrzej Tobola <ato iem pw edu pl>, Carlos A.M. dos Santos <unixmania gmail com>, Eygene Ryabinkin <rea-fbsd codelabs ru>
* Allow a read() on /dev/ams[0-9] to be interrupted.ed2008-11-011-1/+6
| | | | | | | | | | Right now ams_read() uses cv_wait() to wait for new data to arrive on the mouse device. This means that when you run `cat /dev/ams0', it cannot be interrupted directly. After you press ^C, you first need to move the mouse before cat will quit. Make this function use cv_wait_sig(), which allows it to be interrupted directly. Reviewed by: nwhitehorn
* o OpenBSD 4.4 added.maxim2008-11-011-0/+2
|
* Add RL_TWISTER_ENABLE.imp2008-11-011-0/+1
|
* Add RL_TWISTER_ENABLE option. This enables the magic bits to do longimp2008-10-314-3/+169
| | | | | | | | | cable tuning. This has helped in some installations for hardware deployed by a former employer. Made optional because the lists aren't full of complaints about these cards... even when they were wildly popular. Reviewed by: attilio@, jhb@, trhodes@ (all an older version of the patch)
* In example use of err(3) and errx(3), use sysexits(3) constants.rwatson2008-10-311-4/+5
| | | | | MFC after: 3 days Submitted by: Bruce Cran <bruce at cran dot org dot uk>
* Since there is no longer the opportunity for record truncation, justrwatson2008-10-311-2/+1
| | | | | | | return 0 if the truncation counter is queried on an audit pipe. MFC after: 2 months Sponsored by: Apple, Inc.
* In style(9) examples of err() and errx(), use sysexits(3) errors ratherrwatson2008-10-311-2/+2
| | | | | | | than returning 1. Submitted by: Bruce Cran <bruce at cran dot org dot uk> MFC after: 3 days
* Historically, /dev/auditpipe has allows only whole records to be read viarwatson2008-10-311-58/+86
| | | | | | | | | | | | | | | | | | | | | read(2), which meant that records longer than the buffer passed to read(2) were dropped. Instead take the approach of allowing partial reads to be continued across multiple system calls more in the style of streaming character device. This means retaining a record on the per-pipe queue in a partially read state, so maintain a current offset into the record. Keep the record on the queue during a read, so add a new lock, ap_sx, to serialize removal of records from the queue by either read(2) or ioctl(2) requesting a pipe flush. Modify the kqueue handler to return bytes left in the current record rather than simply the size of the current record. It is now possible to use praudit, which used the standard FILE * buffer sizes, to track much larger record sizes from /dev/auditpipe, such as very long command lines to execve(2). MFC after: 2 months Sponsored by: Apple, Inc.
* The code in linux_proc_exit() contains a race when multiple linux basedkib2008-10-311-3/+3
| | | | | | | | | | | | | processes exits at the same time. The linux_emuldata structure is freed but p->p_emuldata is left as a dangling pointer to the just freed memory. The check for W_EXIT in the loop scanning the child processes isn't safe since the state of the child process can change right afterwards. Lock the process and check the W_EXIT before delivering signal. Submitted by: tegge Reviewed by: davidxu MFC after: 1 week
* The file was inadvertently excluded from r184499.kib2008-10-311-1/+1
|
* Revert r184136. Instead, push the check for crashdumpmap overflow into thekib2008-10-314-4/+4
| | | | | | | | MD i386 and amd64 dump code. Requested by: jhb Retested by: pho MFC after: 3 days (+ 176304 + 184136)
* Add three extra to the kinfo_proc_vmmap data. kve_offset - the offsetpeter2008-10-312-1/+14
| | | | | | within an object that a mapping refers to. fileid and fsid are inode/dev for vnodes. (Linux procfs has these and valgrind is really unhappy without them.) I believe I didn't change the size of the struct.
* Modify our boot block to pick an output device, without which boot1 will failnwhitehorn2008-10-312-0/+5
| | | | | | on G4 machines. On the assumption that most people using FreeBSD on Apple hardware are not using serial consoles, set boot1's output to screen. This should be revisited. While here, reduce verbosity of boot1.
* When we drop an audit record going to and audit pipe because the auditrwatson2008-10-301-13/+9
| | | | | | | | | | | pipe has overflowed, drop the newest, rather than oldest, record. This makes overflow drop behavior consistent with memory allocation failure leading to drop, avoids touching the consumer end of the queue from a producer, and lowers the CPU overhead of dropping a record by dropping before memory allocation and copying. Obtained from: Apple, Inc. MFC after: 2 months
* Break out single audit_pipe_mtx into two types of locks: a global rwlockrwatson2008-10-301-83/+127
| | | | | | | | | | | | | | | | | | protecting the list of audit pipes, and a per-pipe mutex protecting the queue. Likewise, replace the single global condition variable used to signal delivery of a record to one or more pipes, and add a per-pipe condition variable to avoid spurious wakeups when event subscriptions differ across multiple pipes. This slightly increases the cost of delivering to audit pipes, but should reduce lock contention in the presence of multiple readers as only the per-pipe lock is required to read from a pipe, as well as avoid overheading when different pipes are used in different ways. MFC after: 2 months Sponsored by: Apple, Inc.
* Make it possible to compile kernel with KTR but without DDB.sobomax2008-10-302-2/+6
|
* Fix compilation in the case when kernel doesn't have KDB ebabled.sobomax2008-10-301-0/+7
| | | | subr_kdb.c still references breakpoint() in this case.
* ifconfig(8) can take only one interface at a time.pjd2008-10-301-1/+3
|
* When running a "chio return" operation using a physical source unitjoerg2008-10-301-4/+6
| | | | | | | | | | | | rather than a voltag name, do not set the CESR_VOLTAGS flags in the CHIOGSTATUS command requesting the current status. As voltags are an optional feature that must be handled as "reserved" by media changers not implementing the feature, always setting CESR_VOLTAGS resulted in the command being aborted with an `Invalid field in CDB', and consequently the "chio return" failed, for media changers that do not support voltags. MFC after: 1 week
* Add quirk to set GPIO2 to enable internal speaker on Dell Vostro 1400.mav2008-10-301-1/+4
| | | | Tested by: Sergio Veloso
* Protect the event->class lookup database using an rwlock instead of arwatson2008-10-301-8/+15
| | | | | | | | mutex, as it's rarely changed but frequently accessed read-only from multiple threads, so a potentially significant source of contention. MFC after: 1 month Sponsored by: Apple, Inc.
* Fix checks for fast frames negotiation. ni_ath_flags holds thesam2008-10-305-5/+5
| | | | | | | | | | | | | | capabilities reported by the ap. These need to be cross-checked against the local configuration in the vap. Previously we were only checking the ap capabilities which meant that if an ap reported it was ff-capable but we were not setup to use them we'd try to do ff aggregation and drop the frame. There are a number of problems to be fixed here but applying this fix immediately as the problem causes all traffic to stop (and has not workaround). Reported by: Ashish Shukla
* Don't hang if encrypting/decrypting using struct iovecs where one of thedfr2008-10-301-0/+4
| | | | iovecs ends on a crypto block boundary.
* Fix some possible infinite loops in the ADB code, and remove some hacksnwhitehorn2008-10-304-28/+42
| | | | | that were inserted in desperation during bring-up. In addition, move ADB bus enumeration and child attachment to when interrupts are available.
* Teach cat(1) and cp(1) to use a larger buffer if enough memory is presentivoras2008-10-302-4/+50
| | | | | | | | | | | | | | | | | | | | | in the system. A simple heuristics is used to detect what is "enough" memory: if number of physmem pages is greater than 32k (equalling 128 MB on machines with 4 kB pages). Typical immediate result of these changes is reduction in context switches and the goal is to increase efficiency by using large buffers: before: /usr/bin/time -hlp cat file1 > file2 ... 163 voluntary context switches 11194 involuntary context switches after: /usr/bin/time -hlp ./cat file1 > file2 ... 417 voluntary context switches 272 involuntary context switches Reviewed by: hackers@ (no objections to earlier version of cat patch) Approved by: gnn (mentor) MFC after: 4 months
* The V* flags passed using an accmode_t to the access() and open()rwatson2008-10-303-12/+26
| | | | | | | | access control checks in mac_bsdextended are not in the same namespace as the MBI_ flags used in ugidfw policies, so add an explicit conversion routine to get from one to the other. Obtained from: TrustedBSD Project
* We need to print out the device info ourselves on FBSD 6.n_hibma2008-10-301-0/+7
| | | | Submitted by: Thomas Nystrom
* Bugfix: Check the error code for in progress as well, after starting then_hibma2008-10-301-8/+10
| | | | | | transfer. Some changes to improve the debugging experience.
* Return USBD_NORMAL_COMPLETION instead of a hard coded 0.n_hibma2008-10-301-1/+1
|
* Add support for little-endian compilations to this file.marcel2008-10-301-1/+15
|
* - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leavesrafan2008-10-301-0/+4
| | | | | | | | | | | | | one zombie process because it does not do the cleanup. For a long running NIS/YP server, it will have lots of zombie processes on it. Fix that by ignoring the SIGCHLD signal since we don't really care about the exit status in this case. PR: bin/91980 Reported by: Arjan van der Velde <dj_noresult at hotmail.com> Submitted by: Jui-Nan Lin" <jnlin at csie.nctu.edu.tw> Reviewed by: delphij MFC after: 1 month
* Pass a pointer to warn2 so the warn2 == IN_ALL would not be andelphij2008-10-301-1/+1
| | | | always-false condition.
* o unbreak ani stat displaysam2008-10-291-5/+9
| | | | o improve some labels
* Allow card reader bridge driver to report maximum supported transfer size.mav2008-10-296-8/+16
| | | | | | | | | sdhci supports up to 65535 blocks transfers, at91_mci - one block. Enable multiblock operations disabled before to follow at91_mci driver limitations. Reviewed by: imp@
* Misc cleanup.brueffer2008-10-291-11/+16
|
* Explicitly set the shell to /bin/sh when MK_TCSH == no.mp2008-10-291-1/+1
| | | | Not objected to by: sam
* - Add documentation on how to temporarily display the umass devices thatn_hibma2008-10-292-4/+13
| | | | | are automatically hidden by the u3gstub device. - Add a link to the u3g driver man page for u3gstub.
* Introduce a new sysctl, kern.sched.topology_spec, that returns an XMLivoras2008-10-291-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | dump of detected ULE CPU topology. This dump can be used to check the topology detection and for general system information. An example of CPU topology dump is: kern.sched.topology_spec: <groups> <group level="1" cache-level="0"> <cpu count="8" mask="0xff">0, 1, 2, 3, 4, 5, 6, 7</cpu> <flags></flags> <children> <group level="2" cache-level="0"> <cpu count="4" mask="0xf">0, 1, 2, 3</cpu> <flags></flags> </group> <group level="2" cache-level="0"> <cpu count="4" mask="0xf0">4, 5, 6, 7</cpu> <flags></flags> </group> </children> </group> </groups> Reviewed by: jeff Approved by: gnn (mentor)
* If threads limit is exceeded, increase the totoal numberdavidxu2008-10-291-1/+4
| | | | of failures.
* Comment out #define turning on debugging which went in with r184436 andbz2008-10-291-1/+1
| | | | which is also in conf/NOTES and thus defined twice when building LINT.
* Add the device ID for the mass storage device that appears before then_hibma2008-10-292-4/+4
| | | | modem appears to facilitate faster switching to modem mode.
* DBDMA can transfer a maximum of 64K - 1 bytes per descriptor, as the bytenwhitehorn2008-10-281-0/+6
| | | | | | count field is 16 bits. Inform ATA of this fact. Reported by: Marco Trillo
* - Turn off interrupts instead of only entering a critical sectionmarius2008-10-281-14/+10
| | | | | | | | | | | | | | | | | | | | | | while doing the block store workaround so we restore the correct floating-point registers state in case of nested floating-point operations resulting from nested interrupts. This allows the VIS-based block copy/zero functions to be used on machines requiring this workaround. Alternatively, we could take care of saving the floating-point registers here, which would be more inefficiently though and also involves turning off interrupts. - It turns out that the SCZ_PCI_DMA_SYNC register doesn't work like the TOMXMS_PCI_DMA_SYNC_PEND one (but more like the corresponding register in of Hummingbird and Sabre bridges) and writing the INO of the respective device to it causes a Safari bus error. However, due to the Schizo errata I-23, SCZ_PCI_DMA_SYNC can't be used as intended either, so remove consistent DMA syncing for Schzio bridges for now, which means that add-on cards with non-"sun4u compliant" (whatever that means exactly) PCI-PCI-bridges should be avoided until the proper workaround is implemented. [1] Reported by: Michael Moll [1]
OpenPOWER on IntegriCloud