summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Remove Giant locking from domains list.ed2009-01-041-9/+9
| | | | | | | | | | | | | | During boot, the domain list is locked with Giant. It is not possible to register any protocols after the system has booted, so the lock is only used to protect insertion of entries. There is already a mutex in uipc_domain.c called dom_mtx. Use this mutex to lock the list, instead of using Giant. It won't matter anything with respect to performance, but we'll never get rid of Giant if we don't remove from places where we don't need it. Approved by: rwatson MFC after: 3 weeks
* Remove two further uses (debugging and NULLing) of pr_ousrreq, missed duerwatson2009-01-042-3/+0
| | | | | | to svn commit in the wrong directory. Spotted by: bz
* Remove now-unused pr_ousrreq from struct protosw. It may not have beenrwatson2009-01-041-2/+0
| | | | used since the last millenia.
* Do not incorrectly add the low 5 bits of the offset to the resultingkib2009-01-041-1/+1
| | | | | | | position of the found zero bit. Submitted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 2 weeks
* Back out r186615; the sanitizing of the pointers in the error casebz2009-01-041-2/+0
| | | | | | is not needed and seems that it will not be needed either. Pointy hat: mine, mine, mine and not pho's
* Improve probing.marcel2009-01-041-5/+9
| | | | | | | | | o Don't check the dummy fields. o The entry is unused if either dp_mid is 0 or dp_sid is 0. o The start or end cylinder cannot be 0. o The start CHS cannot be equal to the end CHS. Submitted by: nyan
* Print control characters, even though they are normally not visible.ed2009-01-042-1/+7
| | | | | | | | With cons25, there are printable characters below 0x1B. This is not the case with ASCII, UTF-8, etc. but in this case we just have to. Also don't set LC_CTYPE to UTF-8 when libteken is compiled without UTF-8 in the demo-application.
* Sync with usb4bsd:alfred2009-01-0447-840/+2426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/lib/libusb20/libusb20_desc.c Make "libusb20_desc_foreach()" more readable. src/sys/dev/usb2/controller/*.[ch] src/sys/dev/usb2/core/*.[ch] Implement support for USB power save for all HC's. Implement support for Big-endian EHCI. Move Huawei quirks back into "u3g" driver. Improve device enumeration. src/sys/dev/usb2/ethernet/*[ch] Patches for supporting new AXE Gigabit chipset. src/sys/dev/usb2/serial/*[ch] Fix IOCTL return code. src/sys/dev/usb2/wlan/*[ch] Sync with old USB stack. Submitted by: hps
* Resolve some regressions related to tabs and linewrap handling.ed2009-01-034-2/+34
| | | | | | | | | | | | | | | | | | | | It turns out I was looking too much at mimicing xterm, that I didn't take the differences of cons25 into account. There are some differences between xterm and cons25 that are important. Create a new #define called TEKEN_CONS25 that can be toggled to switch between cons25 and xterm mode. - Don't forget to redraw the cursor after processing a forward/backward tabulation. - Implement cons25-style (WYSE?) autowrapping. This form of autowrapping isn't that nice. It wraps the cursor when printing something on column 80. xterm wraps when printing the first character that doesn't fit. - In cons25, a \t shouldn't overwrite previous contents, while xterm does. Reported by: Garrett Cooper <yanefbsd gmail com>
* Fix the OFW interrupt map parser to use its own idea of the number of interruptnwhitehorn2009-01-038-49/+35
| | | | | | | | | cells in the map, instead of using a value passed to it and then panicing if it disagrees. This fixes interrupt map parsing for PCI bridges on some Apple Uninorth PCI controllers. Reported by: marcel Tested on: G4 iBook, Sun Ultra 5
* Reapply the intpin correction part of r146420 which somehowmarius2009-01-031-0/+7
| | | | got lost.
* Added section type SHT_GNU_HASH. GNU-style .hash section is a newkaiw2009-01-031-0/+1
| | | | | style of hash section with better performace than the original SYSV hash. It can be generated by newer binutils.
* Extend the struct vm_page wire_count to u_int to avoid the overflowkib2009-01-033-6/+14
| | | | | | | | | | | | | | | | of the counter, that may happen when too many sendfile(2) calls are being executed with this vnode [1]. To keep the size of the struct vm_page and offsets of the fields accessed by out-of-tree modules, swap the types and locations of the wire_count and cow fields. Add safety checks to detect cow overflow and force fallback to the normal copy code for zero-copy sockets. [2] Reported by: Anton Yuzhaninov <citrin citrin ru> [1] Suggested by: alc [2] Reviewed by: alc MFC after: 2 weeks
* Allow the IP_MINTTL socket option to be set to 0 so that it can berwatson2009-01-031-1/+1
| | | | | | | | | disabled entirely, which is its default state before set to a non-zero value. PR: 128790 Submitted by: Nick Hilliard <nick at foobar dot org> MFC after: 3 weeks
* Call pcn_start_locked() instead of pcn_start() where the softc lock isbrueffer2009-01-031-1/+1
| | | | | | | already held. Approved by: rwatson (mentor) MFC after: 3 weeks
* Some modules such as SCTP supplies a valid route entry as an input argumentqingli2009-01-032-37/+17
| | | | | | | | | | | | | | | to ip_output(). The destionation is represented in a sockaddr{} object that may contain other pieces of information, e.g., port number. This same destination sockaddr{} object may be passed into L2 code, which could be used to create a L2 entry. Since there exists a L2 table per address family, the L2 lookup function can make address family specific comparison instead of the generic bcmp() operation over the entire sockaddr{} structure. Note in the IPv6 case the sin6_scope_id is not compared because the address is currently stored in the embedded form inside the kernel. The in6_lltable_lookup() has to account for the scope-id if this storage format were to change in the future.
* Fix a corner case in my previous commit.ed2009-01-021-1/+2
| | | | | Even though there are not many setups that have absolutely no console device, make sure a close() on a TTY doesn't dereference a null pointer.
* Don't let /dev/console be revoked if the TTY below is being closed.ed2009-01-021-0/+7
| | | | | | | | | | | During startup some of the syscons TTY's are used to set attributes like the screensaver and mouse options. These actions cause /dev/console to be rendered unusable. Fix the issue by leaving the TTY opened when it is used as the console device. Reported by: imp
* The log message should terminate with a newline insteadqingli2009-01-021-1/+1
| | | | of a tab character.
* Remove an unneeded assertion in libteken.ed2009-01-011-1/+0
| | | | | | The cursor is only inside the scrolling region when we are in origin mode. In that case, it should use originreg instead of scrollreg. It is completely valid to place the cursor outside the scrolling region.
* White space and comment tweaks.rwatson2009-01-011-2/+2
| | | | MFC after: 3 weeks
* Temporary workaround for the limitations of the mbuf flowid field: zerorwatson2009-01-011-0/+2
| | | | | | the field in the mbuf constructors, since otherwise we have no way to tell if they are valid. In the future, Kip has plans to add a flag specifically to indicate validity, which is the preferred model.
* - Currently the PMAP code is laid out to let the kernel TSB cover themarius2009-01-013-2/+29
| | | | | | | | | | | whole KVA space using one locked 4MB dTLB entry per GB of physical memory. On Cheetah-class machines only the dt16 can hold locked entries though, which would be completely consumed for the kernel TSB on machines with >= 16GB. Therefore limit the KVA space to use no more than half of the lockable dTLB slots, given that we need them also for other things. - Add sanity checks which ensure that we don't exhaust the (lockable) TLB slots.
* Replace syscons terminal renderer by a new renderer that uses libteken.ed2009-01-0124-989/+3117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some time ago I started working on a library called libteken, which is terminal emulator. It does not buffer any screen contents, but only keeps terminal state, such as cursor position, attributes, etc. It should implement all escape sequences that are implemented by the cons25 terminal emulator, but also a fair amount of sequences that are present in VT100 and xterm. A lot of random notes, which could be of interest to users/developers: - Even though I'm leaving the terminal type set to `cons25', users can do experiments with placing `xterm-color' in /etc/ttys. Because we only implement a subset of features of xterm, this may cause artifacts. We should consider extending libteken, because in my opinion xterm is the way to go. Some missing features: - Keypad application mode (DECKPAM) - Character sets (SCS) - libteken is filled with a fair amount of assertions, but unfortunately we cannot go into the debugger anymore if we fail them. I've done development of this library almost entirely in userspace. In sys/dev/syscons/teken there are two applications that can be helpful when debugging the code: - teken_demo: a terminal emulator that can be started from a regular xterm that emulates a terminal using libteken. This application can be very useful to debug any rendering issues. - teken_stress: a stress testing application that emulates random terminal output. libteken has literally survived multiple terabytes of random input. - libteken also includes support for UTF-8, but unfortunately our input layer and font renderer don't support this. If users want to experiment with UTF-8 support, they can enable `TEKEN_UTF8' in teken.h. If you recompile your kernel or the teken_demo application, you can hold some nice experiments. - I've left PC98 the way it is right now. The PC98 platform has a custom syscons renderer, which supports some form of localised input. Maybe we should port PC98 to libteken by the time syscons supports UTF-8? - I've removed the `dumb' terminal emulator. It has been broken for years. It hasn't survived the `struct proc' -> `struct thread' conversion. - To prevent confusion among people that want to hack on libteken: unlike syscons, the state machines that parse the escape sequences are machine generated. This means that if you want to add new escape sequences, you have to add an entry to the `sequences' file. This will cause new entries to be added to `teken_state.h'. - Any rendering artifacts that didn't occur prior to this commit are by accident. They should be reported to me, so I can fix them. Discussed on: current@, hackers@ Discussed with: philip (at 25C3)
* Back out a non-style(9) change from r186668 to unbreak the kernels.bz2009-01-011-1/+1
|
* style(9)obrien2009-01-011-1/+1
| | | | Verfied with: svn diff -x -Bbw file.h showing empty diff
* style(9)obrien2009-01-012-12/+11
| | | | Differences from 'svn diff -x -Bbw' are trivially verifiable as only style(9).
* style(9)obrien2009-01-012-22/+22
| | | | Verified with: svn diff -x -Bbw elf_generic.h elf64.h
* style(9)obrien2009-01-011-315/+315
| | | | Verified with: svn diff -x -Bbw elf_common.h
* Resurrect shared map locks allowing greater concurrency during some mapalc2009-01-012-11/+84
| | | | | | | | | | operations, such as page faults. An earlier version of this change was ... Reviewed by: kib Tested by: pho MFC after: 6 weeks
* Don't clobber sysctl_root()'s error number.ed2009-01-011-2/+5
| | | | | | | When sysctl() is being called with a buffer that is too small, it will return ENOMEM. Unfortunately the changes I made the other day sets the error number to 0, because it just returns the error number of the copyout(). Revert this part of the change.
* Fix white space botch: use carriage returns rather than tabs.rwatson2008-12-311-1/+2
|
* mark discovered neighbors QoS capable if they advertise wmesam2008-12-311-0/+4
|
* follow prevailing stylesam2008-12-313-3/+3
|
* add some USB scanner IDs for recent Epson multifunction devices.luigi2008-12-312-6/+27
| | | | | | | | | Add support to uscanner.c for known-working devices (the same should be done for uscanner2.c). Waiting for 7.1 to be released before the merge. MFC after: 3 weeks
* Commit two files missed in previous commit: hook up audit_bsm_errno.crwatson2008-12-312-2/+5
| | | | | | | and adapt for kernel build environment. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc.
* Call au_errno_to_bsm() on the errno value passed into au_to_return32()rwatson2008-12-311-1/+1
| | | | | | to convert local FreeBSD error numbers into BSM error numbers. Obtained from: TrustedBSD Project
* Merge OpenBSM alpha 4 from OpenBSM vendor branch to head, bothrwatson2008-12-317-99/+1100
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contrib/openbsm (svn merge) and src/sys/{bsm,security/audit} (manual merge). Add libauditd build parts and add to auditd's linkage; force libbsm to build before libauditd. OpenBSM history for imported revisions below for reference. MFC after: 1 month Sponsored by: Apple Inc. Obtained from: TrustedBSD Project OpenBSM 1.1 alpha 4 - With the addition of BSM error number mapping, we also need to map the local error number passed to audit_submit(3) to a BSM error number, rather than have the caller perform that conversion. - Reallocate user audit events to avoid collisions with Solaris; adopt a more formal allocation scheme, and add some events allocated in Solaris that will be of immediate use on other platforms. - Add an event for Calife. - Add au_strerror(3), which allows generating strings for BSM errors directly, rather than requiring applications to map to the local error space, which might not be able to entirely represent the BSM error number space. - Major auditd rewrite for launchd(8) support. Add libauditd library that is shared between launchd and auditd. - Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for (re)starting auditing under launchd(8) on Mac OS X. - Add 'current' symlink to active audit trail. - Add crash recovery of previous audit trail file when detected on audit startup that it has not been properly terminated. - Add the event AUE_audit_recovery to indicated when an audit trail file has been recovered from not being properly terminated. This event is stored in the new audit trail file and includes the path of recovered audit trail file. - Mac OS X and FreeBSD dependent code in auditd.c is separated into auditd_darwin.c and auditd_fbsd.c files. - Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system calls. - For Mac OS X, we use ASL(3) instead of syslog(3) for logging. - Add support for NOTICE level logging. OpenBSM 1.1 alpha 3 - Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map between BSM error numbers (largely the Solaris definitions) and local errno(2) values for 32-bit and 64-bit return tokens. This is required as operating systems don't agree on some of the values of more recent error numbers. - Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the total size for the token. This buge. - Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed.
| * Vendor import of OpenBSM 1.1 alpha4, which incorporates the followingrwatson2008-12-288-33/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes since the last imported OpenBSM release: OpenBSM 1.1 alpha 4 - With the addition of BSM error number mapping, we also need to map the local error number passed to audit_submit(3) to a BSM error number, rather than have the caller perform that conversion. - Reallocate user audit events to avoid collisions with Solaris; adopt a more formal allocation scheme, and add some events allocated in Solaris that will be of immediate use on other platforms. - Add an event for Calife. - Add au_strerror(3), which allows generating strings for BSM errors directly, rather than requiring applications to map to the local error space, which might not be able to entirely represent the BSM error number space. - Major auditd rewrite for launchd(8) support. Add libauditd library that is shared between launchd and auditd. - Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for (re)starting auditing under launchd(8) on Mac OS X. - Add 'current' symlink to active audit trail. - Add crash recovery of previous audit trail file when detected on audit startup that it has not been properly terminated. - Add the event AUE_audit_recovery to indicated when an audit trail file has been recovered from not being properly terminated. This event is stored in the new audit trail file and includes the path of recovered audit trail file. - Mac OS X and FreeBSD dependent code in auditd.c is separated into auditd_darwin.c and auditd_fbsd.c files. - Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system calls. - For Mac OS X, we use ASL(3) instead of syslog(3) for logging. - Add support for NOTICE level logging. OpenBSM 1.1 alpha 3 - Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map between BSM error numbers (largely the Solaris definitions) and local errno(2) values for 32-bit and 64-bit return tokens. This is required as operating systems don't agree on some of the values of more recent error numbers. - Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the total size for the token. This bug resulted in "unknown" tokens being printed after the exec args/env tokens. - Support for AUT_SOCKET_EX extended socket tokens, which describe a socket using a pair of IPv4/IPv6 and port tuples. - OpenBSM BSM file header version bumped for 1.1 release. - Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed. Obtained from: TrustedBSD Project Sponsored by: Apple Inc.
* | When no driver attaches to a card, don't power down the card. We canimp2008-12-311-1/+2
| | | | | | | | | | | | now read config registers of cardbus cards that are inserted, but aren't attached to a driver. Also, add a power related comment...
* | First pass at 64-bit elf supportimp2008-12-311-0/+117
| |
* | Update or eliminate some stale comments.alc2008-12-312-12/+5
| |
* | Document the relationship between enum VM_GUEST and the vm_guest_sysctl_namesivoras2008-12-301-1/+3
| | | | | | | | | | | | array. Approved by: gnn (original version)
* | Avoid an unnecessary memory dereference in vm_map_entry_splay().alc2008-12-301-3/+4
| |
* | Add a VOP_VPTOCNP implementation for pseudofs which covers file systemsmarcus2008-12-301-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | such as procfs and linprocfs. This implementation's locking was enhanced by kib. Reviewed by: kib des Approved by: des kib Tested by: pho
* | Style change to vm_map_lookup(): Eliminate a macro of dubious value.alc2008-12-301-11/+8
| |
* | Added missing second part of cleaning j->ip[46] as requested by bzpho2008-12-301-0/+2
| | | | | | | | | | Approved by: kib (mentor) Pointy hat: pho
* | Disable USB bluetooth (needs netgraph built in) and USB audio (doesn'trpaulo2008-12-301-3/+3
| | | | | | | | compile).
* | Disable USB bluetooth (needs netgraph built in) and USB audio (doesn'trpaulo2008-12-301-3/+3
| | | | | | | | compile).
* | Move the implementation of the vm map's fast path on address lookup fromalc2008-12-301-34/+23
| | | | | | | | | | | | | | vm_map_lookup{,_locked}() to vm_map_lookup_entry(). Having the fast path in vm_map_lookup{,_locked}() limits its benefits to page faults. Moving it to vm_map_lookup_entry() extends its benefits to other operations on the vm map.
OpenPOWER on IntegriCloud