summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Don't peak into the malloc_type structure for limits. The desired vnodesjeff2002-04-151-2/+1
| | | | | check should be sufficient. This is required for the pending removal of malloc_type limits.
* Fix tx-rate setting for Lucent cards.brooks2002-04-141-0/+15
| | | | Submitted by: Eugene Perevyazko <john@pcs.dp.ua>
* Support the Siemens SpeedStream PCI card.brooks2002-04-141-0/+1
| | | | | PR: kern/35988 Submitted by: Stephen Gunn <csg@waterspout.com>
* Make the MTRR code a bit more defensive - this should help peopledwmalone2002-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trying to run X on some Athlon systems where the BIOS does odd things (mines an ASUS A7A266, but it seems to also help on other systems). Here's a description of the problem and my fix: The problem with the old MTRR code is that it only expects to find documented values in the bytes of MTRR registers. To convert the MTRR byte into a FreeBSD "Memory Range Type" (mrt) it uses the byte value and looks it up in an array. If the value is not in range then the mrt value ends up containing random junk. This isn't an immediate problem. The mrt value is only used later when rewriting the MTRR registers. When we finally go to write a value back again, the function i686_mtrrtype() searches for the junk value and returns -1 when it fails to find it. This is converted to a byte (0xff) and written back to the register, causing a GPF as 0xff is an illegal value for a MTRR byte. To work around this problem I've added a new mrt flag MDF_UNKNOWN. We set this when we read a MTRR byte which we do not understand. If we try to convert a MDF_UNKNOWN back into a MTRR value, then the new function, i686_mrt2mtrr, just returns the old value of the MTRR byte. This leaves the memory range type unchanged. I have seen one side effect of the fix, which is that ACPI calls after X has been run seem to hang my machine. As running X would previously panic the machine, this is still an improvement ;-) I'd like to MFC this before the 4.6 code freeze - please let me know if it causes any problems. PR: 28418, 25958 Tested by: jkh, Christopher Masto <chris@netmonger.net> MFC after: 2 weeks
* Make the MTRR code a bit more defensive - this should help peopledwmalone2002-04-142-60/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trying to run X on some Athlon systems where the BIOS does odd things (mines an ASUS A7A266, but it seems to also help on other systems). Here's a description of the problem and my fix: The problem with the old MTRR code is that it only expects to find documented values in the bytes of MTRR registers. To convert the MTRR byte into a FreeBSD "Memory Range Type" (mrt) it uses the byte value and looks it up in an array. If the value is not in range then the mrt value ends up containing random junk. This isn't an immediate problem. The mrt value is only used later when rewriting the MTRR registers. When we finally go to write a value back again, the function i686_mtrrtype() searches for the junk value and returns -1 when it fails to find it. This is converted to a byte (0xff) and written back to the register, causing a GPF as 0xff is an illegal value for a MTRR byte. To work around this problem I've added a new mrt flag MDF_UNKNOWN. We set this when we read a MTRR byte which we do not understand. If we try to convert a MDF_UNKNOWN back into a MTRR value, then the new function, i686_mrt2mtrr, just returns the old value of the MTRR byte. This leaves the memory range type unchanged. I'd like to merge this before the 4.6 code freeze, so if people can test this with XFree 4 that would be very useful. PR: 28418, 25958 Tested by: jkh, Christopher Masto <chris@netmonger.net> MFC after: 2 weeks
* Use 'struct callout' instead of 'struct callout_handle' to avoidarchie2002-04-141-25/+81
| | | | | | | | | | | exhausting the kernel timeout table. Perform the usual gymnastics to avoid race conditions between node shutdown and timeouts occurring. Also fix a bug in handling ack delays < PPTP_MIN_ACK_DELAY. Before, we were ack'ing immediately. Instead, just impose a minimum ack delay time, like the name of the macro implies. MFC after: 1 week
* Don't allow one to trace an ancestor when already traced.alfred2002-04-141-1/+14
| | | | | | | PR: kern/29741 Submitted by: Dave Zarzycki <zarzycki@FreeBSD.org> Fix from: Tim J. Robbins <tim@robbins.dropbear.id.au> MFC After: 2 weeks
* Actually add the UDF files!scottl2002-04-148-0/+3000
|
* Cosmetical change: remove empty line to reduce diffs to RELENG_4fjoe2002-04-141-1/+0
|
* Add a filesystem driver for the Universal Disk Format. For more info,scottl2002-04-145-1/+7
| | | | | | | see http://people.freebsd.org/~scottl/udf MFC after: when asmodai gets the backport done Prodded by: phk asmodai des
* Fix a witness warning when expanding a hash table. We were allocating the newjeff2002-04-141-38/+79
| | | | | | | | | | hash while holding the lock on a zone. Fix this by doing the allocation seperately from the actual hash expansion. The lock is dropped before the allocation and reacquired before the expansion. The expansion code checks to see if we lost the race and frees the new hash if we do. We really never will lose this race because the hash expansion is single threaded via the timeout mechanism.
* Protect the initial list traversal in sysctl_vm_zone() with the uma_mtx.jeff2002-04-141-0/+2
|
* Fix the play / record rate setting so that it actually works.jhay2002-04-141-3/+8
| | | | | | | | The extra microphone channel capability is part of the "normal" ac97 capabilities and not an extended ac97 capability. Now recording on codecs without a seperate mic channel works. MFC after: 1 week
* Use VOP_GETVOBJECT instead of accessing the member directly. This fixedjeff2002-04-141-1/+1
| | | | | | an issue with nullfs and NAMEI shared. Submitted by: Alexander Kabaev
* Modernize SCM ID.obrien2002-04-141-4/+1
|
* Dotting the i-s:marcel2002-04-142-18/+28
| | | | | | | o Use chunk instead of region when we talk about a memory range. Region can be confused with region register and we already call it chunk in machdep.c o Update the twiddle every 16MB
* Regenalc2002-04-145-6/+6
|
* Remove the requirement that Giant be held around sigreturn().alc2002-04-141-1/+1
|
* Allow a kernel to be compiled with both SKI and acpica and stillpeter2002-04-142-2/+15
| | | | work on real hardware. (SKI used to break the sapic probes)
* Remove stale XXX comment.jhb2002-04-141-1/+0
|
* o Use aiocblist::fd_file in the AIO threads rather than recomputingalc2002-04-141-45/+3
| | | | | | the file * from the calling process's descriptor table. o Eliminate sharing of the calling process's descriptor table with the AIO threads.
* Fix the calculation that determines uz_maxpages. It was off for large zones.jeff2002-04-142-28/+53
| | | | | | | | | | | | | | Fortunately we have no large zones with maximums specified yet, so it wasn't breaking anything. Implement blocking when a zone exceeds the maximum and M_WAITOK is specified. Previously this just failed like the old zone allocator did. The old zone allocator didn't support WAITOK/NOWAIT though so we should do what we advertise. While I was in there I cleaned up some more zalloc logic to further simplify that code path and reduce redundant code. This was needed to make the blocking work properly anyway.
* Add comment that sigreturn() is MPSAFE.alc2002-04-132-0/+5
|
* - Change killpg1()'s first argument to be a thread instead of a process sojhb2002-04-131-36/+22
| | | | | | | | | | | | | | | | we can use td_ucred. - In killpg1(), the proc lock is sufficient to check if p_stat is SZOMB or not. We don't need sched_lock. - Close some races in psignal(). In psignal() there is a big switch statement based on p_stat. All the different cases are assuming that the process (or thread) isn't going to change state out from under it. To ensure this is true, just lock sched_lock for the entire switch. We practically held it the entire time already anyways. This also simplifies the locking somewhat and actually results in fewer lock operations. - Allow signotify() to be called with the sched_lock held since psignal() now does that. - Use td_ucred in a couple of places.
* - Change donice() to take a thread as the first argument instead of ajhb2002-04-131-37/+40
| | | | | | | | | | | | | | | process so it can use td_ucred. - Require the target process of donice() to be locked when donice() is called. - Use td_ucred. - Lock the target process of p_cansee() and while reading the credentials of a process. - Change the logic of rtprio() slightly so it does it's copyin() if needed prior to locking the target process. - rtprio() no longer needs Giant. In theory with full KSE it would still need Giant to protect p_ucred of curproc for the p_canfoo() functions but p_canfoo() will be changing to using td_ucred of curthread before full KSE hits the tree.
* - Change procfs_control()'s first argument to be a thread pointer insteadjhb2002-04-131-47/+32
| | | | | | | | | | | of a process pointer. - Move the p_candebug() at the start of procfs_control() a bit to make locking feasible. We still perform the access check before doing anything, we just now perform it after acquiring locks. - Don't lock the sched_lock for TRACE_WAIT_P() and when checking to see if p_stat is SSTOP. We lock the process while setting p_stat to SSTOP so locking the process is sufficient to do a read to see if p_stat is SSTOP or not.
* Lock the target process for p_candebug().jhb2002-04-131-3/+4
|
* Lock the target process in procfs_doproc*regs() for p_candebug and whilejhb2002-04-133-9/+23
| | | | reading/writing the registers.
* Rework logic of syscalls that modify process credentials as described injhb2002-04-133-29/+55
| | | | rev 1.152 of sys/kern/kern_prot.c.
* - p_cansee() needs the target process locked.jhb2002-04-132-35/+32
| | | | - We need the proc lock held for more of procfs_doprocstatus().
* - Change the algorithms of the syscalls to modify process credentials tojhb2002-04-131-83/+137
| | | | | | | | | | | | allocate a blank cred first, lock the process, perform checks on the old process credential, copy the old process credential into the new blank credential, modify the new credential, update the process credential pointer, unlock the process, and cleanup rather than trying to allocate a new credential after performing the checks on the old credential. - Cleanup _setugid() a little bit. - setlogin() doesn't need Giant thanks to pgrp/session locking and td_ucred.
* - Change the first argument of ktrcanset(), ktrsetchildren(), and ktrops()jhb2002-04-131-32/+57
| | | | | to a thread pointer so that ktrcanset() can use td_ucred. - Add some proc locking to partially protect p_tracep and p_traceflag.
* Turn on TGA support.obrien2002-04-1313-29/+102
| | | | Submitted by: Andrew M. Miklic <AndrwMklc@cs.com>
* Quiet GCC 3.1 warning.obrien2002-04-131-1/+1
|
* If the receiver runs out of space for an received frame in the internalphk2002-04-132-22/+8
| | | | | | | | | | | | | | | | | | | FIFO or the in-RAM descriptors it will switch to RX_IDLE from where it is not restarted. We used to deal with RX_IDLE by doing a total reinit but this lost our link and caused a potential 30sec autonegotiation against switches. This was changed to a less heavyhanded approach, but this failed to restart the receiver it it were in the RX_IDLE state. This change adds the RX_IDLE and the RX_FIFO_OFLOW conditions as triggers for interrupts and receive side processing, and restarts the receiver when it is RX_IDLE. Remove the #ifdef notyet'ed nge_rxeoc() function. Sponsored by: Cybercity Internet, Denmark. MFC after: 7 days
* Use pmap_extract() instead of pmap_kextract() to retrieve the physicaltmm2002-04-131-1/+2
| | | | | | | address associated with a user virtual address in pipe_build_write_buffer(). Reviewed by: alc
* o Remove vm_map_growstack() and useracc() from sendsig(). Copyout() andalc2002-04-131-20/+5
| | | | | suword() will automatically grow the stack if needed. o Add a comment that osigreturn() and sigreturn() are MPSAFE.
* Check write permissions before creating anything.bp2002-04-131-0/+3
| | | | | PR: kern/27883 MFC after: 1 week
* Use the correct macros for F_SETFD/F_GETFD instead of magic numbers.asmodai2002-04-131-2/+3
| | | | | | | | | Reflect that fact in the manual page. PR: 12723 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au> Approved by: bde MFC after: 2 weeks
* Fix an edge case wrt membase, but more changes neededimp2002-04-131-1/+1
|
* Restore NetBSD copyrights that shouldn't have been removed in the first place.imp2002-04-132-0/+60
|
* Back out the last revision - it does not work correctly when one oftmm2002-04-131-17/+6
| | | | | | | | the pages in question is not in the top-level vm object, but in one of the shadow ones. Pointed out by: alc Pointy hat to: tmm
* Rework ptrace(2) to be more locking friendly. We do any needed copyin()'sjhb2002-04-121-86/+114
| | | | | | and acquire the proctree_lock if needed first. Then we lock the process if necessary and fiddle with it as appropriate. Finally we drop locks and do any needed copyout's. This greatly simplifies the locking.
* Do not use pmap_kextract() to find out the physical address of a usertmm2002-04-121-6/+17
| | | | | | | | | | | belong to a user virtual address; while this happens to work on some architectures, it can't on sparc64, since user and kernel virtual address spaces overlap there (the distinction between them is done via separate address space identifiers). Instead, look up the page in the vm_map of the process in question. Reviewed by: jake
* Include <sys/cdefs.h> for definition of __BSD_VISIBLE.mike2002-04-123-0/+3
| | | | Pointy hat to: mike
* Unbreak this as well.ru2002-04-121-1/+1
| | | | | | At the extra bonus of fixing the contents of the .depend file. Not really my day.
* Add a couble more Promise chip ID's.sos2002-04-121-1/+2
|
* Initialise ar.cflg, which contains the IA-32 registers cr0 and cr4. Sincedfr2002-04-122-0/+14
| | | | | all IA-32 processes use the same values for cr0 and cr4, we initialise them at system startup.
* Print extra information in printtrap() if the interrupted state was fordfr2002-04-121-7/+12
| | | | | an IA-32 process. Don't sign extend arguments in ia32_syscall - its not normally going to be useful (e.g. pointers need to be zero extended).
* Fix definition of va_start: We don't need to take the address ofmarcel2002-04-121-1/+1
| | | | | va_list. It's a builtin type. gcc 3.1 doesn't care either way, but gcc 3.2 is more picky and doesn't like the former.
OpenPOWER on IntegriCloud