summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-1/+1
|
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-021-22/+22
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-021-2/+1
|
* Add M_WAITOKume2003-02-201-1/+1
|
* Back out M_* changes, per decision of the TRB.imp2003-02-1913-27/+27
| | | | Approved by: trb
* Use the proc lock to protect p_realtimer instead of Giant, and obtaintjr2003-02-171-3/+2
| | | | | | sched_lock around accesses to p_stats->p_timer[] to avoid a potential race with hardclock. getitimer(), setitimer() and the realitexpire() callout are now Giant-free.
* Remove #include <sys/dkstat.h>phk2003-02-162-2/+0
|
* Add MPSAFE comment to linux_sigpending().tjr2003-02-161-0/+3
|
* Obtain proc lock around modification of p_siglist in linux_wait4().tjr2003-02-141-0/+2
|
* 1) Linux_sendto was trashing the BSD sockaddr it put in the stackgap,dwmalone2003-02-081-14/+15
| | | | | | | | | | | | | | | so be more careful about calling stackgap_init. Tested by: Fred Souza <fred@storming.org> 2) Linux_sendmsg was forgetting to fill out the bsd_args struct. Reviewed by: ume 3) The args to linux_connect have differently named types on alpha and i386, so add a cast to stop gcc complaining. Spotted by: peter
* Avoid undefined symbol error with an IPv4 only kernel.ume2003-02-051-1/+9
| | | | Reported by: "Sergey A. Osokin" <osa@freebsd.org.ru>
* Add IPv6 support for Linuxlator.ume2003-02-031-88/+372
| | | | | Reviewed by: dwmalone MFC after: 10 days
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-021-3/+0
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
OpenPOWER on IntegriCloud