summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Advertise bit 26 as sse2.cognet2008-09-261-1/+1
| | | | Spotted out by: gahr
* Add support for installing 32-bit system calls from kernel modules. Thisjhb2008-09-253-2/+110
| | | | | | | | includes syscall32_{de,}register() routines as well as a module handler and wrapper macros similar to the support for native syscalls in <sys/sysent.h>. MFC after: 1 month
* Sort includes and add multiple include guards.jhb2008-09-251-5/+9
|
* Regen.jhb2008-09-254-26/+26
|
* Tidy up a few things with syscall generation:jhb2008-09-251-12/+12
| | | | | | | | | | | | | | | | - Instead of using a syscall slot (370) just to get a function prototype for lkmressys(), add an explicit function prototype to <sys/sysent.h>. This also removes unused special case checks for 'lkmressys' from makesyscalls.sh. - Instead of having magic logic in makesyscalls.sh to only generate a function prototype the first time 'lkmnosys' is seen, make 'NODEF' always not generate a function prototype and include an explicit prototype for 'lkmnosys' in <sys/sysent.h>. - As a result of the fix in (2), update the LKM syscall entries in the freebsd32 syscall table to use 'lkmnosys' rather than 'nosys'. - Use NOPROTO for the __syscall() entry (198) in the native ABI. This avoids the need for magic logic in makesyscalls.h to only generate a function prototype the first time 'nosys' is encountered.
* Change the static struct sysentvec and struct Elf_Brandinfo initializerskib2008-09-242-78/+80
| | | | | | | | | | | to the C99 style. At least, it is easier to read sysent definitions that way, and search for the actual instances of sigcode etc. Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs. No objection from: jhb MFC after: 1 month
* Fix usage of mac_vnode_check_open() in linuxulator - last argumenttrasz2008-09-221-1/+1
| | | | | | should be VREAD, not FREAD. Approved by: rwatson (mentor)
* Add freebsd32 compat shims for ioctl(2)obrien2008-09-222-0/+78
| | | | CDIOREADTOCHEADER and CDIOREADTOCENTRYS requests.
* Regenerate for r183270.obrien2008-09-224-7/+14
|
* Add freebsd32 compat shims for ioctl(2)obrien2008-09-223-2/+216
| | | | MDIOCATTACH, MDIOCDETACH, MDIOCQUERY, and MDIOCLIST requests.
* Regenerate for r183188.obrien2008-09-194-7/+14
|
* Add freebsd32 compat shim for nmount(2).obrien2008-09-192-3/+47
| | | | (and quiet some compiler warnings for vfs_donmount)
* style(9)obrien2008-09-151-3/+4
|
* Regenerate for r183042.obrien2008-09-154-7/+7
|
* Fix bug in r100384 (rev 1.2) in which the 32-bit swapon(2) was madeobrien2008-09-151-1/+1
| | | | "obsolete, not included in system", where as the system call does exist.
* Allow COMPAT_SVR4 to be built without COMPAT_43.ed2008-09-152-16/+20
| | | | | | | | | | | | | | It seems we only depend on COMPAT_43 to implement the send() and recv() routines. We can easily implement them using sendto() and recvfrom(), just like we do inside our very own C library. I wasn't able to really test it, apart from simple compilation testing. I've heard rumours that COMPAT_SVR4 is broken inside execve() anyway. It's still worth to fix this, because I suspect we'll get rid of COMPAT_43 somewhere in the future... Reviewed by: rdivacky Discussed with: jhb
* Allow PAGE_SHIFT to already be defined.thompsa2008-09-131-0/+2
| | | | Submitted by: Hans Petter Selasky
* The ERESTART to EINTR conversion is already done inrdivacky2008-09-111-8/+1
| | | | | | | | | kern_select so there is no need to repeat it in linux_select(). Submitted by: Dmitry Chagin <dchagin@> MFC after: 1 week Approved by: kib (mentor)
* Getdents requires padding with 2 bytes instead of 1 byterdivacky2008-09-091-33/+54
| | | | | | | | | | | | | | as with getdents64. The last byte is used for storing the d_type, add this to plain getdents case where it was missing before. Also change the code to use strlcpy instead of plain strcpy. This changes fix the getdents crash we had reports about (hl2 server etc.) PR: kern/117010 MFC after: 1 week Submitted by: Dmitry Chagin (dchagin@) Tested by: MITA Yoshio <mita ee.t.u-tokyo.ac jp> Approved by: kib (mentor)
* Remove superfluous copyin() of args, structures are already in kernel space.kib2008-09-091-155/+78
| | | | | Submitted by: dchagin MFC after: 1 week
* Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed threadattilio2008-08-285-6/+6
| | | | | | was always curthread and totally unuseful. Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* We left out V_static_len from ip_fw2.cjulian2008-08-251-1/+1
| | | | | (also a whitespace diff that i'd rahter fix her ethan break in the vimage branch.)
* All opt_x.h includes go at the top of other includes.julian2008-08-252-3/+4
|
* Regenerate following r182123.rwatson2008-08-244-5/+5
|
* When MPSAFE ttys were merged, a new BSM audit event identifier wasrwatson2008-08-241-1/+1
| | | | | | | | | | | | | | allocated for posix_openpt(2). Unfortunately, that identifier conflicts with other events already allocated to other systems in OpenBSM. Assign a new globally unique identifier and conform better to the AUE_ event naming scheme. This is a stopgap until a new OpenBSM import is done with the correct identifier, so we'll maintain this as a local diff in svn until then. Discussed with: ed Obtained from: TrustedBSD Project
* Add comments on NOARGS, NODEF, and NOPROTO.obrien2008-08-211-0/+7
|
* Update system call tables.ed2008-08-204-4/+4
| | | | | | | | | The previous commit also included changes to all the system call lists, but it is a tradition to update these lists in a second commit, so rerun make sysent to update the $FreeBSD$ tags inside these files to refer to the latest version of syscalls.master. Requested by: rwatson
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.ed2008-08-206-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
* Commit step 1 of the vimage project, (network stack)bz2008-08-176-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
* Add TIOCPKT and TIOCSPTLCK to the Linuxolator.ed2008-07-232-1/+9
| | | | | | | | | | | | We're very lucky, because the flags used by our TIOCPKT implementation are the same as flags used by Linux. We can safely enable TIOCPKT, assuming EXTPROC is not used. TIOCSPTLCK is used by unlockpt(). Because we don't need unlockpt() in our implementation, make this ioctl a no-op. Approved by: philip (mentor, implicit), rdivacky Obtained from: P4 (//depot/projects/mpsafetty/...)
* Fix linux_alarm, the linux behaviour is to limit therdivacky2008-07-231-3/+6
| | | | | | | | secs to INT_MAX when the passed in parameter is bigger than INT_MAX. Submitted by: Dmitry Chagin <chagin.dmitry gmail com> Approved by: kib (mentor)
* when NDIS framework try to query/set informations NDIS drivers canweongyo2008-07-231-5/+7
| | | | | | | | | | return NDIS_STATUS_PENDING. In this case, it's waiting for 5 secs to get the response from drivers now. However, some NDIS drivers can send the response before NDIS framework gets ready to receive it so we might always be blocked for 5 secs in current implementation. NDIS framework should reset the event before calling NDIS driver's callback not after. MFC after: 1 month
* style(9): put parentheses around return values.brooks2008-07-101-4/+4
|
* Regenbrooks2008-07-104-16/+53
|
* id_t is a 64-bit integer and thus is passed as two arguments like off_t is.brooks2008-07-102-7/+70
| | | | | | | As a result, those arguments must be recombined before calling the real syscal implementation. This change fixes 32-bit compatibility for cpuset_getid(), cpuset_setid(), cpuset_getaffinity(), and cpuset_setaffinity().
* Introduce a new lock, hostname_mtx, and use it to synchronize accessrwatson2008-07-052-0/+3
| | | | | | | | | | | | to global hostname and domainname variables. Where necessary, copy to or from a stack-local buffer before performing copyin() or copyout(). A few uses, such as in cd9660 and daemon_saver, remain under-synchronized and will require further updates. Correct a bug in which a failed copyin() of domainname would leave domainname potentially corrupted. MFC after: 3 weeks
* Silence warning about missing IoGetDeviceObjectPointer by implementingcokane2008-06-151-0/+13
| | | | | | | | a simple stub that always returns STATUS_SUCCESS. Submitted by: Paul B. Mahol <onemda@gmail.com> Reviewed by: thompsa MFC after: 1 week
* Remove obselete PECOFF image activator support.wkoszek2008-06-142-748/+0
| | | | | | | | PRs assigned at the time of removal: kern/80742 Discussed on: freebsd-current (silence), IRC Tested by: make universe Approved by: cognet (mentor)
* fix a page fault that it occurred during ifp is NULL. This bug happensweongyo2008-06-111-2/+2
| | | | | when NDIS driver's initialization is failed and NDIS driver's trying to call NdisWriteErrorLogEntry().
* d_ino member of linux_dirent structure should be unsigned long.rdivacky2008-06-081-2/+2
| | | | | Submitted by: Chagin Dmitry <chagin.dmitry@gmail.com> Approved by: kib (mentor)
* Switch to emulating Linux 2.6 on default.rdivacky2008-06-031-2/+2
| | | | Approved by: kib (mentor)
* Push down the major/minor conversion for pts/%u to improve consistency.ed2008-06-022-26/+20
| | | | | | | | | | | | | | | | | | In the mpsafetty branch, Linux sshd seems to work properly inside a jail. Some small modifications had to be made to the Linux compatibility layer. The Linux PTY routines always expect the device major number to be 136 or higher. Our code always set the major/minor number pair to 136:0. This makes routines like ttyname() and ptsname() fail, because we'll end up having ambiguous device numbers. The conversion was not performed on all *stat() routines, which meant in some cases the numbers didn't get transformed. By pushing the conversion into linux_driver_get_major_minor(), the transformation will take place on all calls. Approved by: philip (mentor), rdivacky
* Fix a panic that a priority value which is passed to cv_broadcastpri(9)weongyo2008-05-301-4/+6
| | | | | | | can be < 0. We don't ignore a `increment' argument but at least we keep a priority value of NDIS threads over PRI_MIN_KERN. Reviewed by: thompsa
* Fix a panic when it occurred during initializing the ndis driver becauseweongyo2008-05-151-0/+4
| | | | | | | it try to read network address through ifnet structure which is NULL until the ndis driver's initialization is finished. Reviewed by: thompsa
* Implement robust futexes. Most of the code is modelled afterrdivacky2008-05-135-7/+192
| | | | | | | | | | | what Linux does. This is because robust futexes are mostly userspace thing which we cannot alter. Two syscalls maintain pointer to userspace list and when process exits a routine walks this list waking up processes sleeping on futexes from that list. Reviewed by: kib (mentor) MFC after: 1 month
* Implement linux_truncate64() syscall.rdivacky2008-04-231-0/+18
| | | | | Tested by: Aline de Freitas <aline@riseup.net> Approved by: kib (mentor)
* The vmspace->vm_daddr is constant until freed, there is no needrdivacky2008-04-211-2/+0
| | | | | | to hold lock while accessing it. Approved by: kib (mentor)
* Remove using magic value of -1 to distinguish between linux_open()rdivacky2008-04-091-5/+3
| | | | | | | | | and linux_openat(). Instead just pass AT_FDCWD into linux_common_open() for the linux_open() case. This prevents passing -1 as a dirfd to openat() from succeeding which is wrong. Suggested by: rwatson, kib Approved by: kib (mentor)
* Implement the linux syscallskib2008-04-087-124/+418
| | | | | | | | | openat, mkdirat, mknodat, fchownat, futimesat, fstatat, unlinkat, renameat, linkat, symlinkat, readlinkat, fchmodat, faccessat. Submitted by: rdivacky Sponsored by: Google Summer of Code 2007 Tested by: pho
* Regenkib2008-03-314-5/+72
|
OpenPOWER on IntegriCloud