summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* fix botchmjacob2006-12-211-1/+1
|
* Document MTX_NOPROFILE flag.pjd2006-12-211-1/+1
|
* Allow this module to get its options from the kernel build directoryyar2006-12-211-0/+2
| | | | | | | instead of always hard coding them in CFLAGS. POLA is kept here: The module file built with GENERIC stays the same. Tested with: md5(1)
* Pay attention to return value from xpt_bus_register in xpt_init.mjacob2006-12-211-1/+5
| | | | | Obtained from: Xin Li (Coverity) MFC after: 3 days
* The prepend function did not handle non-pkthdr's correctly.rrs2006-12-211-2/+7
| | | | | | | | | | | It always called MH_ALIGN for small lengths being prepended (less than MHLEN). This meant that if you did a prepend on a non M_PKTHDR the system would panic with the KASSERT in MH_ALIGN. Instead we are not aware of this and do a MH_ALIGN or M_ALIGN as appropriate. Reviewed by: andre Approved by: gnn
* MFP4 (110956):netchild2006-12-211-0/+2
| | | | | | | | Add definition for LINUX_MSG_INFO. This fixes the tinderbox errors. Submitted by: rdivacky
* Return value PKT_ALIAS_FOUND_HEADER_FRAGMENT isn't an error case. Theglebius2006-12-211-1/+2
| | | | | | packet shouldn't be dropped. Submitted by: Alexander Motin <mav alkar.net>
* Minor style fixes.rwatson2006-12-214-20/+20
|
* Remove mac_enforce_subsystem debugging sysctls. Enforcement onrwatson2006-12-2115-400/+3
| | | | | | | | | | subsystems will be a property of policy modules, which may require access control check entry points to be invoked even when not actively enforcing (i.e., to track information flow without providing protection). Obtained from: TrustedBSD Project Suggested by: Christopher dot Vance at sparta dot com
* Unbreak 64-bit little-endian systems that do require alignment.marcel2006-12-211-18/+5
| | | | | The fix involves using le16dec(), le32dec(), le16enc() and le32enc(). This eliminates invalid casts and duplicated logic.
* Comment LABEL_TO_SLOT() macro, including observing that we'd like to improverwatson2006-12-202-0/+16
| | | | | | | this policy API to avoid encoding struct label binary layout in policy modules. Obtained from: TrustedBSD Project
* Trim trailing white space, clean up comment line wrapping and formatting.rwatson2006-12-201-10/+21
| | | | | | Document mac_associate_nfsd_label(). Obtained from: TrustedBSD Project
* Trim trailing white space.rwatson2006-12-202-7/+7
|
* Document socket labeling model.rwatson2006-12-201-15/+27
| | | | | | Clean up comment white space and wrapping. Obtained from: TrustedBSD Project
* Clean up comment white space and line wrapping.rwatson2006-12-201-15/+14
|
* Additional comments regarding the interaction between the kernel privilegerwatson2006-12-201-0/+18
| | | | | | model and the MAC Framework. Obtained from: TrustedBSD Project
* Document that we could allocate the mbuf label as part of the tag ratherrwatson2006-12-201-8/+26
| | | | | | | | | | than from the slab, but don't. Document mac_mbuf_to_label(), mac_copy_mbuf_tag(). Clean up white space/wrapping for other comments. Obtained from: TrustedBSD Project
* Staticize and comment zone_label.rwatson2006-12-201-1/+7
| | | | Obtained from: TrustedBSD Project
* Clean up comments, trailing white space.rwatson2006-12-201-17/+27
| | | | | | Provide a comment describing MAC_EXTERNALIZE(). Obtained from: TrustedBSD Project
* Re-wrap comment at 77 character columns.rwatson2006-12-201-7/+7
|
* Comment and white space cleanup.rwatson2006-12-201-15/+17
| | | | | | | Exapnd comments on System V IPC labeling methods, which could use improved consistency with respect to other object types. Obtained from: TrustedBSD Project
* Regen (just to fix 'generated from' line from the previous commit).jkim2006-12-203-3/+3
|
* Externalize local stack copy of the ifnet label, rather than the copy onrwatson2006-12-201-2/+2
| | | | | | | | | | the ifnet itself. The stack copy has been made while holding the mutex protecting ifnet labels, so copying from the ifnet copy could result in an inconsistent version being copied out. Reported by: Todd.Miller@sparta.com Obtained from: TrustedBSD Project MFC after: 3 weeks
* Expand commenting on label slots, justification for the MAC Framework lockingrwatson2006-12-203-162/+237
| | | | | | | | model, interactions between locking and policy init/destroy methods. Rewrap some comments to 77 character line wrap. Obtained from: TrustedBSD Project
* Add linux_nanosleep() and regen.jkim2006-12-204-5/+11
|
* reduce padding to compensate for recent change to sys/pcpu.h (tinderbox fix)kmacy2006-12-201-1/+1
|
* MFP4: 109655jkim2006-12-204-55/+72
| | | | | | | | - Move linux_nanosleep() from src/sys/amd64/linux32/linux32_machdep.c to src/sys/compat/linux/linux_time.c. - Validate timespec ranges before use as Linux kernel does. - Fix l_timespec structure. - Clean up style(9) nits.
* MFP4: 110179jkim2006-12-201-3/+41
| | | | | | Add rudimentary IPC_INFO/MSG_INFO command support for linux_msgctl() to pacify Linux ipcs(1). While I am here, add more bound checks for linux_msgsnd() and linux_msgrcv().
* Regen.jkim2006-12-204-10/+27
|
* MFP4: (part of) 110058jkim2006-12-202-6/+58
| | | | Fix 32-bit msgsnd(3) and msgrcv(3) emulations for amd64.
* MFP4: (part of) 110058jkim2006-12-201-24/+26
| | | | Use new kern_msgsnd()/kern_msgrcv() to fix linux32 emulation on amd64.
* MFP4: (part of) 110058jkim2006-12-202-85/+90
| | | | | | | | | copyin()/copyout() for message type is separated from msgsnd()/msgrcv() and it is done from its wrapper functions to support 32-bit emulations. After I implemented this, I have briefly referenced NetBSD and Darwin. NetBSD passes copyin()/copyout() function pointers from wrappers. Darwin passes size of message type as an argument, which is actually similar to my first implementation (P4 109706). We may revisit these implementations later.
* MFP4: (part of) 109714jkim2006-12-201-0/+6
| | | | | Add SYSCALL_MODULE_PRESENT() macro. The idea was borrowed from syscall_register().
* MFp4: differences for bwct ethernet attachmentimp2006-12-202-3/+13
|
* MFp4: Differences in flash part for bwct. need a more generic way to cope.imp2006-12-202-0/+35
|
* MFp4: Add timeout to eeprom access for lame eeprom that go awolimp2006-12-202-4/+8
|
* MFp4: bwct memory size and PLL parametersimp2006-12-201-0/+8
|
* MFp4: bwct boot rom is different. need a more generic way to cope long term.imp2006-12-201-0/+4
|
* MFp4: Delay a second or two after the upload before printing Done.imp2006-12-201-2/+6
| | | | Add an automatic reset for remote operational luvin' goodness.
* MFp4: bwct is a new board choice.imp2006-12-201-1/+1
|
* On amd64 platform, use linux32 headers so 32-bit Linux applicationsdelphij2006-12-201-0/+5
| | | | | | | | | | | would be able to work with aac(4). This approach is used by some other drivers as well. However, we need a more generic way to do this in order to avoid having to special case headers in individual drivers for each platform. Obtained from: Adaptec (version b11518) Approved by: scottl
* In bge_txeof(), cancel the watchdog timeout if all descriptors havebde2006-12-201-1/+2
| | | | | | | been handled instead of when at least one descriptor was just handled. For bge, it is normal to get a txeof when only a small fraction of the queued tx descriptors have been handled, so the bug broke the watchdog in a usual case.
* Avoid a race and a pessimization in bge_intr():bde2006-12-201-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - moved the synchronizing bus read to after the bus write for the first interrupt ack so that it actually synchronizes everything necessary. We were acking not only the status update that triggered the interrupt together with any status updates that occurred before we got around to the bus write for the ack, but also any status updates that occur after we do the bus write but before the write reaches the device. The corresponding race for the second interrupt ack resulted in sometimes returning from the interrupt handler with acked but unserviced interrupt events. Such events then remain unserviced until further events cause another interrupt or the watchdog times out. The race was often lost on my 5705, apparently since my 5705 has broken event coalescing which causes a status update for almost every packet, so another status update is quite likely to occur while the interrupt handler is running. Watchdog timeouts weren't very noticeable, apparently because bge_txeof() has one of the usual bugs resetting the watchdog. - don't disable device interrupts while bge_intr() is running. Doing this just had the side effects of: - entering a device mode in which different coalescing parameters apply. Different coalescing parameters can be used to either inhibit or enhance the chance of getting another status update while in the interrupt handler. This feature is useless with the current organization of the interrupt handler but might be useful with a taskqueue handler. - giving a race for ack+reenable/return. This cannot be handled by simply rearranging the order of bus accesses like the race for ack+keepenable/entry. It is necessary to sync the ack and then check for new events. - taking longer, especially with the extra code to avoid the race on ack+reenable/return. Reviewed by: ru, gleb, scottl
* In rev. 1.514, iodone on async buffer may happen before code checks thekib2006-12-201-2/+9
| | | | | | | | | | | vnode v_flag. For cluster buffers this would result in dereferencing NULL b_vp. To prevent the panic, cache relevant vnode flag before calling bstrategy. Reported by: Peter Holm, kris Tested by: Peter Holm Reviewed by: tegge Pointy hat to: kib
* Add a lwpid field into per-cpu structure, the lwpid represents currentdavidxu2006-12-2010-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | running thread's id on each cpu. This allow us to add in-kernel adaptive spin for user level mutex. While spinning in user space is possible, without correct thread running state exported from kernel, it hardly can be implemented efficiently without wasting cpu cycles, however exporting thread running state unlikely will be implemented soon as it has to design and stablize interfaces. This implementation is transparent to user space, it can be disabled dynamically. With this change, mutex ping-pong program's performance is improved massively on SMP machine. performance of mysql super-smack select benchmark is increased about 7% on Intel dual dual-core2 Xeon machine, it indicates on systems which have bunch of cpus and system-call overhead is low (athlon64, opteron, and core-2 are known to be fast), the adaptive spin does help performance. Added sysctls: kern.threads.umtx_dflt_spins if the sysctl value is non-zero, a zero umutex.m_spincount will cause the sysctl value to be used a spin cycle count. kern.threads.umtx_max_spins the sysctl sets upper limit of spin cycle count. Tested on: Athlon64 X2 3800+, Dual Xeon 5130
* Back out rev. 1.266. The real cause for the recent panics has been fixedmbr2006-12-201-1/+1
| | | | in rev. 1.267 and there is no need to keep this test.
* - Use the re_tick() callout instead of if_slowtimo() for drivingmarius2006-12-201-35/+23
| | | | | | | | | re_watchdog() in order to avoid races accessing if_timer. - Use bus_get_dma_tag() so re(4) works on platforms requiring it. - Remove invalid BUS_DMA_ALLOCNOW when creating the parent DMA tag and the tags that are used for static memory allocations. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. - Remove an unused variable in re_intr().
* Fix a bug originally introduced in rev. 1.74; don't reloaded themarius2006-12-201-1/+2
| | | | | | | | | | watchdog timer in dc_txeof() in case there are still unhandled descriptors as dc_poll() invokes dc_poll() unconditionally. Otherwise this would result in the watchdog timer constantly being being reloaded and thus circumvent that the watchdog ever fires in the DEVICE_POLLING case. Pointed out by: bde
* Partially back out rev. 1.148 and use new ETHER_BPF_MTAP() macro for VLAN.jkim2006-12-201-11/+5
| | | | Remaining changes are cosmetic.
* Remove bogus increment of re-hashed PTEG index. This snuck in with r1.12 ofgrehan2006-12-202-2/+2
| | | | | | | | | | | | | | pmap.c, and is potentially the cause of hangs reported on machines with a small amount of memory. On machines with sufficient RAM, and without a lot of processes running, this situation would probably never occur. Testing is still incomplete, but it is obviously wrong so remove the offending code now. The issue of what to do when both the primary and secondary hash overflow is still open. Reported by: Dan Kresja at windriver dot com, via alc
OpenPOWER on IntegriCloud