aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux
Commit message (Collapse)AuthorAgeFilesLines
* MFC revision 1.131Xin LI2006-01-111-5/+5
| | | | | | | | | | | | | date: 2005/12/13 15:32:52; author: delphij; state: Exp; lines: +5 -5 In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD they are passed by reference. Handle the difference within the linux_ioctl_termio on the LINUX_TCFLSH path. Submitted by: Jaroslav Drzik <jaro_AT_coop-voz_dot_sk> Reminded by: glebius Notes: svn path=/stable/5/; revision=154226
* MFC 1.62:Gleb Smirnoff2006-01-101-1/+1
| | | | | | | Add \n to log() message. Notes: svn path=/stable/5/; revision=154173
* MFC:Paul Saab2005-05-051-3/+2
| | | | | | | | | | | | | - Tweak kern_msgctl() to return a copy of the requested message queue id structure in the struct pointed to by the 3rd argument for IPC_STAT and get rid of the 4th argument. The old way returned a pointer into the kernel array that the calling function would then access afterwards without holding the appropriate locks and doing non-lock-safe things like copyout() with the data anyways. This change removes that unsafeness and resulting race conditions as well as simplifying the interface. Notes: svn path=/stable/5/; revision=145924
* MFC:Paul Saab2005-05-051-17/+10
| | | | | | | Split out kernel side of msgctl(2) into two parts. Notes: svn path=/stable/5/; revision=145923
* MFC: rev 1.65Paul Saab2005-04-231-132/+39
| | | | | | | | | | - Use kern_{l,f,}stat() and kern_{f,}statfs() functions rather than duplicating the contents of the same functions inline. - Consolidate common code to convert a BSD statfs struct to a Linux struct into a static worker function. Notes: svn path=/stable/5/; revision=145463
* MFC: rev 1.28Paul Saab2005-04-231-98/+3
| | | | | | | Make linux_emul_convpath() a simple wrapper for kern_alternate_path(). Notes: svn path=/stable/5/; revision=145462
* MFC: rev 1.165Paul Saab2005-04-231-19/+7
| | | | | | | | Use kern_setitimer() to implement linux_alarm() instead of fondling the real interval timer directly. Notes: svn path=/stable/5/; revision=145451
* MFC:Paul Saab2005-04-211-64/+33
| | | | | | | | | | Split out kernel side of {get,set}itimer(2) into two parts: the first that pops data from the userland and pushes results back and the second which does actual processing. Use the latter to eliminate stackgap in the linux wrappers of those syscalls. Notes: svn path=/stable/5/; revision=145381
* MFC: Handle unimplemented syscall by instantly returning ENOSYS instead of ↵Maxim Sobolev2005-03-311-0/+9
| | | | | | | | | | | sending signal first and only then returning ENOSYS to match what real linux does. Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=144437
* MFC: semctl(2) with IPC_STAT command should return zero in case of success.Maxim Sobolev2005-03-311-2/+3
| | | | | | | Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=144394
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2005-03-071-0/+36
| | | | Notes: svn path=/stable/5/; revision=143239
* MFC: match the LINUX32 style with existing style.David E. O'Brien2005-03-0111-65/+65
| | | | Notes: svn path=/stable/5/; revision=142899
* MFC: rev 1.162: fix Linux compat 'uname -m' on AMD64.David E. O'Brien2005-03-011-1/+7
| | | | Notes: svn path=/stable/5/; revision=142898
* Back out the rework of how we store process times in the kernel.David E. O'Brien2005-03-011-17/+11
| | | | | | | This changed the size of struct proc and thus broke the 5-STABLE kernel ABI. Notes: svn path=/stable/5/; revision=142895
* MFC: Rework how we store process times in the kernel such that we alwaysDavid E. O'Brien2005-02-281-11/+17
| | | | | | | | | store the raw values including for child process statistics and only compute the system and user timevals on demand. (See the 2004-10-05 18:51:12 UTC jhb commit for full details.) Notes: svn path=/stable/5/; revision=142767
* MFC: /*- and my license changes for sys/[a-d]*Warner Losh2005-01-304-4/+4
| | | | Notes: svn path=/stable/5/; revision=141016
* MFC: Fix the ABI wrappers to use kern_fcntl() rather than callingJohn Baldwin2004-09-031-11/+4
| | | | | | | | | fcntl() directly and mark related ABI syscalls as MP safe. Approved by: re (scottl) Notes: svn path=/stable/5/; revision=134708
* MFC: (1.52) only translate control message if we're sure it's valid.Dag-Erling Smørgrav2004-08-261-1/+2
| | | | | | | Approved by: re (scottl) Notes: svn path=/stable/5/; revision=134335
* Fix the 'DEBUG' argument code to unbreak the amd64 LINT build.David E. O'Brien2004-08-161-1/+1
| | | | Notes: svn path=/head/; revision=133850
* Fix the 'DEBUG' argument code to unbreak the amd64 LINT build.David E. O'Brien2004-08-161-2/+2
| | | | Notes: svn path=/head/; revision=133845
* Fix the 'DEBUG' argument code to unbreak the LINT build.David E. O'Brien2004-08-161-2/+2
| | | | Notes: svn path=/head/; revision=133840
* Changes to MI Linux emulation code necessary to run 32-bit Linux binariesTim J. Robbins2004-08-1612-112/+244
| | | | | | | | | | | | | | | | | | on AMD64, and the general case where the emulated platform has different size pointers than we use natively: - declare certain structure members as l_uintptr_t and use the new PTRIN and PTROUT macros to convert to and from native pointers. - declare some structures __packed on amd64 when the layout would differ from that used on i386. - include <machine/../linux32/linux.h> instead of <machine/../linux/linux.h> if compiling with COMPAT_LINUX32. This will need to be revisited before 32-bit and 64-bit Linux emulation support can coexist in the same kernel. - other small scattered changes. This should be a no-op on i386 and Alpha. Notes: svn path=/head/; revision=133816
* Replace linux_getitimer() and linux_setitimer() with implementationsTim J. Robbins2004-08-151-24/+77
| | | | | | | | based on those in freebsd32_misc.c, removing the assumption that Linux uses the same layout for struct itimerval as we use natively. Notes: svn path=/head/; revision=133749
* Avoid assuming that l_timeval is the same as the native struct timevalTim J. Robbins2004-08-151-2/+7
| | | | | | | in linux_select(). Notes: svn path=/head/; revision=133747
* Use sv_psstrings from the current process's sysentvec structure insteadTim J. Robbins2004-08-151-2/+3
| | | | | | | | | of PS_STRINGS. This is a no-op at present, but it will be needed when running 32-bit Linux binaries on amd64 to ensure PS_STRINGS is in addressable memory. Notes: svn path=/head/; revision=133745
* Add XXX comment about findcdev() misuse.Poul-Henning Kamp2004-08-141-0/+6
| | | | Notes: svn path=/head/; revision=133716
* Use kernel_vmount() instead of vfs_nmount().Poul-Henning Kamp2004-07-271-15/+4
| | | | Notes: svn path=/head/; revision=132708
* Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This isColin Percival2004-07-262-2/+2
| | | | | | | | | | | | | | somewhat clearer, but more importantly allows for a consistent naming scheme for suser_cred flags. The old name is still defined, but will be removed in a few days (unless I hear any complaints...) Discussed with: rwatson, scottl Requested by: jhb Notes: svn path=/head/; revision=132653
* I missed two pieces of the commit to this file. Robert has alreadyDavid Malone2004-07-181-1/+1
| | | | | | | added one, this adds the other. Notes: svn path=/head/; revision=132347
* Remove 'sg' argument to linux_sendto_hdrincl, which is what I think wasRobert Watson2004-07-181-1/+1
| | | | | | | intended. This fixes the build, but might require revision. Notes: svn path=/head/; revision=132331
* Add a kern_setsockopt and kern_getsockopt which can read the optionDavid Malone2004-07-171-63/+17
| | | | | | | | | values from either user land or from the kernel. Use them for [gs]etsockopt and to clean up some calls to [gs]etsockopt in the Linux emulation code that uses the stackgap. Notes: svn path=/head/; revision=132313
* Clean up and wash struct iovec and struct uio handling.Poul-Henning Kamp2004-07-101-20/+7
| | | | | | | | | | | | | | | Add copyiniov() which copies a struct iovec array in from userland into a malloc'ed struct iovec. Caller frees. Change uiofromiov() to malloc the uio (caller frees) and name it copyinuio() which is more appropriate. Add cloneuio() which returns a malloc'ed copy. Caller frees. Use them throughout. Notes: svn path=/head/; revision=131897
* Use a couple of regular kernel entry points, rather than COMPAT_43Poul-Henning Kamp2004-07-081-4/+12
| | | | | | | entry points. Notes: svn path=/head/; revision=131796
* Implement SNDCTL_DSP_SETDUPLEX. This may fix sound apps which want toAlexander Leidinger2004-07-022-0/+5
| | | | | | | | | use full duplex mode. Approved by: matk Notes: svn path=/head/; revision=131461
* Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead ofBruce Evans2004-06-231-2/+4
| | | | | | | | | | depending on namespace pollution in <sys/vnode.h> for the definition of GIANT_REQUIRED. Sorted includes. Notes: svn path=/head/; revision=130959
* Mark linux_emul_convpath() as GIANT_REQUIRED.Robert Watson2004-06-221-0/+2
| | | | Notes: svn path=/head/; revision=130902
* Add stub for Linux SOUND_MIXER_READ_RECMASK, required by some Linux soundBruce M Simpson2004-06-182-0/+5
| | | | | | | | | | applications. PR: misc/27471 Submitted by: Gavin Atkinson (with cleanups) Notes: svn path=/head/; revision=130691
* Add a stub for the Linux SOUND_MIXER_INFO ioctl (even though we don'tBruce M Simpson2004-06-182-0/+5
| | | | | | | | | | | actually implement it), as some applications, such as RealProducer, expect to be able to use it. PR: kern/65971 Submitted by: Matt Wright Notes: svn path=/head/; revision=130689
* Linux applications expect to be able to call SIOCGIFCONF with anBruce M Simpson2004-06-181-0/+14
| | | | | | | | | | | | | NULL ifc.ifc_buf pointer, to determine the expected buffer size. The submitted fix only takes account of interfaces with an AF_INET address configured. This could no doubt be improved. PR: kern/45753 Submitted by: Jacques Garrigue (with cleanups) Notes: svn path=/head/; revision=130688
* Fix the VT_SETMODE/CDROMIOCTOCENTRY problem correctly.Bruce M Simpson2004-06-181-15/+17
| | | | | | | Reviewed by: tjr Notes: svn path=/head/; revision=130687
* Fix two attempts to use an unchecked NULL pointer provided from theBruce M Simpson2004-06-181-7/+10
| | | | | | | | | userland, for the CDIOREADTOCENTRY and VT_SETMODE cases respectively. Noticed by: tjr Notes: svn path=/head/; revision=130682
* Second half of the dev_t cleanup.Poul-Henning Kamp2004-06-171-4/+4
| | | | | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc. Notes: svn path=/head/; revision=130640
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-6/+6
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Add support for more linux ioctls.Poul-Henning Kamp2004-06-142-2/+117
| | | | | | | | | | | I've had this sitting in my tree for a long time and I can't seem to find who sent it to me in the first place, apologies to whoever is missing out on a Contributed by: line here. I belive it works as it should. Notes: svn path=/head/; revision=130453
* Deorbit COMPAT_SUNOS.Poul-Henning Kamp2004-06-112-2/+2
| | | | | | | | We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days. Notes: svn path=/head/; revision=130344
* - Replace wait1() with a kern_wait() function that accepts the pid,John Baldwin2004-03-171-32/+15
| | | | | | | | | | | | | | | | | | options, status pointer and rusage pointer as arguments. It is up to the caller to copyout the status and rusage to userland if needed. This lets us axe the 'compat' argument and hide all that functionality in owait(), by the way. This also cleans up some locking in kern_wait() since it no longer has to drop locks around copyout() since all the copyout()'s are deferred. - Convert owait(), wait4(), and the various ABI compat wait() syscalls to use kern_wait() rather than wait1() or wait4(). This removes a bit more stackgap usage. Tested on: i386 Compiled on: i386, alpha, amd64 Notes: svn path=/head/; revision=127140
* Use vfs_nmount() to mount linprocfs filesystems in linux_mount();Tim J. Robbins2004-03-161-4/+21
| | | | | | | linprocfs doesn't support the old mount interface. Notes: svn path=/head/; revision=127059
* Correct size argument passed to copyinstr() in linux_mount(): mntfromnameTim J. Robbins2004-03-161-2/+2
| | | | | | | and mntonname are both MNAMELEN characters long, not MFSNAMELEN. Notes: svn path=/head/; revision=127057
* Remove unused second arg to vfinddev().Poul-Henning Kamp2004-03-111-1/+1
| | | | | | | Don't call addaliasu() on VBLK nodes. Notes: svn path=/head/; revision=126851
* Device megapatch 5/6:Poul-Henning Kamp2004-02-211-4/+4
| | | | | | | | | | | | | | | Remove the unused second argument from udev2dev(). Convert all remaining users of makedev() to use udev2dev(). The semantic difference is that udev2dev() will only locate a pre-existing dev_t, it will not line makedev() create a new one. Apart from the tiny well controlled windown in D_PSEUDO drivers, there should no longer be any "anonymous" dev_t's in the system now, only dev_t's created with make_dev() and make_dev_alias() Notes: svn path=/head/; revision=126081