summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
Commit message (Collapse)AuthorAgeFilesLines
* bzero() the sigframe before we fill it. This was not done at all inmarcel2002-11-021-3/+4
| | | | linux_rt_sendsig() and only done for the fpstate in linux_sendsig().
* Style(9). Make some function declarations consistent with the rest,markm2002-10-193-24/+10
| | | | and remove some nearby extraneous {}'s.
* Fixed syntax errors and printf format errors.bde2002-10-121-3/+5
|
* - Add support for IPC_64 extensions into shmctl(2), semctl(2) and msgctl(2);sobomax2002-10-113-28/+218
| | | | | | | | | | | | | - add wrappers for mmap2(2) and ftruncate64(2) system calls; - don't spam console with printf's when VFAT_READDIR_BOTH ioctl(2) is invoked; - add support for SOUND_MIXER_READ_STEREODEVS ioctl(2); - make msgctl(IPC_STAT) and IPC_SET actually working by converting from BSD msqid_ds to Linux and vice versa; - properly return EINVAL if semget(2) is called with nsems being negative. Reviewed by: marcel Approved by: marcel Tested with: LSB runtime test
* Some kernel threads try to do significant work, and the default KSTACK_PAGESscottl2002-10-021-1/+1
| | | | | | | | | | | | | doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates. Reviewed by: jake, peter, jhb
* Back out last commit. Linux uses the old 4.3BSD sockaddr format.mini2002-09-244-14/+10
|
* Don't use compatability syscall wrappers in emulation code.mini2002-09-234-10/+14
| | | | | | This is needed for the COMPAT_FREEBSD3 option split. Reviewed by: alfred, jake
* Use the fields in the sysentvec and in the vm map header in place of thejake2002-09-211-1/+1
| | | | | | | | constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS. This is mainly so that they can be variable even for the native abi, based on different machine types. Get stack protections from the sysentvec too. This makes it trivial to map the stack non-executable for certain abis, on machines that support it.
* Removed unused includes. Sorted includes. This is part of removingbde2002-09-151-5/+1
| | | | | includes of <sys/user.h> for its pollution only. <sys/user.h> wasn't even used for its pollution here.
* Completely redo thread states.julian2002-09-111-0/+1
| | | | Reviewed by: davidxu@freebsd.org
* Tidy up some loose ends that bde pointed out. caddr_t bad, ok?peter2002-09-071-8/+7
| | | | | | | Move fill_kinfo_proc to before we copy the results instead of after the copy and too late. There is still more to do here.
* The true value of how the kernel was configured for KSTACK_PAGES was notpeter2002-09-071-6/+6
| | | | | | available at module compile time. Do not #include the bogus opt_kstack_pages.h at this point and instead refer to the variables that are also exported via sysctl.
* Diff reduction in comments for filling the siginfo structure - refer tojmallett2002-09-071-1/+1
| | | | | filling in the POSIX parts, when doing the same thing in every port of FreeBSD.
* Include <machine/pcb.h> instead of depending on namespace pollution inbde2002-09-071-0/+1
| | | | <sys/user.h>.
* Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions)peter2002-09-071-1/+10
| | | | | | | | if compiling with I686_CPU as a target. CPU_DISABLE_SSE will prevent this from happening and will guarantee the code is not compiled in. I am still not happy with this, but gcc is now generating code that uses these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher.
* Supposedly linux has added a 6th syscall arg register (%ebp). I am notpeter2002-09-071-0/+1
| | | | 100% sure if this is enough, but it will not harm anything.
* Give this a self contained a.out coredump routine.peter2002-09-071-1/+60
| | | | XXX freebsd-aout coredumps for a linux-aout binary is a bit pointless.
* Include <sys/systm.h> for the definition of offsetof() instead of dependingbde2002-09-051-0/+1
| | | | | on the definition being misplaced in <sys/types.h>. The definition probably belongs in <sys/stddef.h>.
* Split up ptrace() into a wrapper that does the copying to and fromiedowse2002-09-051-95/+52
| | | | | | | user space and a kern_ptrace() implementation. Use the kern_*() version in the Linux emulation code to remove more stack gap uses. Approved by: des
* Use the new kern_* functions to avoid the need to store argumentsiedowse2002-09-012-54/+28
| | | | | | | | in the stack gap. This converts most VFS and signal related system calls, as well as select(). Discussed on: -arch Approved by: marcel
* Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections tojake2002-09-011-2/+18
| | | | | | sysentvec. Initialized all fields of all sysentvecs, which will allow them to be used instead of constants in more places. Provided stack fixup routines for emulations that previously used the default.
* - Hold the vnode lock throughout execve.jeff2002-08-131-9/+15
| | | | | - Set VV_TEXT in the top level execve code. - Fixup the image activators to deal with the newly locked vnode.
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-041-1/+2
| | | | | | | | | | | | | | | - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking. Idea stolen from: BSD/OS
* Infrastructure tweaks to allow having both an Elf32 and an Elf64 executablepeter2002-07-202-5/+7
| | | | | | | | | | | | | | | handler in the kernel at the same time. Also, allow for the exec_new_vmspace() code to build a different sized vmspace depending on the executable environment. This is a big help for execing i386 binaries on ia64. The ELF exec code grows the ability to map partial pages when there is a page size difference, eg: emulating 4K pages on 8K or 16K hardware pages. Flesh out the i386 emulation support for ia64. At this point, the only binary that I know of that fails is cvsup, because the cvsup runtime tries to execute code in pages not marked executable. Obtained from: dfr (mostly, many tweaks from me).
* Enable emulation of the F_GETLK64, F_SETLK64, and F_SETLKW64robert2002-07-091-0/+4
| | | | lock commands arguments to linux_fcntl64().
* Part 1 of KSE-IIIjulian2002-06-292-2/+1
| | | | | | | | | | | | | The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
* Fix typo in the BSD copyright: s/withough/without/schweikh2002-06-023-3/+3
| | | | | Spotted and suggested by: des MFC after: 3 weeks
* o Fix race condition caused by doing ptrace() for permissionmarcel2002-05-191-24/+44
| | | | | | | | | | | checking, followed by a lookup of the process. Do not call ptrace() for permission checking, but do it inline. Spotted by: rwatson o While here, copy-in arguments before we lock. This fixes a possible permanent lock. Reviewed by: rwatson
* Hook up the new linux_ptrace implementation.marcel2002-05-191-1/+0
| | | | | PR: 33299 Submitted by: Alexander N. Kabaev <ak03@gte.com>
* Regen (linux_ptrace)marcel2002-05-193-5/+8
| | | | PR: 33299
* Sparkling new implementation of linux_ptrace. Slight tweaking bymarcel2002-05-192-1/+509
| | | | | | | yours truly. PR: 33299 Submitted by: Alexander N. Kabaev <ak03@gte.com>
* Spell "separate" correctly.eric2002-04-051-1/+1
|
* Moved signal handling and rescheduling from userret() to ast() so thatbde2002-04-041-0/+2
| | | | | | | | | | | they aren't in the usual path of execution for syscalls and traps. The main complication for this is that we have to set flags to control ast() everywhere that changes the signal mask. Avoid locking in userret() in most of the remaining cases. Submitted by: luoqi (first part only, long ago, reorganized by me) Reminded by: dillon
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Fixed some style bugs in the removal of __P(()). Continuation linesbde2002-03-241-5/+5
| | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting.
* Remove __P.alfred2002-03-203-163/+163
|
* Eliminate unnecessary calls to grow_stack() and useracc() from linux_sendsig()alc2002-03-191-49/+5
| | | | and linux_rt_sendsig(). (See i386/i386/machdep.c revisions 1.503 and 1.504.)
* Fix format warning.peter2002-02-271-1/+1
| | | | Submitted by: LINT, -Werror
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-1/+1
| | | | reference.
* Pre-KSE/M3 commit.julian2002-02-072-3/+4
| | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
* Clear the single-step flag for signal handlers. This fixes bogus tracebde2002-01-101-2/+2
| | | | | | | | | | | | | | | | traps on the first instruction of signal handlers. In trap.c:syscall(), fake a trace trap if the single-step flag was set on entry to the kernel, not if it will be set on exit from the kernel. This fixes bogus trace traps after the last instruction of signal handlers. gdb-4.18 (the version in FreeBSD) still has problems with the program in the PR. These seem to be due to bugs in gdb and not in FreeBSD, and are fixed in gdb-5.1 (the distribution version). PR: 33262 Tested by: k Macy <kip_macy@yahoo.com> MFC after: 1 day
* Convert BSD trap codes to i386.pb2001-11-201-2/+41
| | | | Submitted by: F. Gouget <fgouget@free.fr>
* Eliminate the prefix parameter to linux_emul_find(), which was alwaysdes2001-10-271-2/+2
| | | | | | | | linux_emul_path anyway. Linux_emul_find() has interesting bugs in its prefix handling (which luckily are not currently exploitable); this commit is preliminary to an attempt at cleaning it up. Approved by: marcel
* Implement linux_chown and linux_lchown. The fchown syscall mapsmarcel2001-10-164-20/+10
| | | | | | | directly to the native syscall, because no filename handling needs to be done. Tested by: Martin Blapp <mb@imp.ch>
* o Change prototype of linux_lchown and linux_chown so that themarcel2001-10-161-6/+5
| | | | | | | | | argument names match those on Alpha. o Map the fchown directly to FreeBSD. Since the old version of fchown is also mapped to the native fchown, give the new one type NODEF. Tested by: Martin Blapp <mb@imp.ch>
* In FreeBSD's ifreq, ifr_ifru.ifru_flags is an array of two chars, while Linuxdes2001-10-151-1/+1
| | | | | defines it as a short. Change that to an array of one short so that FreeBSD's ifr_flags macro will work (it evaluates to ifr_ifru.ifru_flags[0]).
* Oops, these already included sys/lock.h, they just did so afterjhb2001-10-112-2/+0
| | | | sys/mutex.h which is too late.
* Add missing includes of sys/lock.h.jhb2001-10-112-0/+2
|
* Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loaderps2001-10-101-1/+1
| | | | | | | tunable. Reviewed by: peter MFC after: 2 weeks
* Regen: Stop using linux_getpgid(). Use the native getpgid()marcel2001-09-283-9/+5
| | | | | | instead. PR: kern/21402
OpenPOWER on IntegriCloud