summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Remove a bogus panic. It is possible more than one threads willdavidxu2004-06-181-1/+2
| | | | | | be suspended in thread_suspend_check, after they are resumed, all threads will call thread_single, but only one can be success, others should retry and will exit in thread_suspend_check.
* If thread singler wants to terminate other threads, make sure it includesdavidxu2004-06-181-2/+16
| | | | | | all threads except itself. Obtained from: julian
* Correct merge-o: make sure to unlock symmetrically socket bufferrwatson2004-06-181-2/+2
| | | | | | locks on bluetooth sockets when clearing upcall flags. Submitted by: emax
* Hold SOCK_LOCK(so) while frobbing so_options. Note that while therwatson2004-06-181-1/+4
| | | | | local race is corrected, there's still a global race in sosend() relating to so_options and the SO_DONTROUTE flag.
* Try harder to give new processes a clean initial fpu state. fpu_cleanstatepeter2004-06-181-7/+5
| | | | | | | | | | | | | | | | | wasn't actually clean, it was saving the xmm registers as left over by the bios. fninit() doesn't clear those. In fpudna(), instead of doing a fninit() and forgetting to load the initial mxcsr, do a full fxrstor(&fpu_cleanstate). Otherwise we hand over whatever random values are left in the xmm registers by the last user. I'm not certain of whether this is excessive paranoia or not, but there was an outright bug in neglecting to set the mxcsr value that caused awk to SIGFPE in some case. Especially for Tim Robbins. :-) i386 probably should do something about the mxcsr setings too. Found by: tjr
* If SO_DEBUG is enabled for a TCP socket, and a received segment isbms2004-06-181-2/+11
| | | | | | | | | | | | encapsulated within an IPv6 datagram, do not abuse the 'ipov' pointer when registering trace records. 'ipov' is specific to IPv4, and will therefore be uninitialized. [This fandango is only necessary in the first place because of our host-byte-order IP field pessimization.] PR: kern/60856 Submitted by: Galois Zheng
* Merge some additional leaf node socket buffer locking fromrwatson2004-06-182-19/+53
| | | | | | | | | | | | | | | | | | | | | rwatson_netperf: Introduce conditional locking of the socket buffer in fifofs kqueue filters; KNOTE() will be called holding the socket buffer locks in fifofs, but sometimes the kqueue() system call will poll using the same entry point without holding the socket buffer lock. Introduce conditional locking of the socket buffer in the socket kqueue filters; KNOTE() will be called holding the socket buffer locks in the socket code, but sometimes the kqueue() system call will poll using the same entry points without holding the socket buffer lock. Simplify the logic in sodisconnect() since we no longer need spls. NOTE: To remove conditional locking in the kqueue filters, it would make sense to use a separate kqueue API entry into the socket/fifo code when calling from the kqueue() system call.
* Don't set FIN on a retransmitted segment after a FIN has been sent,bms2004-06-181-1/+1
| | | | | | | | | unless the segment really contains the last of the data for the stream. PR: kern/34619 Obtained from: OpenBSD (tcp_output.c rev 1.47) Noticed by: Joseph Ishac Reviewed by: George Neville-Neil
* Fixed a panic caused by over-optimizing npxdrop() in the non-FXSR case.bde2004-06-181-0/+9
| | | | | | | | | | | | | | | | frstor can trap despite it being a control instruction, since it bogusly checks for pending exceptions in the state that it is overwriting. This used to be a non-problem because frstor was always paired with a previous fnsave, and fnsave does an implicit fninit so any pending exceptions only remain live in the saved state. Now frstor is sometimes paired with npxdrop() and we must do a little more than just forget that the npx was used in npxdrop() to avoid a trap later. This is a non-problem in the FXSR case because fxrstor doesn't do the bogus check. FXSR is part of SSE, and npxdrop() is only in FreeBSD-5.x, so this bug only affected old machines running FreeBSD-5.x. PR: 68058
* Ensure that dst is bzeroed before calling rtalloc_ign(), to avoid possiblebms2004-06-181-0/+1
| | | | | | | | routing table corruption. PR: kern/40563, freebsd4/432 (KAME) Obtained from: NetBSD (in_gif.c rev 1.26.10.1) Requested by: Jean-Luc Richier
* A couple more style(9) nits I should have included in last commitimp2004-06-181-4/+3
|
* Style nits in the prototypesimp2004-06-181-2/+2
|
* Bumb version so apps can detect whether CLOCK_VIRTUAL and CLOCK_PROF arekbyanc2004-06-171-1/+1
| | | | implemented.
* Implement CLOCK_VIRTUAL and CLOCK_PROF for clock_gettime(2) andkbyanc2004-06-171-9/+39
| | | | | | | clock_getres(2). Reviewed by: phk PR: 23304
* Merge additional socket buffer locking from rwatson_netperf:rwatson2004-06-1711-16/+154
| | | | | | | | | | | | | | | | | | | | | | | | | - Lock down low hanging fruit use of sb_flags with socket buffer lock. - Lock down low hanging fruit use of so_state with socket lock. - Lock down low hanging fruit use of so_options. - Lock down low-hanging fruit use of sb_lowwat and sb_hiwat with socket buffer lock. - Annotate situations in which we unlock the socket lock and then grab the receive socket buffer lock, which are currently actually the same lock. Depending on how we want to play our cards, we may want to coallesce these lock uses to reduce overhead. - Convert a if()->panic() into a KASSERT relating to so_state in soaccept(). - Remove a number of splnet()/splx() references. More complex merging of socket and socket buffer locking to follow.
* Up SiI reset wait a bit, some devices got lost.sos2004-06-171-1/+1
|
* Reduce the thaumaturgical level of root filesystem mounts: Instead of usingphk2004-06-172-52/+51
| | | | | | | an otherwise redundant clone routine in geom_disk.c, mount a temporary DEVFS and do a proper lookup. Submitted by: thomas
* Nuke dead code.cognet2004-06-171-92/+1
|
* Nuke bus_space_mmap(), as it does not exist in FreeBSD.cognet2004-06-173-21/+0
|
* Revert last change. If acpi is loaded or compiled into the kernel, itsnjl2004-06-172-2/+2
| | | | | | | devclass will be present even if the driver was disabled by a hint. Using device_get_softc() provides the right info even if it's overkill. Explained by: jhb
* Second half of the dev_t cleanup.phk2004-06-1769-196/+177
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
* Import two fixes from the OpenBSD stable branch:mlaier2004-06-173-19/+16
| | | | | | | | | - prevent an endless loop with route-to lo0, fixes PR 3736 (dhartmei@) - The rule_number parameter for pf_get_pool() needs to be 32 bits, not 8 - this fixes corruption of the address pools with large rulesets. (mcbride@, pb@) Reviewed-by: dhartmei
* Save a couple of bytes for the SIO case.phk2004-06-171-4/+2
|
* Fix another beak.phk2004-06-171-1/+1
| | | | Seen by: pjd
* atapicam(4) is currently off by three orders of magnitude regarding thegreen2004-06-171-2/+2
| | | | | | | | | timeout values in the CAM CCBs. Divide by 1000 to get values in seconds which are what ata(4) timeouts internally use. This does lose granularity, though, and small values can now round down to zero. It's probably worth making all ata(4) timeouts in terms of hz/ticks/milliseconds/something.
* Do not preset PG_BUSY on VM_ALLOC_NOOBJ pages. Such pages are notalc2004-06-173-8/+2
| | | | accessible through an object. Thus, PG_BUSY serves no purpose.
* While setting up a transmit packet disable interupts on the card thenambrisko2004-06-171-0/+6
| | | | | re-enable them after we are done setting up the packet. This seems to fix the MPI350 newer firmware hangs.
* Remove bad cookie vp kernel printf; while it does notify about anrwatson2004-06-171-1/+0
| | | | | interesting event, there's little or nothing the user can do about it.
* Commit pf version 3.5 and link additional files to the kernel build.mlaier2004-06-1615-2388/+4876
| | | | | | | | | | | | Version 3.5 brings: - Atomic commits of ruleset changes (reduce the chance of ending up in an inconsistent state). - A 30% reduction in the size of state table entries. - Source-tracking (limit number of clients and states per client). - Sticky-address (the flexibility of round-robin with the benefits of source-hash). - Significant improvements to interface handling. - and many more ...
* This commit was generated by cvs2svn to compensate for changes in r130610,mlaier2004-06-161-0/+840
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import pf from OpenBSD 3.5 (OPENBSD_3_5_BASE)mlaier2004-06-1611-1417/+4695
| |
| * Import OpenBSD 3.4-stable fixesdhartmei2004-05-023-19/+16
| |
| * Import another fix from the OpenBSD-Stable branch:mlaier2004-04-111-6/+11
| | | | | | | | | | | | | | | | | | | | | | Fix by dhartmei@ and mcbride@ 1.433 Properly m_copyback() modified TCP sequence number after demodulation 1.432 Fix icmp checksum when sequence number modlation is being used. Also fix a daddr vs saddr cut-n-paste error in ICMP error handling. Fixes PR 3724
| * Import two fixes from OpenBSD's stable branch:mlaier2004-03-282-4/+41
| | | | | | | | | | | | | | | | | | | | | | - Fix binat for incoming connections when a netblock (not just a single address) is used for source in the binat rule. closes PR 3535, reported by Karl O.Pinc. ok henning@, cedric@ - Fix a problem related to empty anchor rulesets, which could cause a kernel panic. Approved by: bms(mentor)
* | Prepare for pf 3.5 import:mlaier2004-06-165-62/+3
| | | | | | | | | | | | | | | | | | | | - Remove pflog and pfsync modules. Things will change in such a fashion that there will be one module with pf+pflog that can be loaded into GENERIC without problems (which is what most people want). pfsync is no longer possible as a module. - Add multicast address for in-kernel multicast pfsync protocol. Protocol glue will follow once the import is done. - Add one more mbuf tag
* | o Return ai_batteries as 0xffffffff instead of -1. This is a nop change, butimp2004-06-162-2/+3
| | | | | | | | | | | | | | | | | | placates gcc which seems to like to complain about -1 being assigned to an unsigned value. It is well defined and intended, but since signess bugs are being hunted just change to 0xffffffff. o Mask the lower 8 bits, not the lower 4 bits for the ai_capabilities word. All 8 bits are defined and the 0xf was almost certainly a typo. o Define APM_UNKNOWN to 0xff for emulation layer.
* | Unspam sys/boot, the dev_t commit should not have touched these.phk2004-06-166-8/+8
| | | | | | | | Spotted by: peter
* | My new keyboard can't spell.phk2004-06-161-1/+1
| |
* | Handle dead disks in a somewhat sane way.le2004-06-164-3/+21
| |
* | MFi386: revision 1.1161nyan2004-06-161-1/+1
| |
* | I am not quite sure what broke compiling LINT:mcount.c, but a nestedphk2004-06-161-0/+2
| | | | | | | | include of <sys/queue.h> here solves it.
* | o connect(2): if there is no a route to the destinationmaxim2004-06-161-3/+1
| | | | | | | | | | | | | | | | do not pick up the first local ip address for the source ip address, return ENETUNREACH instead. Submitted by: Gleb Smirnoff Reviewed by: -current (silence)
* | Do the dreaded s/dev_t/struct cdev */phk2004-06-16331-1279/+1290
| | | | | | | | Bump __FreeBSD_version accordingly.
* | Fix build for IPSEC && !INET6bms2004-06-162-6/+12
| | | | | | | | | | PR: kern/66125 Submitted by: Cyrille Lefevre
* | Reverse a patch which has no effect on -CURRENT and should probably bebms2004-06-161-7/+1
| | | | | | | | | | | | | | applied directly to -STABLE. Noticed by: iedowse Pointy hat to: bms
* | In ip_forward(), when calculating the MTU in effect for an IPSEC transportbms2004-06-161-0/+2
| | | | | | | | | | | | | | | | mode tunnel, take the per-route MTU into account, *if* and *only if* it is non-zero (as found in struct rt_metrics/rt_metrics_lite). PR: kern/42727 Obtained from: NetBSD (ip_input.c rev 1.151)
* | In ip_forward(), set m->m_pkthdr.len correctly such that the mbuf chainbms2004-06-161-0/+1
| | | | | | | | | | | | | | is sane, and ipsec4_getpolicybyaddr() will therefore complete. PR: kern/42727 Obtained from: KAME (kame/freebsd4/sys/netinet/ip_input.c rev 1.42)
* | Premptively fix GCC3.4 issue: add break; after empty default: clauses.phk2004-06-162-0/+3
| | | | | | | | | | PR: 65493 Submitted by: Pawel Worach <sajd@telia.com>
* | Add some lock assertions. Lock a small part of pmap_enter().alc2004-06-161-0/+4
| |
* | MFamd64alc2004-06-162-4/+54
| | | | | | | | Introduce pmap locking to many of the pmap functions.
OpenPOWER on IntegriCloud