summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2
Commit message (Collapse)AuthorAgeFilesLines
* Back out M_* changes, per decision of the TRB.imp2003-02-193-4/+4
| | | | Approved by: trb
* Split the global timezone structure into two integer fields tophk2003-02-031-2/+2
| | | | | | | | | | prevent the compiler from optimizing assignments into byte-copy operations which might make access to the individual fields non-atomic. Use the individual fields throughout, and don't bother locking them with Giant: it is no longer needed. Inspired by: tjr
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-213-4/+4
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Bow to the whining masses and change a union back into void *. Retaindillon2003-01-132-3/+3
| | | | | removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it.
* Change struct file f_data to un_data, a union of the correct structdillon2003-01-122-3/+3
| | | | | | | | | | pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-2/+2
| | | | especially in troff files.
* SCARGS removal take II.alfred2002-12-149-324/+319
|
* Backout removal SCARGS, the code freeze is only "selectively" over.alfred2002-12-139-319/+324
|
* Remove SCARGS.alfred2002-12-139-324/+319
| | | | 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.
* use __packed.alfred2002-09-231-1/+1
|
* 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.
* - Fix iBCS2 emulation of COFF files that have multiple librariesrobert2002-09-091-3/+7
| | | | | | | | | in their library (STYP_LIB) section. - Attempt to make the code which calculates the next entry and string offsets look clearer. PR: kern/42580 Tested by: Olaf Klein <ok@adimus.de> (on 4.7-PRERELEASE)
* Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections tojake2002-09-011-4/+27
| | | | | | 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.
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-1/+1
|
* In continuation of early fileop credential changes, modify fo_ioctl() torwatson2002-08-172-9/+15
| | | | | | | | | | | | | | | | | | | | | | accept an 'active_cred' argument reflecting the credential of the thread initiating the ioctl operation. - Change fo_ioctl() to accept active_cred; change consumers of the fo_ioctl() interface to generally pass active_cred from td->td_ucred. - In fifofs, initialize filetmp.f_cred to ap->a_cred so that the invocations of soo_ioctl() are provided access to the calling f_cred. Pass ap->a_td->td_ucred as the active_cred, but note that this is required because we don't yet distinguish file_cred and active_cred in invoking VOP's. - Update kqueue_ioctl() for its new argument. - Update pipe_ioctl() for its new argument, pass active_cred rather than td_ucred to MAC for authorization. - Update soo_ioctl() for its new argument. - Update vn_ioctl() for its new argument, use active_cred rather than td->td_ucred to authorize VOP_IOCTL() and the associated VOP_GETATTR(). Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* - Hold the vnode lock throughout execve.jeff2002-08-131-9/+13
| | | | | - Set VV_TEXT in the top level execve code. - Fixup the image activators to deal with the newly locked vnode.
* Add necessary instrumentation to IBCS2 emulation support for mandatoryrwatson2002-08-121-0/+15
| | | | | | | | | access control: as with SVR4, very few changes required since almost all services are implemented by wrapping existing native FreeBSD system calls. Only readdir() calls need additional instrumentation. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* - 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-201-1/+1
| | | | | | | | | | | | | | | 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).
* Fix typo in the BSD copyright: s/withough/without/schweikh2002-06-024-4/+4
| | | | | Spotted and suggested by: des MFC after: 3 weeks
* Fix warnings; deprecated use of label at end of compound statementpeter2002-05-241-0/+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
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-013-4/+4
| | | | | | | | | | | | 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@
* Remove __P.alfred2002-03-2012-112/+112
|
* Fix warnings (prototype for nonexisting static function)peter2002-02-281-2/+0
|
* Use td_ucred and thus remove now unneeded proc lock acquire and release.jhb2002-02-271-3/+1
|
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-273-6/+6
| | | | reference.
* Use the updated getcredhostname() function.robert2002-02-273-4/+3
|
* - Use the new getcredhostname function in xenix_utsname(),robert2002-02-273-4/+9
| | | | | | ibcs2_getipdomainname(), and ibcs2_utssys(). Reviewed by: phk
* Lock struct pgrp, session and sigio.tanimura2002-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | New locks are: - pgrpsess_lock which locks the whole pgrps and sessions, - pg_mtx which protects the pgrp members, and - s_mtx which protects the session members. Please refer to sys/proc.h for the coverage of these locks. Changes on the pgrp/session interface: - pgfind() needs the pgrpsess_lock held. - The caller of enterpgrp() is responsible to allocate a new pgrp and session. - Call enterthispgrp() in order to enter an existing pgrp. - pgsignal() requires a pgrp lock held. Reviewed by: jhb, alfred Tested on: cvsup.jp.FreeBSD.org (which is a quad-CPU machine running -current)
* Pre-KSE/M3 commit.julian2002-02-071-3/+5
| | | | | | | | | | 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,
* Replace ffind_* with fget calls.alfred2002-01-142-4/+4
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-134-68/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-1/+1
| | | | also don't use ANSI string concatenation.
* Handle the IBCS2 FIONREAD ioctl. I have only tested that thisiedowse2001-11-161-0/+1
| | | | | | | compiles, but the patch looks reasonable. PR: i386/5784 Submitted by: Remy NONNENMACHER <remy@synx.com>
* KSE Milestone 2julian2001-09-1218-481/+499
| | | | | | | | | | | | | | 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
* Synchronize syscalls.master(s) with recent Giant pushdown workdillon2001-09-011-3/+3
|
* add <sys/sytm.h> (for cpufunc.h -> rdtsc)assar2001-07-211-0/+1
|
* Fix setting serial baud rate under ibcs2 emulation by moving a line to thejon2001-07-201-2/+2
| | | | | | | | | right place. Reported by Jonathan Chen <jonc@pinnacle.co.nz> (someone with the same name who's not me) PR: i386/8414 Submitted by: Jonathan Chen <jonc@pinnacle.co.nz> MFC after: 2 weeks
* Add a new MI pointer to the process' trapframe p_frame instead of usingjhb2001-06-293-3/+3
| | | | | | various differently named pointers buried under p_md. Reviewed by: jake (in principle)
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-016-8/+17
| | | | | | | | | | | 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)
* Add missing includes of <sys/sx.h>jhb2001-03-281-0/+1
| | | | Reported by: peter
* Convert the allproc and proctree locks from lockmgr locks to sx locks.jhb2001-03-281-2/+2
|
* Fix typo: seperate -> separate.asmodai2001-02-061-1/+1
| | | | Seperate does not exist in the english language.
* Back out proc locking to protect p_ucred for obtaining additionaljhb2001-01-272-29/+7
| | | | references along with the actual obtaining of additional references.
* Use queue macros.jhb2001-01-241-1/+1
|
* Proc locking.jhb2001-01-236-8/+41
|
OpenPOWER on IntegriCloud