summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Implement DVD-ROM ioctls.marcel2001-11-182-27/+434
| | | | | PR: 26955 Submitted by: Boris Nikolaus (email unknown)
* Implement missing SOUND_MIXER_WRITE_RECSRC ioctl.marcel2001-11-182-0/+5
| | | | | PR: 22971 Tested by: dougb
* Fix missing holdsock()->fgetsock()dillon2001-11-171-7/+5
| | | | Submitted by: Hisashi Hiramoto <hiramoto@phys.chs.nihon-u.ac.jp>
* Give struct socket structures a ref counting interface similar todillon2001-11-171-18/+12
| | | | | | | vnodes. This will hopefully serve as a base from which we can expand the MP code. We currently do not attempt to obtain any mutex or SX locks, but the door is open to add them when we nail down exactly how that part of it is going to work.
* Forward declare struct ifnet - this fixes a warning in tdfx_pci.cpeter2001-11-171-0/+1
|
* Fix printf warnings (int/long)peter2001-11-171-2/+4
| | | | #if 0 around unused ifname_bsd_to_linux() function
* Fix warning in debug printf. This is a long on alpha, and int on i386,peter2001-11-171-1/+1
| | | | but printed with %ld always.
* o Replace reference to 'struct proc' with 'struct thread' in 'structrwatson2001-11-081-6/+6
| | | | | | | | | | | | | | | sysctl_req', which describes in-progress sysctl requests. This permits sysctl handlers to have access to the current thread, permitting work on implementing td->td_ucred, migration of suser() to using struct thread to derive the appropriate ucred, and allowing struct thread to be passed down to other code, such as network code where td is not currently available (and curproc is used). o Note: netncp and netsmb are not updated to reflect this change, as they are not currently KSE-adapted. Reviewed by: julian Obtained from: TrustedBSD Project
* promote tv_sec in printf to make it type agnosticdillon2001-10-291-4/+4
|
* Introduce [IPC|SHM]_[INFO|STAT] to shmctl to makemr2001-10-281-3/+52
| | | | `/compat/linux/usr/bin/ipcs -m` happy.
* Eliminate the prefix parameter to linux_emul_find(), which was alwaysdes2001-10-272-7/+5
| | | | | | | | linux_emul_path anyway. Linux_emul_find() has interesting bugs in its prefix handling (which luckily are not currently exploitable); this commit is preliminary to an attempt at cleaning it up. Approved by: marcel
* Force the length of the sockaddr to be correct for AF_INET and AF_INET6fenner2001-10-261-2/+23
| | | | | | in bind() and connect(). Linux doesn't care if the length of the sockaddr matches its address family; FreeBSD does. This fixes the known issues with the resolver in linux_base-7.
* Reporting device drivers by traversing cdevsw[] is at best a hackphk2001-10-261-2/+6
| | | | | | | | | | | which may or may not return something which is partially right. Disable the "devices" file until we find out what this is needed for, and what exactly those apps need. This will allow cdevsw to become static again. Approved by: DES
* Add proc/mtab which simulates a Linux system's /etc/mtab.des2001-10-211-1/+72
|
* Tweak the way we determine if an interface needs to have its name translated.des2001-10-202-22/+62
| | | | | | | | Add some missing break statements in the socket ioctl switch. Check the return value from copyin() / copyout(). Fix some disorderings and misindentations. Support a couple more socket ioctls. Add missing break statements.
* Fix Alpha related brokenness. We used to have a MD linux_ioctl.hmarcel2001-10-192-8/+209
| | | | | | | | | | | | | | | | | that appeared to be very different from the MI version. These differences were mostly bogus and caused by copying octal definitions and write them as hexadecimal values without doing any base conversion (ie 010 was copied to 0x10). After filtering out these differences, any remaining (real) incompatibilities have been merged into the MI header file to make them more visible. While here, fix the termios <-> termio conversion WRT to the c_cc field for Alpha. The termios values do not match the termio values and thus prevents us from copying. By eliminating the Alpha MD copy of linux_ioctl.h we also fixed the recent build breakage caused by putting new bits in the MI header and not in the MD header.
* #if 0 out some code that depends on other uncommitted patches.des2001-10-191-0/+2
|
* Adapt to pseudofs changes (dynamic initialization, not static).des2001-10-191-67/+60
| | | | | Use the new linux_ifname() function from the linuxulator rather than roll our own interface name translation.
* Add support for the "device private" ioctls soon to be used by the an driver.des2001-10-192-16/+76
| | | | | | Also slightly change the name translation policy - only rename interfaces that have the IFF_BROADCAST flag set. This is not perfect, but is closer to how Linux names network interfaces.
* Whitespace fix.des2001-10-191-1/+1
|
* Implement linux_chown and linux_lchown. The fchown syscall mapsmarcel2001-10-161-0/+42
| | | | | | | directly to the native syscall, because no filename handling needs to be done. Tested by: Martin Blapp <mb@imp.ch>
* Try to make Linux socket ioctls work. Up until now they've only *pretended*des2001-10-151-50/+281
| | | | | | | | | | | | | | to work, but haven't really due to subtle differences in structs etc. This is still not perfect (some ioctls are still known not to work, while others haven't been tested at all), but it's enough to get Debian's ifconfig to produce relatively sane output. More work will be needed to get all ioctls (or at least a reasonable subset) working, and to support the Cisco Aironet config tool mentioned in the PR. PR: 26546 Submitted by: Doug Ambrisko <ambrisko@ambrisko.com>
* When casting from uid16/gid16 to uid/gid respectively, make suremarcel2001-10-141-14/+16
| | | | | | | that "no change" (ie 0xFFFF) is properly cast to (int)-1 for those syscalls that set uids and/or gids. Verified by: LTP
* Add missing includes of sys/lock.h.jhb2001-10-111-0/+1
|
* Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loaderps2001-10-103-3/+3
| | | | | | | tunable. Reviewed by: peter MFC after: 2 weeks
* Catch up with the visibility callback stuff, and give up trying to keep thedes2001-10-011-19/+37
| | | | file definitions on single lines.
* Specify readability and / or writeability for all nodes that need it.des2001-09-301-18/+18
|
* Adapt to pseudofs version 2. Sorry about the breakage - I had this readydes2001-09-291-20/+18
| | | | to commit along with the pseudofs patches, but just plain forgot.
* Remove linux_getpgid(). We map the syscall natively now.marcel2001-09-281-21/+0
| | | | PR: kern/21402
* Swap the src and dst arguments of the bcopy added in themarcel2001-09-281-1/+1
| | | | previous commit. It ain't memcpy... *cough*
* The arg parameter is passed by value in Linux, but not in FreeBSD.marcel2001-09-261-5/+6
| | | | | | | | | We still have to account for a copyin. Make sure the copyin will succeed by passing the FreeBSD syscall a pointer to userspace, albeit one that's automagically mapped into kernel space. Reported by: mr, Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org> Tested by: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
* Clean up my source tree to avoid getting hit too badly by the next KSE ordes2001-09-251-20/+37
| | | | | whatever mega-commit. No real functional changes, just some experiments / work in progress.
* Fix abuse of vtagtype. In addition, after this the linux programs will besobomax2001-09-191-32/+20
| | | | | | | able correctly distinguish ext2fs from the ufs filesystem (previously ext2fs was indistinguishable from the ufs). Reviewed by: phk, marcel
* Add a wrapper for linux_getsid -> getsid Syscall.mr2001-09-151-0/+8
|
* Implement LINUX_[SEM|IPC]_[STAT|INFO]mr2001-09-151-2/+58
| | | | | | | to make /compat/linux/usr/bin/ipcs -s happy. PR: kern/29698 (part) Reviewed by: audit
* Fix off by one error introduced by the use of the ifnet_byindex()marcel2001-09-141-1/+1
| | | | | | | | macro. The commit log clearly states that the index given to the macro is one higher than previously used to index the array. This wasn't represented in the code and resulted in kernel page faults. Reported by: Andrew Atrens <atrens@nortelnetworks.com>
* Fix typo.julian2001-09-131-1/+1
| | | | noticed by: jhb
* Whitespace fix.jhb2001-09-121-1/+1
|
* KSE Milestone 2julian2001-09-1238-1293/+1313
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* This brings in a Yahoo coredump patch from Paul, with additional mods bydillon2001-09-081-4/+4
| | | | | | | | | | | | | | | | | | | me (addition of vn_rdwr_inchunks). The problem Yahoo is solving is that if you have large process images core dumping, or you have a large number of forked processes all core dumping at the same time, the original coredump code would leave the vnode locked throughout. This can cause the directory vnode to get locked up, which can cause the parent directory vnode to get locked up, and so on all the way to the root node, locking the entire machine up for extremely long periods of time. This patch solves the problem in two ways. First it uses an advisory non-blocking lock to abort multiple processes trying to core to the same file. Second (my contribution) it chunks up the writes and uses bwillwrite() to avoid holding the vnode locked while blocking in the buffer cache. Submitted by: ps Reviewed by: dillon MFC after: 2 weeks
* Round of cleanups and enhancements. These include (in random order):marcel2001-09-0811-1369/+1775
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse.
* Wrap array accesses in macros, which also happen to be lvalues:jlemon2001-09-061-1/+1
| | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng.
* Synchronize syscalls.master(s) with recent Giant pushdown workdillon2001-09-011-8/+8
|
* Speculatively add this file. It's part of the Linuxulator updatemarcel2001-09-011-0/+285
| | | | | | | | to make it emulate Linux kernel version 2.4.2, which is required in order to upgrade the linux_base port to RH 7.1. Note that this file is only needed for 32-bit architectures. To us this means i386 (for now?)
* Fix linux_getcwd() so that if the cwd isn't cached (__getcwd() fails),gallatin2001-08-292-28/+466
| | | | | | | | | | the cwd is looked up inside the kernel. The native getcwd() in libc handles this in userland if __getcwd() fails. Obtained from: NetBSD via OpenBSD Tested by: Chris Casey <chriss@phys.ksu.edu>, Markus Holmberg <markush@acc.umu.se> Reviewed by: Darrell Anderson <anderson@cs.duke.edu> PR: kern/24315
* Added the linux_sysinfo function to implement sysinfo(2).pirzyk2001-07-231-0/+76
| | | | | | | PR: kern/27759 Reviewed by: marcel Approved by: marcel MFC after: 1 week
* get rid of some printf and pointer type warningsassar2001-07-227-15/+17
|
* o Replace calls to p_can(..., P_CAN_xxx) with calls to p_canxxx().rwatson2001-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | The p_can(...) construct was a premature (and, it turns out, awkward) abstraction. The individual calls to p_canxxx() better reflect differences between the inter-process authorization checks, such as differing checks based on the type of signal. This has a side effect of improving code readability. o Replace direct credential authorization checks in ktrace() with invocation of p_candebug(), while maintaining the special case check of KTR_ROOT. This allows ktrace() to "play more nicely" with new mandatory access control schemes, as well as making its authorization checks consistent with other "debugging class" checks. o Eliminate "privused" construct for p_can*() calls which allowed the caller to determine if privilege was required for successful evaluation of the access control check. This primitive is currently unused, and as such, serves only to complicate the API. Approved by: ({procfs,linprocfs} changes) des Obtained from: TrustedBSD Project
* Bah, back out part of previous commit. I got too carried away.peter2001-06-151-1/+1
| | | | linux_debug_map[] is referred to from elsewhere.
* Fix warnings:peter2001-06-151-5/+5
| | | | | 235: warning: unsigned int format, pointer arg (arg 3) 621: warning: cast discards qualifiers from pointer target type
OpenPOWER on IntegriCloud