summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Print the return value from mmap() in the DEBUG case.mdodd2003-03-251-3/+11
|
* Sync up linux and svr compat elf fixup functions for exec(). Thesejhb2003-03-211-4/+6
| | | | | | | | | functions are now all basically identical except that alpha linux uses Elf64 arguments and svr4 and i386 linux use Elf32. The fixups include changing the first argument to be a register_t ** to match the prototype for fixup functions, asserting that the process in the image_params struct is always curproc and removing unnecessary locking to read credentials as a result, and a few style fixes.
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-181-1/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* Clean up whitespace and remove register keyword.des2003-03-034-49/+49
|
* More caddr_t removal, in conjunction with copy{in,out}(9) this time.des2003-03-034-25/+21
| | | | Also clean up some egregious casts and incorrect use of sizeof.
* Correctly map SIGSYS signal to/from Linux.kan2003-02-242-3/+3
| | | | Submitted by: "Georg-W. Koltermann" <g.w.k@web.de>
* Regen from syscalls.master 1.50.tjr2003-02-203-6/+6
|
* Mark linux_getpid(), linux_getuid() and linux_getgid() as MPSAFE.tjr2003-02-201-3/+3
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Mark linux_sigpending() as MPSAFE.tjr2003-02-161-1/+1
|
* Regen from syscalls.master 1.49.tjr2003-02-163-5/+11
|
* Add IPv6 support for Linuxlator.ume2003-02-031-0/+1
| | | | | Reviewed by: dwmalone MFC after: 10 days
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* 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
OpenPOWER on IntegriCloud