summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Silence warnings.eivind1999-01-121-3/+3
|
* Remove warningn_hibma1999-01-101-3/+1
|
* Back out last change to sysctl.phk1999-01-101-47/+2
| | | | | | | | | | | | | | | | | | | | | | | It was nay'ed before committing on the grounds that this is not the way to do it, and has been decided as such several times in the past. There is not point in loading gobs of ascii into the kernel when the only use of that ascii is presentation to the user. Next thing we'd be adding all section 4 man pages to the loaded kernel as well. The argument about KLD's is bogus, klds can store a file in /usr/share/doc/sysctl/dev/foo/thisvar.txt with a description and sysctl or other facilities can pick it up there. Proper documentation will take several K worth of text for many sysctl variables, we don't want that in the kernel under any circumstances. I will welcome any well thought out attempt at improving the situation wrt. sysctl documentation, but this wasn't it.
* Add kernel support for sysctl descriptions. The NO_SYSCTL_DESCRIPTIONS optiondes1999-01-101-3/+48
| | | | | | | disables them if they're not wanted; in that case, sysctl_sysctl_descr will always return an empty string. Apporved by: jkh
* KNFize, by bde.eivind1999-01-1014-66/+59
|
* Remove a diagnostic message left in by mistake.dfr1999-01-091-3/+2
|
* Implement a mechanism for a module to report a small amount of moduledfr1999-01-092-3/+31
| | | | | specific data back to the user via kldstat(2). Use that mechanism in the syscall handler to report the syscall number used.
* Implement support for adding syscalls in KLD modules.dfr1999-01-091-0/+94
| | | | Submitted by: Assar Westerlund <assar@sics.se>
* Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT aseivind1999-01-0817-279/+134
| | | | | | | | | discussed on -hackers. Introduce 'KASSERT(assertion, ("panic message", args))' for simple check + panic. Reviewed by: msmith
* Changes to the LINUX_THREADS support to only allocate extra memory forjulian1999-01-073-36/+55
| | | | | | | | | | | | | | | | | | | | | | shared signal handling when there is shared signal handling being used. This removes the main objection to making the shared signal handling a standard ability in rfork() and friends and 'unconditionalising' this code. (i.e. the allocation of an extra 328 bytes per process). Signal handling information remains in the U area until such a time as it's reference count would be incremented to > 1. At that point a new struct is malloc'd and maintained in KVM so that it can be shared between the processes (threads) using it. A function to check the reference count and move the struct back to the U area when it drops back to 1 is also supplied. Signal information is therefore now swapable for all processes that are not sharing that information with other processes. THis should addres the concerns raised by Garrett and others. Submitted by: "Richard Seaman, Jr." <dick@tar.com>
* Remove a hard-coded table of kernel console I/O functions exportedyokota1999-01-071-18/+7
| | | | | | | | | | from sc, vt and sio drivers. Use instead a linker_set to collect them. Staticize ??cngetc(), ??cnputc(), etc functions in sc and vt drivers. We must still have siocngetc() and siocnputc() as globals because they are directly referred to by i386-gdbstub.c :-( Oked by: bde
* Add (but don't activate) code for a special VM option to makejulian1999-01-062-2/+56
| | | | | | | | | | | | | downward growing stacks more general. Add (but don't activate) code to use the new stack facility when running threads, (specifically the linux threads support). This allows people to use both linux compiled linuxthreads, and also the native FreeBSD linux-threads port. The code is conditional on VM_STACK. Not using this will produce the old heavily tested system. Submitted by: Richard Seaman <dick@tar.com>
* Don't allow more than one module with the same name to be loaded.msmith1999-01-051-4/+17
| | | | | | Make kldfind ignore the path when searching for a loaded module. Submitted by: John Birrell (jb@freebsd.org)
* Remove the 'waslocked' parameter to vfs_object_create().eivind1999-01-056-48/+24
|
* Finish staticization.eivind1999-01-052-10/+10
|
* Ifdefed conditionally used simplock variables.bde1999-01-023-5/+11
|
* Fixed bitrot in a comment. Fixed some style bugs.bde1999-01-011-5/+3
|
* When loading something that has undefined symbols, it would be helpful topeter1998-12-312-10/+26
| | | | know what they were..
* Various changes to support OSF1 emulation:dfr1998-12-302-7/+8
| | | | | | | | | | | * Move the user stack from VM_MAXUSER_ADDRESS to a place below the 32bit boundary (needed to support 32bit OSF programs). This should also save one pagetable per process. * Add cvtqlsv to the set of instructions handled by the floating point software completion code. * Disable all floating point exceptions by default. * A minor change to execve to allow the OSF1 image activator to support dynamic loading.
* Improved DDB_UNATTENDED behaviour. From the submitter:msmith1998-12-282-5/+9
| | | | | | | | | | | | | | | | | | | | | | There's something that's been bugging me for a while, so I decided to fix it. FreeBSD now will DTRT WRT DDB and DDB_UNATTENDED (!debugger_on_panic), at least in my opinion. The behavior change is such that: 1. Nothing changes when debugger_on_panic != 0. 2. When DDB_UNATTENDED (!debugger_on_panic), if a panic occurs, the machine will reboot. Also, if a trap occurs, the machine will panic and reboot, unlike how it broke to DDB before. HOWEVER, a trap inside DDB will not cause a panic, allowing full use of DDB without having to worry about the machine being stuck at a DDB prompt if something goes wrong during the day. Patches for this behavior follow my signature, and it would be a boon to anyone (like me) who uses DDB_UNATTENDED, but actually wants the machine to panic on a trap (otherwise, what's the use, if the machine causes a fatal trap rather than a true panic, of debugger_on_panic?). The changes cause no adverse behavior, but do involve two symbols becoming global Submitted by: Brian Feldman <green@unixhelp.org>
* Fix some 64bit truncation problems which crept into SYSCTL_LONG() with thedfr1998-12-273-39/+12
| | | | | | | | last cleanup. Since the oid_arg2 field of struct sysctl_oid is not wide enough to hold a long, the SYSCTL_LONG() macro has been modified to only support exporting long variables by pointer instead of by value. Reviewed by: bde
* Tweak ptrace(PT_READ_U) so that the last alpha register can be read.dfr1998-12-261-2/+5
|
* Restored rev.1.31 which was clobbered by rev.1.69 (the big Lite2bde1998-12-242-4/+6
| | | | | | | | | merge). This fixes at least hanging in revoke(2) when a somewhat active slave pty is revoked. The hang made the window for the null pointer bug in ufsspec_{read,write} much larger. There are many other bugs in this area (revoke of an active fifo at best leaks memory...).
* Adjust some comments to prevent future confusion on the implementation.dillon1998-12-221-6/+26
| | | | Also add a reference to the buf(9) manual page.
* Correctly handle misaligned VMIO buffer (whose start or end offset in the VMluoqi1998-12-221-77/+92
| | | | | | | | | object are not page aligned). This should fix the mount_msdos panic after a failed attemp to mount as ffs. Reviewed By: Matthew Dillon <dillon@apollo.backplane.com> Archie Cobbs <archie@whistle.com> Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
* Check return value of tsleep(). I've checked of all call points -eivind1998-12-222-8/+14
| | | | | | | | there does not seem to be a problem with this. PR: kern/8732 Analysis by: David G Andersen <danderse@cs.utah.edu> Tested by: Alfred Perlstein <bright@hotjobs.com>
* Staticize.eivind1998-12-212-18/+18
|
* Add asleep() and await() support. Currently highly experimental. Adillon1998-12-211-2/+189
| | | | | small support structure had to be added to the proc structure, and a few minor conditional panics no longer apply.
* Fix two bogons created by 'patch(1)' in my last commit.julian1998-12-191-2/+3
|
* Reviewed by: Luoqi Chen, Jordan Hubbardjulian1998-12-195-5/+161
| | | | | | | | | | | | Submitted by: "Richard Seaman, Jr." <lists@tar.com> Obtained from: linux :-) Code to allow Linux Threads to run under FreeBSD. By default not enabled This code is dependent on the conditional COMPAT_LINUX_THREADS (suggested by Garret) This is not yet a 'real' option but will be within some number of hours.
* Removed the cast to a pointer in the definition of PS_STRINGS andbde1998-12-161-4/+3
| | | | | | | adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change.
* Removed all traces of SYSCTL_INTPTR(). Pointers can't really be passedbde1998-12-161-5/+4
| | | | | | | | | across the kernel -> application interface, and for the one sysctl where they were passed and actually used (kern.ps_strings), the applications want addresses represented as u_longs anyway (the other sysctl that passed them, kern.usrstack, has never been used). Agreed to by: dfr, phk
* Removed bogus casts of USRSTACK and/or the other operand in binarybde1998-12-161-7/+4
| | | | expressions involving USRSTACK.
* Wrap two macros into do { ... } while (0), and fix the way they're useddes1998-12-152-4/+4
| | | | | | in the kernel. Reviewed by: bde
* fix intermediate overflow in 'quad = int * int' situation by castingdillon1998-12-141-2/+2
| | | | | | | the arguments to the multiply to a quad equivalent. In this case, vm_ooffset_t. Reviewed by: Archie Cobbs <archie@whistle.com>
* Fixed problems with kernel config file overrides of sysv semaphoredillon1998-12-142-3/+5
| | | | | | | parameters. Prior to this fix a kernel config override would effect only some of the kernel files, resulting in panics. PR: kern/9068
* Fix -Wuninitialized warning regarding zero-length var-args ctl element.dillon1998-12-141-2/+2
| | | | | ( this isn't really an error, but I think it is important to fix the warning ).
* Add a generic flag, CTLFLAG_SECURE, which can be used to mark a sysctltruckman1998-12-131-2/+3
| | | | | variable unwriteable when securelevel > 0. Reviewed by: jdp, eivind
* getpgid() and getsid() were doing a comparision rather than an assignment,truckman1998-12-131-5/+11
| | | | | which is fortunate, because otherwise another bug would allow them to be used to stomp on the syscall return value of another process.
* PR: kern/8965dillon1998-12-122-2/+6
| | | | | | | | | Obtained from: Stephen Clawson <sclawson@cs.utah.edu> Wakeup anyone waiting on a mount point prior to returning from umount, whether an error occurs or not. Fixes a stat/NFS-umount race and other potential future problems. Fix taken from bug/pr which also indicated that the same fix has already been applied to OpenBSD and NetBSD.
* When no driver was found for a device, the message 'not probed' appearedn_hibma1998-12-121-5/+5
| | | | | | | This is odd, especially in the case of USB where the driver is found in several tries: vendor specific, class specific, interface specific. The mouse driver is found at the interface specific level... Reviewed by: Doug Rabson (dfr@freebsd.org)
* Rename one of the two devfs_link's to devfs_makelink.eivind1998-12-101-3/+3
|
* poll(2) sets POLLNVAL for descriptors passed in that are less thanjkh1998-12-101-2/+4
| | | | | | | | 0. This makes it difficult to do efficient manipulation of the struct pollfd since you can't leave a slot empty. PR: 8599 Submitted-by: Marc Slemko <marcs@znep.com>
* In ktrwrite, use uio_procp = curproc vs 0rvb1998-12-101-2/+2
|
* Get rid of CTLTYPE_OPAQUE in a SYSCTL_OPAQUE - it is added my theeivind1998-12-091-2/+2
| | | | SYSCTL_OPAQUE macro.
* Backed out the FIOASYNC fix in rev.1.108. fcntl(fd, F_SETFL, flags)bde1998-12-081-2/+1
| | | | | | | | depends on the bug. It does an FIOASYNC ioctl to sync the setting of the O_ASYNC "file" flag with drivers even if the setting hasn't changed. PR: 9003
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-079-27/+11
| | | | and local variables, goto labels, and functions declared but not defined.
* Fix grouping of statements. This remove a potential panic in the softeivind1998-12-071-5/+5
| | | | | | updates code. While I'm here, remove an unintended trigraph. Reviewed by: Kirk McKusick <kirk@freebsd.org>
* Move stime declaration to main block, otherwise can left uninitializedache1998-12-071-2/+3
| | | | | in rare cases. Found by: Eivind Eklund <eivind@yes.no>
* Avoid compiler warning (printf arg type mismatch) when compiling #ifdef DEBUGarchie1998-12-061-2/+2
|
OpenPOWER on IntegriCloud