summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2/ibcs2_signal.c
Commit message (Collapse)AuthorAgeFilesLines
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-161-1/+1
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Backout previous change (disabling of security checks for signals deliveredsobomax2005-02-131-1/+1
| | | | | | in emulation layers), since it appears to be too broad. Requested by: rwatson
* Split out kill(2) syscall service routine into user-level and kernel part, thesobomax2005-02-131-1/+1
| | | | | | | | | | | | | | | | | former is callable from user space and the latter from the kernel one. Make kernel version take additional argument which tells if the respective call should check for additional restrictions for sending signals to suid/sugid applications or not. Make all emulation layers using non-checked version, since signal numbers in emulation layers can have different meaning that in native mode and such protection can cause misbehaviour. As a result remove LIBTHR from the signals allowed to be delivered to a suid/sugid application. Requested (sorta) by: rwatson MFC after: 2 weeks
* /* -> /*- for license, add FreeBSD tagimp2005-01-061-1/+1
|
* Fix a multitude of security bugs in the iBCS2 emulator:tjr2003-10-121-2/+7
| | | | | | | | | | | | | | | | | | | | - Return NULL instead of returning memory outside of the stackgap in stackgap_alloc() (FreeBSD-SA-00:42.linux) - Check for stackgap_alloc() returning NULL in ibcs2_emul_find(); other calls to stackgap_alloc() have not been changed since they are small fixed-size allocations. - Replace use of strcpy() with strlcpy() in exec_coff_imgact() to avoid buffer overflow - Use strlcat() instead of strcat() to avoid a one byte buffer overflow in ibcs2_setipdomainname() - Use copyinstr() instead of copyin() in ibcs2_setipdomainname() to ensure that the string is null-terminated - Avoid integer overflow in ibcs2_setgroups() and ibcs2_setgroups() by checking that gidsetsize argument is non-negative and no larger than NGROUPS_MAX. - Range-check signal numbers in ibcs2_wait(), ibcs2_sigaction(), ibcs2_sigsys() and ibcs2_kill() to avoid accessing array past the end (or before the start)
* Use __FBSDID().obrien2003-06-021-2/+3
|
* - Replace inline implementations of sigprocmask() with calls tojhb2003-04-221-133/+56
| | | | | | | kern_sigprocmask() in the various binary compatibility emulators. - Replace calls to sigsuspend(), sigaltstack(), sigaction(), and sigprocmask() that used the stackgap with calls to the corresponding kern_sig*() functions instead without using the stackgap.
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withjeff2003-03-311-15/+16
| | | | | | | 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.
* SCARGS removal take II.alfred2002-12-141-36/+36
|
* Backout removal SCARGS, the code freeze is only "selectively" over.alfred2002-12-131-36/+36
|
* Remove SCARGS.alfred2002-12-131-36/+36
| | | | Reviewed by: md5
* Back our kernel support for reliable signal queues.jmallett2002-10-011-2/+1
| | | | Requested by: rwatson, phk, and many others
* Add a missing include.jmallett2002-10-011-0/+1
|
* When working with sigset_t's, and needing to perform masking operations basedjmallett2002-10-011-1/+1
| | | | | | on a process's pending signals, use the signal queue flattener, ksiginfo_to_sigset_t, on the process, and on a local sigset_t, and then work with that as needed.
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-1/+1
|
* Moved signal handling and rescheduling from userret() to ast() so thatbde2002-04-041-0/+3
| | | | | | | | | | | 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
* Remove __P.alfred2002-03-201-6/+6
|
* KSE Milestone 2julian2001-09-121-28/+32
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-0/+2
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Proc locking.jhb2001-01-231-3/+14
|
* Avoid using the osig* syscalls.marcel1999-10-101-21/+28
|
* sigset_t change (part 4 of 5)marcel1999-09-291-41/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- The compatibility code and/or emulators have been updated: iBCS2 now mostly uses the older syscalls. SVR4 now properly handles all signals. This has been achieved by using the new sigset_t throughout the emulator. The Linuxulator has been severely updated. Internally the new Linux sigset_t is made the default. These are then mapped to and from the new FreeBSD sigset_t. Also, rt_sigsuspend has been implemented in the Linuxulator. Implementing this syscall basicly caused all this sigset_t changing in the first place and the syscall has been used throughout the change as a means for testing. It basicly is too much work to undo the implementation so that it can later be added again. A special note on the use of sv_sigtbl and sv_sigsize in struct sysentvec: Every signal larger than sv_sigsize is not translated and is passed on to the signal handler unmodified. Signals in the range 1 upto and including sv_sigsize are translated. The rationale is that only the system defined signals need to be translated. The emulators also have been updated so that the translation tables are only indexed for valid (system defined) signals. This change also fixes the translation bug already in the SVR4 emulator.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Rename struct members sa_siginfo. POSIX reserves identifiers startingcracauer1999-07-061-8/+8
| | | | | | | with sa_ when <signal.h> is included. They would conflict with the upcoming SA_SIGINFO implementation. Reviewed by: BDE
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-28/+21
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* Removed unused #includes.bde1997-07-201-8/+1
|
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Perform special sigset() check.swallace1996-12-081-2/+14
| | | | | Make sure signal is not blocked. If it is, return SIG_HOLD instead of handler and unblock the signal.
* In bsd_to_ibcs2_sigaction(), flag for ibcs2 system should beswallace1995-10-211-2/+2
| | | | | | IBCS2_SA_NOCLDSTOP and not SA_NOCLDSTOP. Submitted by: bde
* sigset() should have sa_flags cleared to sig is maked before callingswallace1995-10-211-23/+27
| | | | | | | | | | handler (remove SA_NODEFER). On the other hand, signal() case should set sa_flags to SA_NODEFER as in previous change. In addition, added #ifdef'd code for signal() to or in SA_RESETHAND flag for when that compatability is implemented.
* Use sa_flag option SA_NODEFER in sigsys() emulation because SVR3swallace1995-10-191-5/+5
| | | | does not automatically mask signal upon delivery.
* Remove old files no longer needed.swallace1995-10-101-375/+388
| | | | | | | | | | | | | | | | | | | | | Add new files created for emulator. Modify NetBSD import to work with FreeBSD and add new features and code. The complete emulator is essentially a combination of work/code implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself, Steven Wallace. Features of this new emulator system include: o "clean" code, including strict prototyping. o Auto-generation of ibcs2 system calls, xenix system calls, isc system calls. Generation includes system tables, structure definitions, and prototyping of function calls. o ibcs2 emulator does not rely on any COMPAT_43 system calls. o embedded socksys support o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel o alternate /emul/ibcs2 namespace searched first for files in ibcs2 system. Usefull to keep sysv libraries, binaries in /emul/ibcs2. o many other finer details and functions fixed or implemented.
* Remove trailing whitespace.rgrimes1995-05-301-24/+24
|
* iBCS2 emulator core files.sos1994-10-141-0/+462
This is the main files for the iBCS2 emulator. It can be use compiled into the kernel by using: options IBCS2 options COMPAT_IBCS2 or as a lkm module using: options COMPAT_IBCS2 and then loading it via the ibcs2 script in /usr/bin REMEMBER: this code is still experimental ! NO WARRENTY ! Submitted by: sef@kithrup.com, mostyn@mrl.com, sos@kmd-ac.dk
OpenPOWER on IntegriCloud