summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Move MAC check_vnode_mmap entry point out from being exclusive tocsjp2005-04-1411-19/+23
| | | | | | | | | | | | | | | | | | | | MAP_SHARED so that the entry point gets executed un-conditionally. This may be useful for security policies which want to perform access control checks around run-time linking. -add the mmap(2) flags argument to the check_vnode_mmap entry point so that we can make access control decisions based on the type of mapped object. -update any dependent API around this parameter addition such as function prototype modifications, entry point parameter additions and the inclusion of sys/mman.h header file. -Change the MLS, BIBA and LOMAC security policies so that subject domination routines are not executed unless the type of mapping is shared. This is done to maintain compatibility between the old vm_mmap_vnode(9) and these policies. Reviewed by: rwatson MFC after: 1 month
* In ppsintr, we needed ppsdev to get to the softc and nothing else.imp2005-04-141-11/+7
| | | | | | | | | | | | | | | Save a memory dereference in the ISR by passing this in directly. Calling pps_capture is MP safe for all other operations on struct pps_state, so there's no need to aquire the lock before we do this, even from a fast ISR. Avoid dereferencing sc->ppbus until after pps_capture is called as well. These actions reduce somewhat the cache effects that cause variance in interrupt times. On an especially slow test machine (300MHz Cyrix GXm), this reduces the interrupt latency about about 10% (from 21us to 19us) and helps a little with the variance (although most of the variance seems to be caused by lots of interrupt masking). This also happens fixes one or two of bde's style issues.
* No reason to write \a and \v as octal escape sequences.stefanf2005-04-141-2/+2
|
* - Add a THR column to the process listing, that shows the number ofkeramida2005-04-143-16/+63
| | | | | | | | | threads a process has. The THR column is disabled and disappears when 'H' is hit, because then every thread gets its own output line. - Allow sorting processes by "threads". Approved by: davidxu Inspired by: Jiawei Ye <leafy7382@gmail.com>
* Correct typo.brueffer2005-04-141-1/+1
| | | | Obtained from: OpenBSD
* Unbreak the vector_page == 0x00000000 case. Map the vector page L1PT into thecognet2005-04-141-2/+4
| | | | | kernel domain for each pmap, as we don't update the page table when we're switching to a kernel thread, but we do however update the DACR.
* MFi386: revision 1.612.nyan2005-04-142-100/+176
|
* MFi386: revision 1.20.nyan2005-04-141-1/+1
|
* Merge the following from the English version:den2005-04-143-39/+83
| | | | | | | | 1.30 -> 1.31 install.sgml 1.9 -> 1.10 layout.sgml 1.16 -> 1.17 trouble.sgml Obtained from: The FreeBSD Russian Documentation Project
* remove needless res_init() call.ume2005-04-141-9/+0
| | | | Inspired by: NetBSD
* Remove dead code which would never execute.gnn2005-04-141-18/+18
| | | | | | | | | | | i.e. checking to see if a cluster was every less than 48 bytes, a rather unlikely case. Check return value of m_dup_pkthdr() calls. Found by: Coverity Reviewed by: rwatson (mentor), Keiichi Shima (for Kame) Approved by: rwatson (mentor)
* Read back the real taskfile register values when in 48BIT mode.sos2005-04-142-6/+23
|
* Printf(1) is WARNS 6 clean.stefanf2005-04-141-0/+1
|
* - Move parts of the long main() function into a new function doformat().stefanf2005-04-141-153/+160
| | | | - Rewrite the loop in main() to be more understandable.
* - cache_lookup() relocks the parent in the DOTDOT case for us.jeff2005-04-142-4/+0
| | | | | Spotted by: phk Sponsored by: Isilon Systems, Inc.
* Use AcpiUtStrupr() instead of strupr() as the latter will disappear inmarks2005-04-141-1/+1
| | | | | | future versions of acpica. MFC after: 2 weeks
* Probe PCI link devices early so that we turn them all off via _DIS beforejhb2005-04-141-0/+4
| | | | | | | | | we start turning any of them back on again. This works around a bug in some BIOSen that alias two different link devices for APIC vs ATPIC modes onto the same physical hardware link. Submitted by: njl Tested by: Antoine Brodin antoine dot brodin at laposte dot net
* Bah, add a missing cast.jhb2005-04-141-1/+1
|
* Close a race between sleepq_broadcast() and sleepq_catch_signals().jhb2005-04-141-47/+21
| | | | | | | | | | | | | | | | | | | | | | Specifically, sleepq_broadcast() uses td_slpq for its private pending queue of threads that it is going to wake up after it takes them off the sleep queue. The problem is that if one of the threads is actually not asleep yet, then we can end up with td_slpq being corrupted and/or the thread being made runnable at the wrong time resulting in the td_sleepqueue == NULL assertion failures occasionally reported under heavy load. The fix is to stop being so fancy and ditch the whole pending queue bit. Instead, sleepq_remove_thread() and sleepq_resume_thread() were merged into one function that requires the caller to hold sched_lock. This fixes several places that unlocked sched_lock only to call a function that then locked sched_lock, so even though sched_lock is now held slightly longer, removing the extra lock acquires (1 pair instead of 3 in some cases) probably makes it an overall win if you don't include the fact that it closes a race. This is definitely a 5.4 candidate. PR: kern/79693 Submitted by: Steven Sears stevenjsears at yahoo dot com MFC after: 4 days
* Always use the local APIC timer, even on UP machines.jhb2005-04-142-8/+0
|
* If an I/O APIC returns 0xffffffff for its version register after we map it,jhb2005-04-141-2/+11
| | | | | | | assume it is bogus and return NULL instead of trying to parse it as an APIC. Inspired by: linux bug reports via njl
* rev 1.54 of i386/include/pcb.h depended on sys/proc.h. The prerequisitepeter2005-04-142-0/+2
| | | | | | | | was satisified for the rest of the kernel on the i386 build except for these two files. Rather than adding a submarine include to pcb.h, I've added proc.h here. I forgot to include these with the original commit. Sorry folks.
* Make sure we look at the correct sub op codes whenmjacob2005-04-141-3/+22
| | | | | | | | deciding whether it's an operation we can perform via the control device. PR: kern/72010 MFC after: 1 week
* Take constructive advice from njl && reformatmjacob2005-04-141-0/+6
| | | | previously added quirks slightly.
* Quirk for ZICPlay USB MP3 Player.njl2005-04-141-0/+8
| | | | | PR: kern/75057 Submitted by: Aurelien Nephtali <aurelien.nephtali wanadoo.fr>
* It seems I introduced a new prerequisite for <machine/pcb.h> on i386,peter2005-04-141-0/+3
| | | | which is included from <sys/user.h>. Add a bandaid for userland.
* Apply quirk.mjacob2005-04-141-0/+4
| | | | | | PR: 57469 Submitted by: walter@pelissero.de MFC after: 1 week
* Applied conservative version of suggested quirk.mjacob2005-04-141-0/+7
| | | | | | PR: 57468 Submitted by: walter@pelissero.de MFC after: 1 week
* Apply quirk suggested by submitter.mjacob2005-04-141-1/+1
| | | | | | PR: 75486 Submitted by: no_bs@web.de MFC after: 1 week
* Do not remove logging sockets. This fixes an issue where loggingcsjp2005-04-141-0/+2
| | | | | | | | | sockets placed into prisons from the host environment get clobbered by the prison's instance of cleanvar. (assuming /etc/rc is run in the prison). Discussed with: pjd, green, cperciva MFC after: 1 week
* The divide by zero panic must have been due to a bogusmjacob2005-04-141-0/+9
| | | | | | | | | period value. I suppose the BT adapter driver should be fixed, but more importantly we should protect against dividing by zero. PR: kern/75603 MFC after: 1 week
* Allow user processes to completely empty out their LDT, now that userpeter2005-04-141-1/+1
| | | | | processes run from segment selectors that live in the GDT. Doing this used to be equivalent to committing suicide, but now this is a NOP.
* Adapt the libpthread patch for using i386_set_gsbase() to libthr.peter2005-04-142-16/+41
|
* Use the i386_set_gsbase() syscall if it is implemented in the kernel.peter2005-04-144-32/+82
| | | | | This is a little hairy here because the allocation and usage of this functionality is split into two places in libpthread.
* Attempt to use i386_set_gsbase(), and gracefully fall back to LDT methodspeter2005-04-141-13/+16
| | | | if the direct access methods are not implemented.
* Attempt i386_set_gsbase() before using the user_ldt code. Unimplementedpeter2005-04-141-1/+4
| | | | sysarch() calls return EINVAL, not SIGSYS.. so we can trivially adapt.
* Add stubs for the %fs/%gs base management calls.peter2005-04-145-0/+149
|
* - Remove a debugging printf that slipped in.jeff2005-04-131-1/+0
| | | | Spotted by: Peter Wemm
* Change the segment limits to 4GB, we set the user accessible bit on allpeter2005-04-139-67/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the kernel address space already. Intel recommend this anyway, because using a non-4GB limit adds an additional clock cycle to address generation. We were able to install 4GB segments into the LDT, so any limits we imposed on %cs and %ds were academic anyway. More importantly, this allows us to make a page in the kernel readable to user applications, for holding things like the signal trampoline and other fun things. Move the user %cs/%ds segments from the LDT to the GDT. There was no good reason for them to be there anyway. The old LDT entries are still there but we can now relax the restriction that prevented users from emptying the default LDT entries. Putting user and kernel %cs and %ds together allows us to access the fast sysenter/sysexit/syscall/sysret instructions. syscall/sysret in particular require that the user/kernel segments be laid out this way. Reserve a slot specifically for NDIS while here. Create two user controllable slots in the GDT that are context switched with the (kernel) thread. This allows user applications to set two user privilige selectors to arbitary values. Create i386_set_fsbase(void *base) and friends. (get/set, fs/gs). For i386, %gs is used by tls and the thread libraries and this means that user processes no longer have to have the cost of having a custom LDT, and we will no longer to do a ldt switch when activating a kthread/ithread in the usual case any more. In other words, we can now set the base address for %fs and %gs to arbitary addresses without the pain of messing with ldt segments.
* sort and expand the prunelist in a more or less generally sensiblyphk2005-04-131-18/+82
| | | | | | | | | order. Put some strategic comments in about how much storage is necessary and a longer explanation on the top. It is now pretty trivial to put nanoBSD on as little as a 64MB CF card. Sponsored by: Soekris Engineering.
* Introduce NANOBSD_PRUNE which can be used to zap out bits we don'tphk2005-04-131-0/+3
| | | | want to carry forward.
* Use df -iphk2005-04-131-1/+1
|
* Fix mss byte order, only affects synproxy code path.glebius2005-04-131-0/+2
| | | | | | | Submitted by: John L. Scarfone via OpenBSD Reviewed by: mlaier Obtained from: OpenBSD, rev. 1.483 MFC after: 2 days
* Add a few regression tests for printf(1).stefanf2005-04-1312-1/+38
|
* Assign 0.0 to the variable passed to getfloating() if the argument is missing.stefanf2005-04-131-1/+3
| | | | MFC after: 1 week
* Fix compile error :-(.imp2005-04-131-1/+2
|
* Fix an evil bug that appeared in September 2003. VM86 bios calls use twopeter2005-04-133-4/+4
| | | | | | | | | | | of the __pcb_spare longs. Except that fields were changed and one of the spare values was used and the __pcb_spare field was reduced from two to one long. Now VM86 bios calls can trash the first 4 bytes of the next page following the kernel stack/pcb. This Is Bad(TM). This bug has been present in 5.2-release and onwards, and is still in RELENG_5. Instead of tempting fate and trying to use "spare" fields, explicitly reserve them.
* Test for NULL before use.mdodd2005-04-131-12/+11
| | | | Submitted by: sam (Coverity)
* Add KASSERT() to warn against NULL deref.mdodd2005-04-131-0/+1
| | | | Submitted by: sam (Coverity)
* Use pci_find_bsf() to retrieve the PCI device associated withbms2005-04-131-13/+16
| | | | | | | a bus/device/function tuple. This change enables pciconf(8) to work with CardBus devices. Reviewed by: imp
OpenPOWER on IntegriCloud