summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Fix some problems in linux_sendmsg() and linux_recvmsg().iwasaki2003-10-111-36/+38
| | | | | | | | | | | - Allocate storage for uap->msg always because it is copyin()'ed in native sendmsg(). - Convert sockopt level from Linux to FreeBSD after native recvmsg() calling. - Some cleanups. Tested with: Oracle 9i shared server connection mode. MFC after: 1 week
* make kernel_sysctl()'s args match its prototype in order to fix thegallatin2003-10-081-1/+1
| | | | alpha build
* Fix a (fortunately harmless) signed / unsigned bug.des2003-09-301-1/+2
|
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitpeter2003-09-254-3/+72
| | | | | | | | | | | | | | | | | | | | | systems where the data/stack/etc limits are too big for a 32 bit process. Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c. Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy. Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced. Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does. Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things.
* Previous commit contained too-smart-for-its-own-good code that mightdes2003-09-221-8/+9
| | | | produce incorrect (though harmless) output on single-CPU systems.
* Fake multi-cpu statistics for proc/stat by dividing the totals by thedes2003-09-221-5/+18
| | | | | | number of CPUs. PR: kern/27522
* Fix some broken comments.des2003-09-091-3/+3
|
* Add cwd, root and statm (modeled on a 2.4.20 kernel). De-obfuscatedes2003-09-091-17/+96
| | | | linprocfs_init() a little and remove some gratuitous whitespace.
* Restored a non-egregious cast so that this file compiles on i386'sbde2003-09-071-1/+1
| | | | | | | | | | | | | with 64-bit longs again. This was fixed in rev.1.42 but the fix rotted non-fatally in rev.1.105 and fatally in rev.1.137. Many more non-egregrious casts are strictly required for conversions from semi-opaque types to pointers, but we avoid most of them by using types that are almost certain to be compatible with uintptr_t for representing pointers (e.g., vm_offset_t). Here we don't really want the u_longs, but we have them because a.out.h and its support code doesn't use typedefs (it uses unsigned in V7 and unsigned long in FreeBSD) and is too obsolete to fix now.
* Switch to using the emulator in the common compat area.peter2003-08-233-10/+13
| | | | Still work-in-progress.
* Initial sweep at dividing up the generic 32bit-on-64bit kernel supportpeter2003-08-224-55/+8
| | | | | | from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area. This is still work-in-progress.
* Initial sweep to de-i386-ify thispeter2003-08-223-79/+84
|
* Regenpeter2003-08-224-411/+411
|
* Begin attempting to consolidate the two different i386 emulationspeter2003-08-223-63/+75
| | | | | on ia64 and amd64. I'm attempting to keep the generic 32bit-on-64bit binary support seperate from the i386 support and the MD backend support.
* Regenpeter2003-08-214-14/+14
|
* This is too funny for words. Swap syscalls 416 and 417 around. It workspeter2003-08-211-2/+2
| | | | better that way when sigaction() and sigreturn() do the right thing.
* Whitespace cleanup.des2003-08-181-14/+14
|
* Cleanup <machine/cpu.h> by moving MD prototypes to <machine/md_var.h>marcel2003-08-171-0/+1
| | | | | | | | | | | | | | | like we have on other platforms. Move savectx() to <machine/pcb.h>. A lot of files got these MD prototypes through the indirect inclusion of <machine/cpu.h> and now need to include <machine/md_var.h>. The number of which is unexpectedly large... osf1_misc.c especially is tricky because szsigcode is redefined in one of the osf1 header files. Reordering of the include files was needed. linprocfs.c now needs an explicit extern declaration. Tested with: LINT
* Remove dangling extern reference to swap_pager_fullphk2003-08-061-2/+0
|
* Add support for multiple CPUs to cpuinfo.des2003-08-041-8/+18
|
* Try to make 'uname -a' look more like it does on Linux:des2003-07-291-0/+30
| | | | | | | | | | - cut the version string at the newline, suppressing information about who built the kernel and in what directory. Most of this information was already lost to truncation. - on i386, return the precise CPU class (if known) rather than just "i386". Linux software which uses this information to select which binary to run often does not know what to make of "i386".
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-261-1/+1
| | | | | | | | | contain the filedescriptor number on opens from userland. The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/* For now pass -1 all over the place.
* Use __FBSDID().obrien2003-07-253-5/+8
| | | | Brought to you by: a boring talk at Ottawa Linux Symposium
* Add a new function swap_pager_status() which reports the total size of thephk2003-07-182-16/+9
| | | | | | | paging space and how much of it is in use (in pages). Use this interface from the Linuxolator instead of groping around in the internals of the swap_pager.
* 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
OpenPOWER on IntegriCloud