summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Remove the process state PRS_WAIT.julian2002-10-211-3/+0
| | | | | | It is never used. I left it there from pre-KSE days as I didn't know if I'd need it or not but now I know I don't.. It's functionality is in TDI_IWAIT in the thread.
* Stake a claim on 418 (__xstat), 419 (__xfstat), 420 (__xlstat)peter2002-10-191-0/+3
|
* Grab 416/417 real estate before I get burned while testing again.peter2002-10-191-0/+2
| | | | | | This is for the not-quite-ready signal/fpu abi stuff. It may not see the light of day, but I'm certainly not going to be able to validate it when getting shot in the foot due to syscall number conflicts.
* Implement the CDROMREADAUDIO ioctl.marcel2002-10-191-1/+37
|
* Add a placeholder for the execve_mac() system call, similar to SELinux'srwatson2002-10-191-0/+1
| | | | | | | | | | | | execve_secure() system call, which permits a process to pass in a label for a label change during exec. This permits SELinux to change the label for the resulting exec without a race following a manual label change on the process. Because this interface uses our general purpose MAC label abstraction, we call it execve_mac(), and wrap our port of SELinux's execve_secure() around it with appropriate sid mappings. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Replace the conventional usage of strncpy() by using strlcpy().robert2002-10-172-13/+5
|
* - Use strlcpy() rather than strncpy() to copy NUL terminatedrobert2002-10-171-6/+6
| | | | | strings. - Pass the correct buffer size to getcredhostname().
* - Add support for IPC_64 extensions into shmctl(2), semctl(2) and msgctl(2);sobomax2002-10-114-23/+318
| | | | | | | | | | | | | - 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
* re-regen. Sigh.peter2002-10-093-7/+7
|
* Sigh. Fix fat-fingering of diff. I knew this was going to happen.peter2002-10-091-1/+1
|
* regenerate. sendfile stuff and other recently picked up stubs.peter2002-10-093-12/+54
|
* Try and deal with the #ifdef COMPAT_FREEBSD4 sendfile stuff. This wouldpeter2002-10-092-2/+25
| | | | have been a lot easier if do_sendfile() was usable externally.
* Try and patch up some tab-to-space spammage.peter2002-10-091-19/+19
|
* Add placeholder stubs for nsendfile, mac_syscall, ksem_close, ksem_post,peter2002-10-091-0/+22
| | | | | | ksem_wait, ksem_trywait, ksem_init, ksem_open, ksem_unlink, ksem_getvalue, ksem_destroy, __mac_get_pid, __mac_get_link, __mac_set_link, extattr_set_link, extattr_get_link, extattr_delete_link.
* Integrate mac_check_socket_send() and mac_check_socket_receive()rwatson2002-10-061-0/+17
| | | | | | | | | | checks from the MAC tree: allow policies to perform access control for the ability of a process to send and receive data via a socket. At some point, we might also pass in additional address information if an explicit address is requested on send. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Let kse_wakeup() take a KSE mailbox pointer argument.archie2002-10-022-2/+2
| | | | Reviewed by: julian
* Back our kernel support for reliable signal queues.jmallett2002-10-015-9/+4
| | | | Requested by: rwatson, phk, and many others
* First half of implementation of ksiginfo, signal queues, and such. Thisjmallett2002-09-305-4/+9
| | | | | | | | | | | | | | | | | | | | | | gets signals operating based on a TailQ, and is good enough to run X11, GNOME, and do job control. There are some intricate parts which could be more refined to match the sigset_t versions, but those require further evaluation of directions in which our signal system can expand and contract to fit our needs. After this has been in the tree for a while, I will make in kernel API changes, most notably to trapsignal(9) and sendsig(9), to use ksiginfo more robustly, such that we can actually pass information with our (queued) signals to the userland. That will also result in using a struct ksiginfo pointer, rather than a signal number, in a lot of kern_sig.c, to refer to an individual pending signal queue member, but right now there is no defined behaviour for such. CODAFS is unfinished in this regard because the logic is unclear in some places. Sponsored by: New Gold Technology Reviewed by: bde, tjr, jake [an older version, logic similar]
* Make the following name changes to KSE related functions, etc., to betterarchie2002-09-254-11/+11
| | | | | | | | | | | | | | | represent their purpose and minimize namespace conflicts: kse_fn_t -> kse_func_t struct thread_mailbox -> struct kse_thr_mailbox thread_interrupt() -> kse_thr_interrupt() kse_yield() -> kse_release() kse_new() -> kse_create() Add missing declaration of kse_thr_interrupt() to <sys/kse.h>. Regenerate the various generated syscall files. Minor style fixes. Reviewed by: julian
* - Hold the vn lock over vm_mmap().jeff2002-09-251-4/+4
|
* Back out last commit. Linux uses the old 4.3BSD sockaddr format.mini2002-09-243-46/+15
|
* Ok, make this compile for real this time. recvfrom_args doesn't have ajhb2002-09-231-1/+1
| | | | | fromlen member, instead it has a fromlenaddr pointer member. Set it to NULL.
* Use correct variable name so that previous commit actually compiles.jhb2002-09-231-2/+2
|
* Don't use compatability syscall wrappers in emulation code.mini2002-09-233-15/+50
| | | | | | This is needed for the COMPAT_FREEBSD3 option split. Reviewed by: alfred, jake
* Use the fields in the sysentvec and in the vm map header in place of thejake2002-09-213-3/+4
| | | | | | | | 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.
* Remove NVIDIA ioctl bits. They will be provided in a kernel module.mdodd2002-09-202-29/+0
|
* Put an XXX comment here to point somebody in the right direction.phk2002-09-201-0/+1
|
* Current uses struct thread *td rather than struct proc *p.imp2002-09-201-2/+2
|
* Pass flags to msync() accounting for differences in the definition ofmdodd2002-09-191-1/+5
| | | | | | MS_SYNC on FreeBSD and Linux. Submitted by: Christian Zander <zander@minion.de>
* This patch extends the FreeBSD Linux compatibility layer to supportmdodd2002-09-192-0/+29
| | | | | | | NVIDIA API calls; more specifically, it adds an ioctl() handler for the range of possible NVIDIA ioctl numbers. Submitted by: Christian Zander <zander@minion.de>
* Completely redo thread states.julian2002-09-111-6/+1
| | | | Reviewed by: davidxu@freebsd.org
* Tidy up some loose ends that bde pointed out. caddr_t bad, ok?peter2002-09-071-7/+6
| | | | | | | Move fill_kinfo_proc to before we copy the results instead of after the copy and too late. There is still more to do here.
* The true value of how the kernel was configured for KSTACK_PAGES was notpeter2002-09-071-8/+7
| | | | | | available at module compile time. Do not #include the bogus opt_kstack_pages.h at this point and instead refer to the variables that are also exported via sysctl.
* Fix a missing line in a cut/paste error.peter2002-09-071-0/+1
|
* Collect the a.out coredump code into the calling functions.peter2002-09-071-1/+15
| | | | XXX why does pecoff dump in a.out format?
* Do not cast from a pointer to an integer of a possibly different size.bde2002-09-051-1/+1
| | | | This fixes a warning on i386's with 64-bit longs.
* Include <sys/malloc.h> instead of depending on namespace pollution 2bde2002-09-054-14/+10
| | | | | | layers deep in <sys/proc.h> or <sys/vnode.h>. Removed unused includes. Sorted includes.
* Implement LINUX_TIOCSCTTY.marcel2002-09-051-1/+4
| | | | PR: kern/42404
* Use the new kern_*() functions to avoid using the stack gap iniedowse2002-09-022-90/+49
| | | | linux_fcntl*() and linux_getcwd().
* Use the new kern_* functions to avoid the need to store argumentsiedowse2002-09-016-328/+264
| | | | | | | | in the stack gap. This converts most VFS and signal related system calls, as well as select(). Discussed on: -arch Approved by: marcel
* Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections tojake2002-09-013-10/+29
| | | | | | 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.
* Add a new function linux_emul_convpath(), which is a version ofiedowse2002-09-012-32/+64
| | | | | | | | linux_emul_find() that does not use stack gap storage but instead always returns the resulting path in a malloc'd kernel buffer. Implement linux_emul_find() in terms of this function. Also add LCONVPATH* macros that wrap linux_emul_convpath in the same way that the CHECKALT* macros wrap linux_emul_find().
* Make this compile.jake2002-08-311-1/+2
|
* Implement data, text, and vmem limit checking in the elf loader and svr4dillon2002-08-302-4/+3
| | | | | | | compat code. Clean up accounting for multiple segments. Part 1/2. Submitted by: Andrey Alekseyev <uitm@zenon.net> (with some modifications) MFC after: 3 days
* Replace (ab)uses of "NULL" where "0" is really meant.archie2002-08-221-1/+1
|
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidsobomax2002-08-181-1/+1
| | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net
* In continuation of early fileop credential changes, modify fo_ioctl() torwatson2002-08-178-41/+79
| | | | | | | | | | | | | | | | | | | | | | 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
* Make similar changes to fo_stat() and fo_poll() as made earlier torwatson2002-08-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fo_read() and fo_write(): explicitly use the cred argument to fo_poll() as "active_cred" using the passed file descriptor's f_cred reference to provide access to the file credential. Add an active_cred argument to fo_stat() so that implementers have access to the active credential as well as the file credential. Generally modify callers of fo_stat() to pass in td->td_ucred rather than fp->f_cred, which was redundantly provided via the fp argument. This set of modifications also permits threads to perform these operations on behalf of another thread without modifying their credential. Trickle this change down into fo_stat/poll() implementations: - badfo_poll(), badfo_stat(): modify/add arguments. - kqueue_poll(), kqueue_stat(): modify arguments. - pipe_poll(), pipe_stat(): modify/add arguments, pass active_cred to MAC checks rather than td->td_ucred. - soo_poll(), soo_stat(): modify/add arguments, pass fp->f_cred rather than cred to pru_sopoll() to maintain current semantics. - sopoll(): moidfy arguments. - vn_poll(), vn_statfile(): modify/add arguments, pass new arguments to vn_stat(). Pass active_cred to MAC and fp->f_cred to VOP_POLL() to maintian current semantics. - vn_close(): rename cred to file_cred to reflect reality while I'm here. - vn_stat(): Add active_cred and file_cred arguments to vn_stat() and consumers so that this distinction is maintained at the VFS as well as 'struct file' layer. Pass active_cred instead of td->td_ucred to MAC and to VOP_GETATTR() to maintain current semantics. - fifofs: modify the creation of a "filetemp" so that the file credential is properly initialized and can be used in the socket code if desired. Pass ap->a_td->td_ucred as the active credential to soo_poll(). If we teach the vnop interface about the distinction between file and active credentials, we would use the active credential here. Note that current inconsistent passing of active_cred vs. file_cred to VOP's is maintained. It's not clear why GETATTR would be authorized using active_cred while POLL would be authorized using file_cred at the file system level. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* In order to better support flexible and extensible access control,rwatson2002-08-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make a series of modifications to the credential arguments relating to file read and write operations to cliarfy which credential is used for what: - Change fo_read() and fo_write() to accept "active_cred" instead of "cred", and change the semantics of consumers of fo_read() and fo_write() to pass the active credential of the thread requesting an operation rather than the cached file cred. The cached file cred is still available in fo_read() and fo_write() consumers via fp->f_cred. These changes largely in sys_generic.c. For each implementation of fo_read() and fo_write(), update cred usage to reflect this change and maintain current semantics: - badfo_readwrite() unchanged - kqueue_read/write() unchanged pipe_read/write() now authorize MAC using active_cred rather than td->td_ucred - soo_read/write() unchanged - vn_read/write() now authorize MAC using active_cred but VOP_READ/WRITE() with fp->f_cred Modify vn_rdwr() to accept two credential arguments instead of a single credential: active_cred and file_cred. Use active_cred for MAC authorization, and select a credential for use in VOP_READ/WRITE() based on whether file_cred is NULL or not. If file_cred is provided, authorize the VOP using that cred, otherwise the active credential, matching current semantics. Modify current vn_rdwr() consumers to pass a file_cred if used in the context of a struct file, and to always pass active_cred. When vn_rdwr() is used without a file_cred, pass NOCRED. These changes should maintain current semantics for read/write, but avoid a redundant passing of fp->f_cred, as well as making it more clear what the origin of each credential is in file descriptor read/write operations. Follow-up commits will make similar changes to other file descriptor operations, and modify the MAC framework to pass both credentials to MAC policy modules so they can implement either semantic for revocation. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* On MAC check failure for readdir, use 'goto out' to use the common exitrwatson2002-08-151-1/+1
| | | | | | | | handling, rather than returning directly to prevent leaking of vnode reference/lock. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
OpenPOWER on IntegriCloud