summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
...
* Use truncate() instead of otruncate() - step on the way to stoppingeivind1999-01-101-3/+3
| | | | the linulator from depending on COMPAT_43.
* Add (but don't activate) code for a special VM option to makejulian1999-01-061-47/+46
| | | | | | | | | | | | | downward growing stacks more general. Add (but don't activate) code to use the new stack facility when running threads, (specifically the linux threads support). This allows people to use both linux compiled linuxthreads, and also the native FreeBSD linux-threads port. The code is conditional on VM_STACK. Not using this will produce the old heavily tested system. Submitted by: Richard Seaman <dick@tar.com>
* Commit patch insos1998-12-301-1/+6
| | | | | PR: 9232 Submitted by: marcel@scc.nl <Marcel Moolenaar>
* Commit #2 ofsos1998-12-301-1/+73
| | | | | PR: 9235 Submitted by: marcel@scc.nl <Marcel Moolenaar>
* According to the author..julian1998-12-241-9/+4
| | | | | | | | | | | | | | | | | | "I've been having a problem running the patches [committed to current] installed with the COMPAT_LINUX_THREADS option along with the VM_STACK patches I did. I'm not sure what the problem is, since it seemed to work before. In any event, the attached patch fixes the problem for me. While I've had no report of problems from anyone else, possibly it would be wise to commit the patch until the problem is found. Also, there was some left-over junk in the linux_misc.c file from some earlier work I did. The attached patch cleans that up too." Submitted by: "Richard Seaman, Jr." <dick@tar.com>
* Kill(pid, 0) normally returns 0 on both FreeBSD and Redhat after havingsos1998-12-211-2/+2
| | | | | | | | | performed all sorts of sanity checks. The FreeBSD linux emulator returns EINVAL in such a case. Allowing signal 0 to be passed to kill will result in compatible behaviour. PR: 9082 Submitted by: Marcel Moolenaar <marcel@scc.nl>
* Reviewed by: Luoqi Chen, Jordan Hubbardjulian1998-12-191-1/+173
| | | | | | | | | | | | Submitted by: "Richard Seaman, Jr." <lists@tar.com> Obtained from: linux :-) Code to allow Linux Threads to run under FreeBSD. By default not enabled This code is dependent on the conditional COMPAT_LINUX_THREADS (suggested by Garret) This is not yet a 'real' option but will be within some number of hours.
* Removed the cast to a pointer in the definition of PS_STRINGS andbde1998-12-161-2/+2
| | | | | | | adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change.
* linux_pipe does not preserve the edx register. Linux andjkh1998-12-101-3/+12
| | | | | | | | | programs using glibc expect edx to be preserved accross syscalls. As a result, linux programs running in emulation mode can have whatever value may be represented by edx clobbered. PR: 9038 Submitted-By: Richard Seaman, Jr. <dick@tar.com>
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-7/+13
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* MF22: Bring in some linux sound ioctl support which I committed to 2.2jkh1998-11-121-1/+61
| | | | | | | for PR 7792 but did not bring forward. Submitted by: Avatar Liang <avatar@www.mmlab.cse.yzu.edu.tw> PR: 8656
* Fix a couple of out-of-bounds array references in mapping betweenjdp1998-10-111-4/+9
| | | | | | Linux and FreeBSD signal numbers. Also, check signal numbers passed in from application programs for validity. Without these checks, it is trivial to panic the system from a Linux program.
* Make async I/O on a socket work.jfieber1998-10-051-1/+4
| | | | | Although the current Sybase license does not permit running under emulation, FreeBSD 3.0 is now "Sybase Ready" should the license change.
* In linux_newuname bzero the right type of struct (linux_newuname_t).sos1998-10-051-2/+2
|
* Add several missing ioctl handlers. One needed by Sybase, the othersjfieber1998-09-301-1/+21
| | | | found while looking for the one.
* MF22: revert time bogon.jkh1998-09-241-2/+1
|
* return time in proper format for linux.jkh1998-09-231-1/+2
|
* Argh! *Now* the correct 3.0 fix is committed.jkh1998-08-311-7/+7
|
* Whoops! Stamp out a 2.2-ism that snuck between branches here.jkh1998-08-311-2/+2
|
* Initial support for using linux X servers under emulation - to use anjkh1998-08-311-4/+36
| | | | | | | | | | | | | | | | XFree86 server, users need to create the following links in their /compat/linux/dev directory (assuming kernel configured with 4 VTs). lrwxrwxrwx 1 root wheel 7 Aug 30 22:59 tty0 -> console lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty1 -> ttyv0 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty2 -> ttyv1 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty3 -> ttyv2 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty4 -> ttyv3 VT switching is still not yet supported. Attempting to switch VT currently will cause Xserver bus error. Submitted by: Chain Lee <chain@110.net>
* Use [u]intptr_t instead of [u_]long for casts between pointers andbde1998-08-161-3/+3
| | | | integers. Don't forget to cast to (void *) as well.
* Oops, the previous fix confused Linux's sigset_t with a pointer type.bde1998-08-151-5/+5
| | | | | | It can be integral or a struct in POSIX, so it is difficult to print, but it is actually declared as unsigned long. Assume that it is unsigned integral.
* Converted the second last instance of hzto() to tvtohz().bde1998-08-051-20/+15
| | | | | | | | | | | | | | | | | Fixed nearby bugs (in linux_alarm()): - the itimer for the alarm was relative to the epoch instead of relative to the boot time. This was harmless because the itimer's interval is 0. - the seconds arg was not checked for validity before converting it to a possibly different value. - printf format errors. Improvements: Don't use splclock(). splsoftclock() suffices. Don't complicate things by micro-optimizing interrupt latency. Minor improvements: Various micro-optimizations to exploit the specialness of the alarm itimer and the value 0.
* Fixed print format errors.bde1998-07-294-51/+56
|
* Quick and dirty support for Linux's mremap. Not used by anythingjkh1998-07-101-1/+32
| | | | | | but quake2 AFAIK. Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* remove option LINUX as it did nothing, add DEBUG_LINUX to debug thejmg1998-06-301-1/+3
| | | | | | linux emulation... (actually moved LINUX to opt_dontuse.h)
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* ".. x11amp appears to be calling shmctl(id, IPC_RMID, 0) and the emulationjkh1998-06-021-9/+13
| | | | | | | | layer does not like the null shmid_ds buffer pointer. The emulation layer returned an error without ever calling FreeBSD's shmctl, so the segments were not being deleted when the reference count went to zero." Submitted by: Kevin Street <street@iname.com>
* s/nanoruntime/nanouptime/gphk1998-05-171-2/+2
| | | | | | s/microruntime/microuptime/g Reviewed by: bde
* Make a kernel version of the timer* functions called timerval* to bephk1998-04-061-9/+9
| | | | | | more consistent. OK'ed by: bde
* Use microruntime() rather than doing it by hand.phk1998-04-041-3/+2
|
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* The linux chown syscall is more like lchown, a new chown syscall thatpeter1998-03-291-1/+22
| | | | follows links was added.
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-281-1/+2
| | | | used.
* Removed redundant test against MAXDSIZ (the rlimit test is stronger).bde1998-02-251-3/+3
|
* In the words of the submitter:msmith1998-02-071-2/+62
| | | | | | | | | | | | | | | | | | | | | | | ---- I've worked to enhance the connect() patches. I've just tested this with the Linux JDK appletviewer on an applet that does a lot of connects, and it works as well as during my previous tests. The connect() patch is now a merge between my older patch and the OpenBSD stuff. It ensures that any async error is returned by connect() instead of getsockopt(SOL_SOCKET, SO_ERROR) as reasonnable systems do. There are also minor patches to implement IPPROTO_TCP for get/setsocktopt(). These are also tested (with Linux Apache). ---- I would appreciate any feedback regarding these changes, as they'd be very useful in 2.2.6. Submitted by: pb@fasterix.freenix.org (Pierre Beyssac)
* Changed `inline' to `__inline' so that this file can be compiled bybde1998-02-031-3/+3
| | | | | | | `gcc -ansi'. Changed NULL to 0 so that this file is more self-sufficient (now only <sys/types.h> is a prerequisite).
* sigh....forgot to update the DEBUG printfjmb1998-01-051-3/+3
| | | | | | | to show both the path and the length args to linux emulation truncate() Submitted by: jmb
* length argument to truncate() in linux emulationjmb1998-01-051-1/+2
| | | | | | | | | was not being set copied to the bsd arguments.. frequently, resulting in files of over 100MB of NULs PR: 386/5044 Reviewed by: jmb Submitted by: (Richard Winkel) rich@math.missouri.edu
* Make hidden COMPAT_43 dependencies explict. Options in headers is aeivind1997-12-161-1/+3
| | | | pain in the backside.
* Make COMPAT_43 and COMPAT_SUNOS new-style options.eivind1997-12-161-2/+6
|
* As described by the submitter:msmith1997-12-151-1/+54
| | | | | | | | | | | These patches enables us to play quake2 . Support linux keyboard ioctl for setting RAW, MEDIUMRAW and XLATE. Support linux virtual terminal operations: OPENQRY, GETMODE, SETMODE, GETSTATE, ACTIVATE, and WAITACTIVE. Submitted by: Amancio Hasty <hasty@rah.star-gate.com>
* As described by the submitter:msmith1997-12-141-2/+147
| | | | | | | | | | | | - emulate Linux IP_HDRINCL behaviour in sendto(): byte order fixed Note that we do an extra getsockopt() on every sendto() to check if the option is set because we don't keep state in the emulator code. Is there a better way to implement this? - correct a bug (value of "name" not passed) with getsockopt() Submitted by: pb@fasterix.freenix.org (Pierre Beyssac)
* Don't include <sys/lock.h> in headers when only `struct simplelock' isbde1997-12-051-1/+2
| | | | required. Fixed everything that depended on the pollution.
* Added support for linux sound ioctls:ahasty1997-11-171-2/+18
| | | | | | | | | LINUX_SNDCTL_DSP_GETOPTR LINUX_SNDCTL_DSP_GETIPTR LINUX_SNDCTL_DSP_SETTRIGGER LINUX_SNDCTL_DSP_GETCAPS With this rev level the linux realaudio player 5 and xquake should work.
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-067-293/+291
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* Securelevel and formatting fixes, and trapframe simplification.kato1997-10-301-10/+9
| | | | | Reviewed by: sos Submitted by: bde
* Implement linux_iopl and linux_nice.kato1997-10-291-1/+31
|
* Implement linux_semop, linux_semget and linux_semctl.kato1997-10-281-4/+136
| | | | PR: 4355
* Update for changes in the callout interface.gibbs1997-09-211-3/+4
|
OpenPOWER on IntegriCloud