summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa formarcel2003-06-281-2/+4
| | | | | | | | | | | | | | | | the VMIN and VTIME members of the c_cc array. These members are not special control characters. By not excluding these members we changed the noncanonical mode input processing when both members were 0 on entry (=LINUX_POSIX_VDISABLE) as we would remap them to 255 (=_POSIX_VDISABLE). See termios(4) case A for how that screws up your terminal I/O. PR: 23173 Originator: Bjarne Blichfeldt <bbl@dk.damgaard.com> Patch by: Boris Nikolaus <bn@dali.tellique.de> (original submission) Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de> Reminders by: Joseph Holland King <gte743n@cad.gatech.edu> MFC after: 5 days
* Add a f_vnode field to struct file.phk2003-06-224-6/+6
| | | | | | | | | | | | Several of the subtypes have an associated vnode which is used for stuff like the f*() functions. By giving the vnode a speparate field, a number of checks for the specific subtype can be replaced simply with a check for f_vnode != NULL, and we can later free f_data up to subtype specific use. At this point in time, f_data still points to the vnode, so any code I might have overlooked will still work.
* Rename P_THREADED to P_SA. P_SA means a process is using schedulerdavidxu2003-06-151-1/+1
| | | | activations.
* Use __FBSDID().obrien2003-06-1015-44/+48
|
* Use __FBSDID().obrien2003-06-1014-28/+73
|
* Put definition of struct svr4_sockcache_entry in a .h file rather thanphk2003-05-314-13/+14
| | | | | | | having two independent definitions in two .c files. Fiddle surrounding details to match. Found by: FlexeLint
* Regenerate.peter2003-05-311-0/+447
|
* Make this compile with WITNESS enabled. It wants the syscall names.peter2003-05-312-2/+3
|
* Deal with the user VM space expanding. 32 bit applications do not likepeter2003-05-233-6/+6
| | | | | | | | | having their stack at the 512GB mark. Give 4GB of user VM space for 32 bit apps. Note that this is significantly more than on i386 which gives only about 2.9GB of user VM to a process (1GB for kernel, plus page table pages which eat user VM space). Approved by: re (blanket)
* Collect the nastiness for preserving the kernel MSR_GSBASE around thepeter2003-05-151-8/+1
| | | | | | | | | | load_gs() calls into a single place that is less likely to go wrong. Eliminate the per-process context switching of MSR_GSBASE, because it should be constant for a single cpu. Instead, save/restore it during the loading of the new %gs selector for the new process. Approved by: re (amd64/* blanket)
* Regenpeter2003-05-143-18/+43
| | | | Approved by: re (amd64 blanket)
* Add BASIC i386 binary support for the amd64 kernel. This is largelypeter2003-05-148-164/+472
| | | | | | | | | | | | | | | | | | | | | | stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that. Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place. On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized. Approved by: re (amd64/* blanket)
* - Merge struct procsig with struct sigacts.jhb2003-05-133-10/+21
| | | | | | | | | | | | | | | | | - 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)
* Don't #define memset() to bzero(), it is far too prone to bite somebody.phk2003-05-121-2/+0
| | | | Approved by: re/scottl
* Change the semantics of sysv shm emulation to take a additionalmbr2003-05-051-60/+73
| | | | | | | | | | | | | | | | | argument to the functions shm{at,ctl}1 and shm_find_segment_by_shmid{x}. The BSD semantics didn't allow the usage of shared segment after being marked for removal through IPC_RMID. The patch involves the following functions: - shmat - shmctl - shm_find_segment_by_shmid - shm_find_segment_by_shmidx - linux_shmat - linux_shmctl Submitted by: Orlando Bassotto <orlando.bassotto@ieo-research.it> Reviewed by: marcel
* Initialize tbuf in newstat_copyout() too.mbr2003-04-291-0/+1
| | | | Reviewed by: phk
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-04-293-6/+3
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* Do the same thing for stat64_copyout() as we alreadymbr2003-04-291-0/+19
| | | | | | | | | | | | do for newstat_copyout(). Lie about disk drives which are character devices in FreeBSD but block devices under Linux. PR: 37227 Submitted by: Vladimir B. Grebenschikov <vova@sw.ru> Reviewed by: phk MFC after: 2 weeks
* Argh! We want to return the old signal set when the error return is zerojhb2003-04-281-1/+1
| | | | | | | (i.e. success), not non-zero (failure). Submitted by: tegge Pointy hat to: jhb
* Use a switch to convert the Linux sigprocmask flags to the equivalentjhb2003-04-251-3/+14
| | | | | | | | | | | FreeBSD flags instead of just adding one to the Linux flags. This should be identical to the previous version except that I have at least one report of this patch fixing problems people were having with Linux apps after my last commit to this file. It is safer to use the switch then to make assumptions about the flag values anyways, esp. since we currently use MD defines for the values of the flags and this is MI code. Tested by: Michael Class <michael_class@gmx.net>
* Regen.jhb2003-04-253-34/+3
|
* Oops, the thr_* and jail_attach() syscall entries should be NOPROTO ratherjhb2003-04-251-7/+7
| | | | than STD.
* Add an ioctl handler for the DRM. This removes the need for the DRM_LINUXanholt2003-04-242-0/+17
| | | | option, which has been a source of frustration for many users.
* Regen.jhb2003-04-243-4/+58
|
* Fix the thr_create() entry by adding a trailing \. Also, sync up thejhb2003-04-241-4/+4
| | | | MP safe flag for thr_* with the main table.
* Fix a lock order reversal. Unlock the proc before calling fget().jhb2003-04-231-1/+1
| | | | Reported by: kris
* - Replace inline implementations of sigprocmask() with calls tojhb2003-04-223-301/+141
| | | | | | | 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.
* The proc lock is sufficient to test p_state against PRS_ZOMBIE, so don'tjhb2003-04-171-4/+0
| | | | needlessly lock sched_lock.
* Don't hold the proc lock while performing sigset conversions on localjhb2003-04-171-1/+1
| | | | variables.
* Use local struct proc variables to reduce repeated td->td_proc dereferencesjhb2003-04-172-16/+20
| | | | and improve readability.
* P_SHOULDSTOP used to be p_stat == SSTOP and needed the sched_lock, now itjhb2003-04-171-3/+3
| | | | | is protected by the proc lock and doesnt' need sched_lock, so adjust the locking appropriately.
* Don't include <sys/disklabel.h>phk2003-04-161-1/+0
|
* Explicitly cast a l_ulong to an unsigned long to make all arch's happyjhb2003-04-161-1/+1
| | | | with the printf format.
* Fix printf format in a debug printf.jhb2003-04-161-1/+1
|
* Fix multiple printf warnings on Alpha:jhb2003-04-161-19/+19
| | | | | | - Prefer long long to quad_t to match printf args. - Use uintmax_t and %j to print segsz_t and vm_size_t values. - Fix others in Alpha-specific code.
* o In struct prison, add an allprison linked list of prisons (protectedmike2003-04-091-0/+1
| | | | | | | | | | | | | | | by allprison_mtx), a unique prison/jail identifier field, two path fields (pr_path for reporting and pr_root vnode instance) to store the chroot() point of each jail. o Add jail_attach(2) to allow a process to bind to an existing jail. o Add change_root() to perform the chroot operation on a specified vnode. o Generalize change_dir() to accept a vnode, and move namei() calls to callers of change_dir(). o Add a new sysctl (security.jail.list) which is a group of struct xprison instances that represent a snapshot of active jails. Reviewed by: rwatson, tjr
* Add #include <sys/conf.h> so we don't rely on <sys/disk.h> doing it.phk2003-04-011-0/+1
|
* Don't include <sys/buf.h> needlessly.phk2003-04-011-1/+2
|
* - Add thr and umtx system calls.jeff2003-04-011-0/+8
|
* - Add a placeholder for sigwaitjeff2003-03-311-0/+1
|
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withjeff2003-03-313-28/+30
| | | | | | | 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.
* Fix an XXX: and implement LINUX_BLKGETSIZE correctly.phk2003-03-281-6/+14
|
* Add a cleanup function to destroy the osname_lock and call it on modulejhb2003-03-262-0/+9
| | | | | | | unload. Submitted by: gallatin Reported by: Martin Karlsson <mk-freebsd@bredband.net>
* Sync up linux and svr compat elf fixup functions for exec(). Thesejhb2003-03-211-8/+8
| | | | | | | | | 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.
* Use td->td_ucred instead of td->td_proc->p_ucred.jhb2003-03-202-5/+4
|
* Backout the getcwd changes, a more comprehensive effort will be needed.phk2003-03-201-2/+409
|
* (This commit certainly increases the need for a wash&clean of vfs_cache.c,phk2003-03-171-409/+2
| | | | | | | | | | | | | | | | | but I decided that it was important for this patch to not bit-rot, and since it is mainly moving code around, the total amount of entropy is epsilon /phk) This is a patch to move the common parts of linux_getcwd() back into kern/vfs_cache.c so that the standard FreeBSD libc getcwd() can use it's extended functionality. The linux syscall linux_getcwd() in compat/linux/linux_getcwd.c has been rewritten to use it too. It should be possible to simplify libc's getcwd() after this. No doubt this code needs some cleaning up, since I've left in the sysctl variables I used for debugging. PR: 48169 Submitted by: James Whitwell <abacau@yahoo.com.au>
* - Change the linux_[gs]et_os{name, release, s_version}() functions tojhb2003-03-135-115/+109
| | | | | | | | | | | | | take a thread instead of a proc for their first argument. - Add a mutex to protect the system-wide Linux osname, osrelease, and oss_version variables. - Change linux_get_prison() to take a thread instead of a proc for its first argument and to use td_ucred rather than p_ucred. This is ok because a thread's prison does not change even though it's ucred might. - Also, change linux_get_prison() to return a struct prison * instead of a struct linux_prison * since it returns with the struct prison locked and this makes it easier to safely unlock the prison when we are done messing with it.
* Clean up whitespace and remove register keyword.des2003-03-036-48/+48
|
* More caddr_t removal, in conjunction with copy{in,out}(9) this time.des2003-03-038-94/+78
| | | | Also clean up some egregious casts and incorrect use of sizeof.
OpenPOWER on IntegriCloud