summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Merged from sys/dev/sio/sio.c revisions 1.415 and 1.416.bde2003-11-172-20/+26
| | | | | Approved by: nyan (Blanket approval for simple changes in sio.)
* Overhaul the entropy device:markm2003-11-175-123/+101
| | | | | | | | | | | | | | | | | | o Each source gets its own queue, which is a FIFO, not a ring buffer. The FIFOs are implemented with the sys/queue.h macros. The separation is so that a low entropy/high rate source can't swamp the harvester with low-grade entropy and destroy the reseeds. o Each FIFO is limited to 256 (set as a macro, so adjustable) events queueable. Full FIFOs are ignored by the harvester. This is to prevent memory wastage, and helps to keep the kernel thread CPU usage within reasonable limits. o There is no need to break up the event harvesting into ${burst} sized chunks, so retire that feature. o Break the device away from its roots with the memory device, and allow it to get its major number automagically.
* Add a sysctl, security.bsd.see_other_gids, similar in semanticsrwatson2003-11-171-2/+51
| | | | | | | to see_other_uids but with the logical conversion. This is based on (but not identical to) the patch submitted by Samy Al Bahra. Submitted by: Samy Al Bahra <samy@kerneled.com>
* In rip_abort(), unlock the inpcb if we didn't detach it, or we maycognet2003-11-171-0/+2
| | | | | | recurse on the lock before destroying the mutex. Submitted by: sam
* move rate control change messages under ath_debugsam2003-11-171-2/+2
|
* Fixed two memory leaks.ru2003-11-171-1/+3
| | | | Reviewed by: harti
* Check the correct set of interface flags and fix a memory leak.ru2003-11-171-1/+2
| | | | Reviewed by: harti
* o fix WEP use in hostap mode; need to reset the pointer to thesam2003-11-171-1/+2
| | | | 802.11 packet header after stripping the WEP header on input
* on a beacon miss try to reassociate before starting a scansam2003-11-171-2/+9
| | | | Submitted by: Henry Qian
* Add a MAC check for VOP_LOOKUP() in the Linux getwcd() implementation.rwatson2003-11-171-1/+5
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* - Change the i386's sf_buf implementation so that it never allocatesalc2003-11-172-27/+50
| | | | | | | | | | | | | | | more than one sf_buf for one vm_page. To accomplish this, we add a global hash table mapping vm_pages to sf_bufs and a reference count to each sf_buf. (This is similar to the patches for RELENG_4 at http://www.cs.princeton.edu/~yruan/debox/.) For the uninitiated, an sf_buf is nothing more than a kernel virtual address that is used for temporary virtual-to-physical mappings by sendfile(2) and zero-copy sockets. As such, there is no reason for one vm_page to have several sf_bufs mapping it. In fact, using more than one sf_buf for a single vm_page increases the likelihood that sendfile(2) blocks, hurting throughput. (See http://www.cs.princeton.edu/~yruan/debox/.)
* Add SMP changes as should have been committed as rev 1.28peter2003-11-171-26/+7
|
* Restore file accidently killed in the crossfire from the smp commit.peter2003-11-171-0/+152
|
* Initial landing of SMP support for FreeBSD/amd64.peter2003-11-1750-2298/+1113
| | | | | | | | | | | | | | | | - This is heavily derived from John Baldwin's apic/pci cleanup on i386. - I have completely rewritten or drastically cleaned up some other parts. (in particular, bootstrap) - This is still a WIP. It seems that there are some highly bogus bioses on nVidia nForce3-150 boards. I can't stress how broken these boards are. I have a workaround in mind, but right now the Asus SK8N is broken. The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed. - Most of my testing has been with SCHED_ULE. SCHED_4BSD works. - the apic and acpi components are 'standard'. - If you have an nVidia nForce3-150 board, you are stuck with 'device atpic' in addition, because they somehow managed to forget to connect the 8254 timer to the apic, even though its in the same silicon! ARGH! This directly violates the ACPI spec.
* - Mark ksq_assigned as volatile so that when this code is used withoutjeff2003-11-171-3/+3
| | | | sched_lock we can be sure that we'll pick up the new value.
* - Remove long dead code. rslices hasn't been used in some time and neitherjeff2003-11-171-52/+4
| | | | has sched_pickcpu().
* correct to look right interface.ume2003-11-171-1/+1
|
* Oh, how embarresing. I broke my own platform. :-)peter2003-11-171-4/+4
|
* Tweaked the siointr1() so that it works better at 921600 bps, especiallybde2003-11-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | with multiple ports on a shared interrupt demultiplexed by the puc_intr() handler. siointr1() first read as much input as possible and then checked all possibly-relevant status registers, partly for robustness and partly for historical reasons. This is very bad if it is called for every port sharing an interrupt like puc_intr() does. It can spend too long reading all the input for some ports when the interrupt is for a more urgent event on another, or just too long checking all the status registers when there are lots of ports. The inter-character time is too long for reading all the input even when the interrupt is for a transmitter interrupt on the same port, and at 921600 bps the inter-char time is 10.85 usec and was often exceeded with just 2 ports, leaving the transmitters idle for about 6% of the time. The tweak is to break out of the read loop after reading 1 char if output can be done. This avoids most of the idle transmitter time for 2 active ports at 921600 bps bidirectional on the test system. It also reduces overhead by about 20%. More complete fixes use the programmable tx low watermark on 16950's and reduce overhead by another 65%.
* Widen the enable/disable helper function's argument in line with thepeter2003-11-1715-67/+45
| | | | ithread_create() changes etc. This should be mostly a NOP.
* Expand the argument to the ithread enable/disable helper hooks from anpeter2003-11-172-9/+9
| | | | int to something big enough to hold a pointer. amd64 needs this.
* Ignore errors on ln. This is a quick fix for the make depend twice inimp2003-11-171-1/+1
| | | | | a row being broken. A better filx will come as soon as I have time to analyse things more deeply.
* Fixed pedantic warnings for statement-expressions using __extension__bde2003-11-172-8/+8
| | | | | and by not using a statement-expression for the non-expression __PCPU_SET().
* Copy ukbdmap.h rules from .i386.imp2003-11-171-0/+6
| | | | | | # maybe this should be in files. # This may fix sparc64 tinderbox. I'll kinow in a few hours.
* Fixed a pedantic syntax error (a stray semicolon at the end ofbde2003-11-173-3/+3
| | | | PCPU_MD_FIELDS).
* Fix a few cases where MT_TAG-type "fake mbufs" are created on the stack, butgreen2003-11-172-0/+3
| | | | | | | | | do not have mh_nextpkt initialized. Somtimes what's there is "1", and the ip_input() code pukes trying to m_free() it, rendering divert sockets and such broken. This really underscores the need to get rid of MT_TAG. Reviewed by: rwatson
* Fixed pedantic syntax errors. Many macros didn't permit a semicolon afterbde2003-11-171-3/+6
| | | | | their invocation in the !KLD_MODULE case, but a semicolon is provided after all invocations and is required in the KLD_MODULE case.
* Avoid a warning for compiling with `gcc -Wbad-function cast'. (Thisbde2003-11-171-1/+5
| | | | | | is the warning that points to the bug in `(char *)malloc(...)' where malloc() is implicitly declared as returning int. We do similar things here, but they work because u_int is the same as uintptr_t on i386's.)
* Don't implement mpo_destroy() for Biba, LOMAC, and MLS, as theyrwatson2003-11-173-21/+0
| | | | | | | aren't allowed to be unloaded. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Update a comment about needing to fix NFS server credential userwatson2003-11-171-1/+1
| | | | | by 5.0-RELEASE: make it now read 5.3-RELEASE to be realistic. Still needs fixing...
* - Remove unnecessary synchronization from sf_buf_init(). (There is onlyalc2003-11-167-14/+0
| | | | one active CPU when sf_buf_init() is performed.)
* Implement sockets support for __mac_get_fd() and __mac_set_fd()rwatson2003-11-1612-7/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | system calls, and prefer these calls over getsockopt()/setsockopt() for ABI reasons. When addressing UNIX domain sockets, these calls retrieve and modify the socket label, not the label of the rendezvous vnode. - Create mac_copy_socket_label() entry point based on mac_copy_pipe_label() entry point, intended to copy the socket label into temporary storage that doesn't require a socket lock to be held (currently Giant). - Implement mac_copy_socket_label() for various policies. - Expose socket label allocation, free, internalize, externalize entry points as non-static from mac_net.c. - Use mac_socket_label_set() in __mac_set_fd(). MAC-aware applications may now use mac_get_fd(), mac_set_fd(), and mac_get_peer() to retrieve and set various socket labels without directly invoking the getsockopt() interface. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Don't waste so much space for the latency debugging buffer. Its sizebde2003-11-161-10/+8
| | | | | | | | | | | | will now need editing except for spot checks. Changed this buffer from a circular one to a linear one. This is more useful for some cases and the sysctl that prints it doesn't support circular buffers. Fixed (output) formatting bugs in this sysctl. An off by 1 error caused a garbage byte to be returned after annotation of large deltas, and a race with the writer sometimes caused premature string termination.
* Gross kludge:imp2003-11-161-0/+8
| | | | | | | | | | | o when compiling lint, undefine certain things and redefine them so that the driver doesn't #error out. Since lint kernels aren't supposed to be bootable, I'm no troubled by this breakage. This fixes the tinderbox Suggested by: rwatson Approved by: bms
* Fix build on alphakris2003-11-161-0/+1
| | | | Pointy hat to: alfred
* Implement mac_get_peer(3) using getsockopt() with SOL_SOCKET andrwatson2003-11-162-0/+2
| | | | | | | | | | | | | | | | | | SO_PEERLABEL. This provides an interface to query the label of a socket peer without embedding implementation details of mac_t in the application. Previously, sizeof(*mac_t) had to be specified by an application when performing getsockopt(). Document mac_get_peer(3), and expand documentation of the other mac_get(3) functions. Note that it's possible to get EINVAL back from mac_get_fd(3) when pointing it at an inappropriate object. NOTE: mac_get_fd() and mac_set_fd() support for sockets will follow shortly, so the documentation is slightly ahead of the code. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Abstract the label checking and setting logic fromrwatson2003-11-162-13/+24
| | | | | | | | mac_setsockopt_label() into mac_socket_label_set(); make it non-static so that it can be invoked from kern_mac.c for mac_set_fd(). Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Implement mpo_copy_{mbuf,pipe,vnode}_label() entry points forrwatson2003-11-162-0/+36
| | | | | | | mac_stub and mac_test. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Reduce gratuitous redundancy and length in function names:rwatson2003-11-164-18/+14
| | | | | | | | | mac_setsockopt_label_set() -> mac_setsockopt_label() mac_getsockopt_label_get() -> mac_getsockopt_label() mac_getsockopt_peerlabel_get() -> mac_getsockopt_peerlabel() Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.phk2003-11-162-2/+2
| | | | | | | | | | While we end up the same place, we end up with two different CS register values after the jump and 0xf000 is compatible with the hardware reset value. This makes a difference if the BIOS does a near jump before a far jump. Detective work and patch by: Adrian Steinmann <ast@marabu.ch>
* Pull latest changes from OpenBSD:sobomax2003-11-166-4/+194
| | | | | | | | | | | - improve sysinfo(2) syscall; - add dummy fadvise64(2) syscall; - add dummy *xattr(2) family of syscalls; - add protos for the syscalls 222-225, 238-249 and 253-267; - add exit_group(2) syscall, which is currently just wired to exit(2). Obtained from: OpenBSD MFC after: 2 weeks
* Restored the call to schedsofttty() (now spelled swi_sched(...)) again.bde2003-11-163-42/+57
| | | | | | | | Its restoration in rev.1.102 was mistranslated to the equivalent of setsofttty() in rev.1.105. This increased overheads by causing a context switch to the SWI handler after almost every interrupt. The increase was approx. 50% on a Celeron 366 (from 23 usec to 34 usec per interrupt).
* Fix comment typo.akiyama2003-11-161-1/+1
| | | | Noticed by: simon
* Make two casts correct for all types of 64bit platforms.andre2003-11-161-2/+2
| | | | Explained by: bde
* Make interrupt pipe interval time configurable.akiyama2003-11-165-4/+66
| | | | | | | - Add kernel options: {UPLCOM,UVSCOM}_INTR_INTERVAL - Add sysctl variables: 'hw.usb.{uplcom,uvscom}.interval' MFC after: 1 week
* Apply some fixups in the driver_t's.akiyama2003-11-162-2/+2
| | | | MFC after: 1 week
* Regen.akiyama2003-11-162-2/+41
|
* Add vendor IDs, and device IDs supported by uplcom(4).akiyama2003-11-162-0/+15
| | | | | | | | | | | - SOURCENEXT Corp. KeikaiDenwa 8 [1] - SOUECENEXT Corp. KeikaiDenwa 8 with charger [2] - HAL Corp. Crossam2+USB [3] Submitted by: [1] Ryo ONODERA <ryo3327@netscape.net> [2] Masaki Mizutani <m-saki@rr.iij4u.or.jp> [3] FUJISHIMA Satsuki <sf@FreeBSD.org> MFC after: 1 week
* Add missing ioctl functions.akiyama2003-11-161-4/+19
| | | | MFC after: 1 week
* As mentioned by warner, previous revision (opt_ddb.h) was just a fluke --green2003-11-161-3/+1
| | | | | | I'm having bad luck with different parts of the sys tree being checked out at slightly different times. Back it out, noting it doesn't cause harm in any case. Tinderbox also makes these things more fun.
OpenPOWER on IntegriCloud