summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
Commit message (Collapse)AuthorAgeFilesLines
* Use linux_emul_convpath() rather than linux_emul_find() asjhb2005-02-071-7/+6
| | | | linux_emul_find() is going away.
* Use the LCONVPATHEXIST() macro rather than it's exact expansion to bejhb2005-02-071-4/+1
| | | | consistent.
* When running Linux binaries, set up the initial FPU state as Linuxdas2005-02-061-0/+7
| | | | | | would. PR: 28966
* o Split out kernel part of execve(2) syscall into two parts: one thatsobomax2005-01-293-18/+21
| | | | | | | | | | | copies arguments into the kernel space and one that operates completely in the kernel space; o use kernel-only version of execve(2) to kill another stackgap in linuxlator/i386. Obtained from: DragonFlyBSD (partially) MFC after: 2 weeks
* o Move copyin()/copyout() out of i386_{get,set}_ldt() andsobomax2005-01-261-43/+34
| | | | | | | | | i386_{get,set}_ioperm() and make those APIs visible in the kernel namespace; o use i386_{get,set}_ldt() and i386_{get,set}_ioperm() instead of sysarch() in the linuxlator, which allows to kill another two stackgaps. MFC after: 2 weeks
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* Axe the semblance of support for PECOFF and Linux a.out core dumps.das2004-11-271-52/+2
|
* Maintain the broken state of backwards compatibilty for a.out (anddas2004-11-201-2/+3
| | | | | | | PECOFF!) core dumps. None of the old versions of gdb I tried were able to read a.out core dumps before or after this change. Reviewed by: arch@
* Fix the following race:das2004-10-011-3/+4
| | | | | | | | | | | 1. Process p1 is currently being swapped in. 2. Process p2 calls linux_ptrace(PTRACE_GETFPXREGS, p1_pid, ...) 3. After acquiring a reference to FIRST_THREAD_IN_PROC(p1), p2 blocks in faultin() while p1 finishes being swapped in. This means p2 won't get back the lock on p1 until after p1's threads are runnable. 4. After p1 is swapped in, the first thread in p1 exits. 5. p2 now uses its dangling reference to p1's first thread.
* Regen.dfr2004-09-063-6/+22
|
* Add a few stub syscalls to get TransGaming's winex a bit closer todfr2004-09-062-3/+30
| | | | working.
* Give setrunqueue() and sched_add() more of a clue as tojulian2004-09-011-1/+1
| | | | | | where they are coming from and what is expected from them. MFC after: 2 days
* Correct the arguments to kern_sigaltstack() as they were reversed.jhb2004-08-241-2/+2
| | | | | PR: kern/68079 Submitted by: Georg-W. Koltermann gwk at rahn-koltermann dot de
* Regenerate after fcntl() wrappers were marked MP safe.jhb2004-08-243-5/+5
|
* Fix the ABI wrappers to use kern_fcntl() rather than calling fcntl()jhb2004-08-241-2/+2
| | | | | | | | directly. This removes a few more users of the stackgap and also marks the syscalls using these wrappers MP safe where appropriate. Tested on: i386 with linux acroread5 Compiled on: i386, alpha LINT
* Add a new type, l_uintptr_t, which is an unsigned integer type with thetjr2004-08-161-0/+4
| | | | | same width as a pointer under Linux. Add two new macros, PTRIN and PTROUT, which convert between l_uintptr_t and native pointers.
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-1/+1
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Consistently use __inline instead of __inline__ as the former is an empty macrostefanf2004-07-041-1/+1
| | | | in <sys/cdefs.h> for compilers without support for inline.
* Add casts so all these quantities are a constant type.obrien2004-06-241-1/+1
|
* Change the types of vn_rdwr_inchunks()'s len and aresid arguments totjr2004-06-051-1/+1
| | | | | | size_t and size_t *, respectively. Update callers for the new interface. This is a better fix for overflows that occurred when dumping segments larger than 2GB to core files.
* Use the BSD madvise() syscall implementation for Linux binary emulation,bms2004-03-285-8/+3
| | | | | | | | instead of treating it as an unimplemented syscall. This appears to make StarOffice 7.0 Linux binaries work according to submitter; also tested with nvidia driver by submitter. Submitted by: Matthias Schuendehuette
* Regenerate.jhb2004-03-153-6/+6
|
* - Mark ABI syscalls that call wait4() MP safe as recent changes tojhb2004-03-151-3/+3
| | | | | | the kernel wait4() made these all panic() implementations otherwise. - The i386 linux_ptrace() syscall is MP safe. Alpha was already marked MP safe.
* Regen.jhb2004-02-043-6/+6
|
* The following compat syscalls are now mpsafe: linux_getrlimit(),jhb2004-02-041-3/+3
| | | | | | | linux_setrlimit(), linux_old_getrlimit(), osf1_getrlimit(), osf1_setrlimit(), svr4_sys_ulimit(), svr4_sys_setrlimit(), svr4_sys_getrlimit(), svr4_sys_setrlimit64(), svr4_sys_getrlimit64(), ibcs2_sysconf(), and ibcs2_ulimit().
* Locking for the per-process resource limits structure.jhb2004-02-042-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists. Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
* Make sigaltstack as per-threaded, because per-process sigaltstack statedavidxu2004-01-031-2/+2
| | | | | | | | | | | is useless for threaded programs, multiple threads can not share same stack. The alternative signal stack is private for thread, no lock is needed, the orignal P_ALTSTACK is now moved into td_pflags and renamed to TDP_ALTSTACK. For single thread or Linux clone() based threaded program, there is no semantic changed, because those programs only have one kernel thread in every process.
* Make sigaltstack as per-threaded, because per-process sigaltstack statedavidxu2004-01-031-9/+9
| | | | | | | | | | | | | is useless for threaded programs, multiple threads can not share same stack. The alternative signal stack is private for thread, no lock is needed, the orignal P_ALTSTACK is now moved into td_pflags and renamed to TDP_ALTSTACK. For single thread or Linux clone() based threaded program, there is no semantic changed, because those programs only have one kernel thread in every process. Reviewed by: deischen, dfr
* Sorted includes. Removed duplicates exposed by this.bde2003-12-291-12/+9
|
* GC unused 'syshide' override to /dev/null. This was here to disablepeter2003-12-241-1/+0
| | | | | the output of the namespc column. Its functionality was removed some time ago, but the overrides and the namespc column remained.
* Regen (should be a NOP except for rcsid changes)peter2003-12-233-3/+3
|
* GC unused third namespace column.peter2003-12-231-311/+268
|
* Add an additional field to the elf brandinfo structure to supportpeter2003-12-231-2/+4
| | | | | quicker exec-time replacement of the elf interpreter on an emulation environment where an entire /compat/* tree isn't really warranted.
* Pull latest changes from OpenBSD:sobomax2003-11-165-1/+181
| | | | | | | | | | | - improve sysinfo(2) syscall; - add dummy fadvise64(2) syscall; - add dummy *xattr(2) family of syscalls; - add protos for the syscalls 222-225, 238-249 and 253-267; - add exit_group(2) syscall, which is currently just wired to exit(2). Obtained from: OpenBSD MFC after: 2 weeks
* Regen.jhb2003-11-073-74/+76
|
* Sync up MP safe flags with global syscalls.master for the first time. Thisjhb2003-11-071-68/+68
| | | | | | | | | | | | | | | | | | | | includes read(), write(), close(), linux_setuid16(), linux_getuid16(), linux_pause(), linux_nice(), linux_kill(), dup(), linux_pipe(), linux_setgid16(), linux_getgid16(), linux_signal(), linux_geteuid16(), linux_getegid16(), acct(), setpgid(), umask(), dup2(), getppid(), getpgrp(), setsid(), linux_sigaction(), linux_sgetmask(), linux_ssetmask(), linux_setreuid16(), linux_setregid16(), linux_sigsuspend(), getrusage(), gettimeofday(), linux_getgroups16(), linux_setgroups16(), getpriority(), setpriority(), linux_sigreturn(), linux_clone(), linux_sigprocmask(), linux_getsid(), mlock(), munlock(), mlockall(), munlockall(), sched_setparam(), sched_getparam(), linux_sched_setscheduler(), linux_sched_getscheduler(), linux_sched_get_priority_max(), linux_sched_get_priority_min(), sched_rr_get_interval(), linux_setresuid16(), linux_getresuid16(), linux_setresgid16(), linux_getresgid16(), linux_rt_sigaction(), linux_rt_sigprocmask(), linux_rt_sigsuspend(), geteuid(), getegid(), setreuid(), setregid(), linux_getgroups(), linux_setgroups(), setresuid(), getresuid(), setresgid(), getresgid(), setuid(), and setgid().
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitpeter2003-09-251-2/+4
| | | | | | | | | | | | | | | | | | | | | systems where the data/stack/etc limits are too big for a 32 bit process. Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c. Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy. Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced. Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does. Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things.
* Restored non-egregious casts so that this file compiles on i386's withbde2003-09-071-3/+4
| | | | 64-bit longs again.
* Rename P_THREADED to P_SA. P_SA means a process is using schedulerdavidxu2003-06-151-1/+1
| | | | activations.
* Use __FBSDID().obrien2003-06-027-12/+20
|
* - Merge struct procsig with struct sigacts.jhb2003-05-131-3/+13
| | | | | | | | | | | | | | | | | - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson)
* Provide exec_linux_setregs() to override exec_setregs().mdodd2003-05-111-2/+21
| | | | | | | | Linux initializes %gs to 0. Mimic this behavior. Submitted by: Christian Zander <zander@minion.de> Reviewed by: jake Approved by: re
* Prefer the proc lock to sched_lock when testing PS_INMEM now that it isjhb2003-04-221-16/+8
| | | | safe to do so.
* Synchronize the two linux_clone() implementations which includes a fewjhb2003-04-181-22/+22
| | | | minor cleanups in both.
* Don't drop the proc lock just to reacquire it after a few simple assignmentjhb2003-04-171-2/+0
| | | | statements. Just hold the lock the entire time.
* Sync up with changes to ptrace() and use P_SHOULDSTOP instead ofjhb2003-04-151-1/+1
| | | | | | a duplicate P_TRACED check. Submitted by: marcel
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withjeff2003-03-312-7/+7
| | | | | | | a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK.
* - Change trapsignal() to accept a thread and not a proc.jeff2003-03-311-2/+2
| | | | | | | - Change all consumers to pass in a thread. Right now this does not cause any functional changes but it will be important later when signals can be delivered to specific threads.
* Add missing includes from previous commit.jhb2003-03-271-0/+1
| | | | Reported by: des
* Add a cleanup function to destroy the osname_lock and call it on modulejhb2003-03-261-0/+1
| | | | | | | unload. Submitted by: gallatin Reported by: Martin Karlsson <mk-freebsd@bredband.net>
OpenPOWER on IntegriCloud