summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Mechanically change prototypes for vnode operations to use the new typedefs.phk2004-12-0120-327/+327
|
* The following code sets up two connected TCP sockets that send data to eachnik2004-12-013-0/+144
| | | | | | | | | | | | | other until the window is closed. Then one of the sockets is closed, which will generate a RST once the TCP at the other socket does a window probe. All versions of FreeBSD prior to 11/26/2004 will ignore this RST into a 0 window, causing the connection (and application) to hang indefinitely. On patched versions of FreeBSD (and other operating systems), the RST will be accepted and the program will exit in a few seconds. Submitted by: Michiel Boland Reviewed by: silby
* Mechanically rename s/ng_timeout/ng_callout/g, s/ng_untimeout/ng_uncallout/g.glebius2004-12-018-33/+33
| | | | | | | This is done to keep both versions in RELENG_5 and support both APIs. Reviewed by: scottl Approved by: julian (mentor), implicitly
* emit a "typedef vop_foo_t(struct vop_foo_args *);" which we can usephk2004-12-011-0/+1
| | | | to prototype VOP functions with.
* Style: remove a lot of unnecessary casts, add some and spell the nullharti2004-12-0117-508/+498
| | | | | | pointer constant as NULL. Checked by: diff -r on the object files before and after
* We already have a lock initialization function, use that for fdesc_mtxphk2004-12-011-57/+28
| | | | | | also. Polish badfo stuff.
* Collect the stuff for the /dev/fd/{%d,std{in,out,err}} pseudo-devicephk2004-12-011-55/+52
| | | | driver at the bottom of the file.
* "nfiles" is a bad name for a global variable. Call it "openfiles" insteadphk2004-12-013-10/+10
| | | | as this is more correct and matches the sysctl variable.
* Style: move data to top of file.phk2004-12-011-4/+4
|
* Add missing #includephk2004-12-011-0/+1
|
* Fix a bunch of stack leaks. These were theoretically harmless, except thatscottl2004-12-011-5/+11
| | | | | | | they would leave enough elements on the stack that if you escaped to the loader prompt and then typed 'setenv', it would pull in all of the leaked junk and cause an exception in the environment. There still seems to be 3 leaked elements, but they don't appear to be coming from this file.
* Fix for a race between lookup and readdirplus, that causesps2004-12-011-0/+28
| | | | | | | | | | | a deadlock (with NFS exclusive vnode locks enabled). Lookup grabs the parent's lock and wants to lock child. Readdirplus locks the child and wants to lock parent (for loading the attrs for ".."). The fix is to not load the attrs for ".." in readdirplus. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Reviewed by: rwatson
* Clean all dirty pages (dirtied by mmap'ed writes) in nfs_close().ps2004-12-011-0/+18
| | | | | | | | | | This closes a major hole in close-to-open consistency support. Added a new sysctl so that this can be disabled for single NFS client applications with very large amounts of mmap'ed IO (for performance). Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Reviewed by: rwatson
* Fix for a (blocks) underrun bug where negative values were beingps2004-12-011-3/+4
| | | | | | | | returned back to df from a statfs call. Causing df to print negative values. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Reviewed by: rwatson
* Change gdb_cpu_setreg() to not take the value to which to set themarcel2004-12-0111-26/+38
| | | | | | | | | | | | | | | | | | | | | specified register, but a pointer to the in-memory representation of that value. The reason for this is twofold: 1. Not all registers can be represented by a register_t. In particular FP registers fall in that category. Passing the new register value by reference instead of by value makes this point moot. 2. When we receive a G or P packet, both are for writing a register, the packet will have the register value in target-byte order and in the memory representation (modulo the fact that bytes are sent as 2 printable hexadecimal numbers of course). We only need to decode the packet to have a pointer to the register value. This change fixes the bug of extracting the register value of the P packet as a hexadecimal number instead of as a bit array. The quick (and dirty) fix to bswap the register value in gdb_cpu_setreg() as it has been added on i386 and amd64 can therefore be removed and has in fact been that. Tested on: alpha, amd64, i386, ia64, sparc64
* Completely back out 1.37. Something else is going on and John wants tonjl2004-12-011-9/+0
| | | | keep the locking and solve the real problem.
* Remove the last vestiges of the userconfig option. None of this actuallyscottl2004-12-0115-56/+2
| | | | did anything, so this commit should be considered a NO-OP.
* Fix "Lock ACPI PCI link not exclusively lockedobrien2004-12-011-0/+12
| | | | | | @sys/dev/acpica/acpi_pci_link.c:153" panic by backing out rev 1.37 in the SMP case. It appears that on a dual-proc machine the assertions in the rev 1.37 commit log hold true.
* Implement the check I was talking about in the previous message already.mlaier2004-11-303-4/+42
| | | | | | | | | | | | | | | | | Introduce domain_init_status to keep track of the init status of the domains list (surprise). 0 = uninitialized, 1 = initialized/unpopulated, 2 = initialized/done. Higher values can be used to support late addition of domains which right now "works", but is potential dangerous. I choose to only give a warning when doing so. Use domain_init_status with if_attachdomain[1]() to ensure that we have a complete domains list when we init the if_afdata array. Store the current value of domain_init_status in if_afdata_initialized. This way we can update if_afdata after a new protocol has been added (once that is allowed). Submitted by: se (with changes) Reviewed by: julian, glebius, se PR: kern/73321 (partly)
* Move ng_socket and ng_btsocket initialization to SI_SUB_PROTO_DOMAIN as theymlaier2004-11-302-2/+3
| | | | | | | | | | | | | | | call net_add_domain(). Calling this function too early (or late) breaks assertations about the global domains list. Actually it should be forbidden to call net_add_domain() outside of SI_SUB_PROTO_DOMAIN completely as there are many places where we traverse the domains list unprotected, but for now we allow late calls (mostly to support netgraph). In order to really fix this we have to lock the domains list in all places or find another way to ensure that we can safely walk the list while another thread might be adding a new domain. Spotted by: se Reviewed by: julian, glebius PR: kern/73321 (partly)
* Remove unused cnt variable for the SMP case. Trim some excessive blankpeter2004-11-301-5/+1
| | | | lines while here.
* Remove now unused variable.njl2004-11-301-1/+0
| | | | Pointy hat: njl from nskyline_r35 at yahoo com
* add myself as the contact for the pkg_install toolseik2004-11-301-0/+1
|
* Revert last change. It doesn't break mount(8) reportingru2004-11-301-0/+2
| | | | but allows a "nodev" in /etc/fstab, etc.
* Don't bother locking in attach(). At boot time, we're single-threadednjl2004-11-301-4/+1
| | | | | anyway and for some reason, witness seems confused about what's already locked and triggers a false panic.
* Stylification: missing spaces, extra space after function names, castsharti2004-11-3034-1401/+1452
| | | | | | | | and the sizeof operator, missing empty lines, void casts, extra empty lines. Checked by: diff on make *.o lst.lib/*.o Submitted by: Max Okumoto <okumoto@soe.ucsd.edu> (partly)
* Use ?= with WARNS.wollman2004-11-301-1/+1
| | | | Requested by: ru
* MLINK crypto.4 to cryptodev.4brueffer2004-11-301-0/+1
| | | | | Stumbled upon by: markus MFC after: 3 days
* Constify the array of predefined shells. It turns out that we need twoharti2004-11-302-45/+63
| | | | | | | versions of the structure definition for this: one with const char pointers, because otherwise gcc won't let us initialize the fields with constant strings, and one without the const, because we need to work with the structure.
* Chmod the shell testscript to be executable if it isn't already. Accordingharti2004-11-302-0/+2
| | | | | to the CVS-Meisters x-mode just happens to work, but is not guaranteed to do so. Try to be on the safe side.
* Forgot to inline umtxq_unlock.davidxu2004-11-301-1/+1
|
* 1. use per-chain mutex instead of global mutex to reducedavidxu2004-11-301-115/+212
| | | | | | | | | | | | | | lock collision. 2. Fix two race conditions. One is between _umtx_unlock and signal, also a thread was marked TDF_UMTXWAKEUP by _umtx_unlock, it is possible a signal delivered to the thread will cause msleep returns EINTR, and the thread breaks out of loop, this causes umtx ownership is not transfered to the thread. Another is in _umtx_unlock itself, when the function sets the umtx to UMTX_UNOWNED state, a new thread can come in and lock the umtx, also the function tries to set contested bit flag, but it will fail. Although the function will wake a blocked thread, if that thread breaks out of loop by signal, no contested bit will be set.
* Instead of just not defining a bunch of words when TESTMAIN is set, providescottl2004-11-302-14/+45
| | | | | stubs that at least handle the stack correctly. This makes it much easier to experiment with loader scripts from userland.
* Change a couple of the primitve list functions to be macros. This changesharti2004-11-3013-756/+23
| | | | | | the semantic of Lst_Datum which formerly returned NULL when the argument node was NULL. There was only one place in the source that relied on this so change that place.
* Add observations of the Linux98 and Grub/98 boot loaders. Theseimp2004-11-301-5/+15
| | | | | | | | | observations lead me to believe that the convetion for pc98 boot loaders is to have a jump unstruction, followed by a string, followed by code. The jump usually doesn't have a nop after it and usually the string is NUL terminated, but Grub/98 breaks both of these rules. # I looked for, but failed to find the Minux boot blocks for PC-9801 port.
* Create a new definition, PSL_KERNSET, which is used for setting thegrehan2004-11-301-1/+2
| | | | | MSR in kernel mode. Redefine PSL_USERSET in terms of this by or'ing in PSL_PR.
* Reject tasting of this provider if the sector size isn't a multiple ofimp2004-11-301-3/+6
| | | | | | | | | | | | | | | | | | | 512. If I had an audio cdrom in my cd player when I booted my system, I'd get a panic from geom because you can't read 8192 bytes from an audio cdrom. Remove XXX comment about IPL1 and replace it with some information from my soon to be published web page on the pc98 disk layout. The IPL1 test was the result of an observation of a disk with FreeBSD's boot0 program. It was testing part of an area what appears to be reserved for a boot loader name, which comes after a jump over this area. I don't yet know if it is required to be any specific jump instruction, or if the destination has to be location 11. [1] [1] FreeBSD Press No. 13, page 115, poorly translated by myself. The picture there shows offset 8 as the destination of the jump, but FreeBSD's boot0 program has three padding NULs after the IPL1 name and uses a 16-bit 'jmp' instruction.
* Make sure the link array is big enough to hold both _CRS and _PRSnjl2004-11-301-8/+30
| | | | | | | | | | | | resource lists. It used to be sized based only on _CRS, hence _PRS could perform an out-of-bounds access if it was larger (i.e., when there are dependent functions). Add asserts to detect this case. Note, this is only a temporary fix and I believe _PRS and _CRS should have separate arrays. Also, fix a typo where the wrong irq was being check for the APIC case. Submitted by: tegge
* Replace a printf with a KASSERT that we are indeed running on the BSP.njl2004-11-301-4/+1
|
* MFamd64: Remove the cpu_reset_proxy cruft now that we run boot() onnjl2004-11-301-66/+12
| | | | cpu 0. Also, restructure cpu_reset to be cleaner (no functional change.)
* Makefile (only) changes to allow building a cross debugger.marcel2004-11-3010-21/+50
|
* Fix the build.bms2004-11-301-2/+2
|
* s/MACHINE_ARCH/TARGET_ARCH/. We use TARGET_ARCH to pick the MD filesmarcel2004-11-301-1/+1
| | | | for libgdb and should do so here as well.
* Update the gdb register extraction support to use the pcb whereverpeter2004-11-301-23/+33
| | | | | possible, like on i386. Registers are handled differently for caller vs callee saved registers.
* Switch from 1024hz to 1000hz on amd64 to match i386. 1024 is a badpeter2004-11-301-3/+1
| | | | choice because it is so in sync with stathz (128hz or 4096hz etc).
* MFi386: join the %cr0 setup line now that i386 has lost the I386 ifdefs.peter2004-11-291-2/+1
|
* Take advantage of the shutdown processing being wired to the BSP andpeter2004-11-291-45/+3
| | | | | eliminate the evil cpu_reset_proxy code now that it will never be activated. i386 should pick this up as well.
* If soreceive() is called from a socket callback, there's no reasonps2004-11-292-1/+10
| | | | | | | | | to do a window update to the peer (thru an ACK) from soreceive() itself. TCP will do that upon return from the socket callback. Sending a window update from soreceive() results in a lock reversal. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Reviewed by: rwatson
* Make soreceive(MSG_DONTWAIT) nonblocking. If MSG_DONTWAIT is passed intops2004-11-291-3/+21
| | | | | | | | soreceive(), then pass in M_DONTWAIT to m_copym(). Also fix up error handling for the case where m_copym() returns failure. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Reviewed by: rwatson
* Fix for a bug in nfs_mkdir() that called vrele() instead of vput()ps2004-11-291-2/+2
| | | | | | | in the error cases, causing panics. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Reviewed by: rwatson
OpenPOWER on IntegriCloud