summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Yet another unimplemented futex operation, print out about.dchagin2011-01-312-0/+8
| | | | | Submitted by: arundel MFC after: 1 month.
* Implement a futex BITSET op.dchagin2011-01-312-25/+46
| | | | | Submitted by: arundel MFC after: 1 month.
* Update interface stats counters to match the current format in linux andbz2011-01-311-8/+31
| | | | | | | | try to export as much information as we can match. Requested on: Debian GNU/kFreeBSD list (debian-bsd lists.debian.org) 2010-12 Tested by: Mats Erik Andersson (mats.andersson gisladisker.se) MFC after: 10 days
* Style(9) fixes.dchagin2011-01-281-28/+28
| | | | MFC after: 1 Month.
* Implement a variation of the linux_common_wait() which shoulddchagin2011-01-282-63/+28
| | | | | | | | | be used by linuxolator itself. Move linux_wait4() to MD path as it requires native struct rusage translation to struct l_rusage on linux32/amd64. MFC after: 1 Month.
* Style(9) fix.dchagin2011-01-281-1/+1
| | | | MFC after: 1 month.
* Add macro to test the sv_flags of any process. Change some places to testdchagin2011-01-261-1/+1
| | | | | | | the flags instead of explicit comparing with address of known sysentvec structures. MFC after: 1 month
* Style(9) fix.dchagin2011-01-231-1/+1
| | | | | Approved by: kib(mentor) MFC after: 1 month
* In linuxolator getdents_common(), it seems there is no reason to loopkib2011-01-191-3/+4
| | | | | | | | | | | | if no records where returned by VOP_READDIR(). Readdir implementations allowed to return 0 records when first record is larger then supplied buffer. In this case trying to execute VOP_READDIR() again causes the syscall looping forewer. The goto was there from the day 1, which goes back to 1995 year. Reported and tested by: Beat G?tzi <beat chruetertee ch> MFC after: 2 weeks
* Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.mdf2011-01-191-2/+3
|
* Create shared (readonly) page. Each ABI may specify the use of page bykib2011-01-083-8/+22
| | | | | | | | | | | | | setting SV_SHP flag and providing pointer to the vm object and mapping address. Provide simple allocator to carve space in the page, tailored to put the code with alignment restrictions. Enable shared page use for amd64, both native and 32bit FreeBSD binaries. Page is private mapped at the top of the user address space, moving a start of the stack one page down. Move signal trampoline code from the top of the stack to the shared page. Reviewed by: alc
* Fix the LINUX_SOUND_MIXER_INFO ioctl to return success after thescf2010-12-302-2/+7
| | | | | | | | | | | | information is set to FreeBSD. It had been falling through to the end of linux_ioctl_sound() and returning ENOIOCTL. Noticed when running the Linux ALSA amixer tool. Add a LINUX_SOUND_MIXER_READ_CAPS ioctl which is used by the Skype v2.1.0.81 binary. Reviewed by: gavin MFC after: 2 weeks
* Merge amd64 and i386 bus.h and move the resulting header to x86. Replacetijl2010-12-201-7/+2
| | | | | | | | | the original amd64 and i386 headers with stubs. Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere. Reviewed by: imp (previous version), jhb Approved by: kib (mentor)
* Restore the ABI of struct kinfo_proc32 after r213536.kib2010-12-191-0/+1
| | | | MFC after: 3 days
* Implement NdisGetRoutineAddress and MmGetSystemRoutineAddress used inbschmidt2010-12-065-0/+40
| | | | | | newer Ralink drivers. Submitted by: Paul B Mahol <onemda at gmail.com>
* Add a dummy for IoOpenDeviceRegistryKey().bschmidt2010-11-291-0/+10
| | | | | | | | With that change the Atheros 9xxx driver is actually usable and does not panic anymore. Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 2 weeks
* Some drivers rely on the existence of certain keys. The Atheros 9xxxbschmidt2010-11-291-0/+10
| | | | | | | | driver for example requests the NetCfgInstanceId but doesn't check the returned status code and will happily access random memory instead. Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 2 weeks
* Add prototype for InitializeSListHead().bschmidt2010-11-231-0/+1
|
* Add a few functions used in newer drivers. Fix RtlCompareMemory() whilebschmidt2010-11-233-6/+149
| | | | | | here. Submitted by: Paul B Mahol <onemda@gmail.com>
* Update MNT_ROOTFS comments after changes in the root mount logic.pluknet2010-11-231-1/+2
| | | | | | Reported by: arundel Suggested by: marcel (phrasing) Approved by: kib (mentor)
* Add include guards.kib2010-11-232-0/+10
| | | | MFC after: 3 days
* Resurrect amd64 support.bschmidt2010-11-224-8/+95
| | | | | | | | | | | | - Many drivers on amd64 are picking system uptime, interrupt time and ticks via global data structure instead of calling functions for performance reasons. For now just patch such address so driver will not trigger page fault when trying to access such data. In future, additional callout may be added to update data in periodic intervals. - On amd64 we need to allocate "shadow space" on stack before calling any function. Submitted by: Paul B Mahol <onemda at gmail.com>
* Prefer pmap_extract() over pmap_kextract() as done in MmIsAddressValid().bschmidt2010-11-221-1/+7
| | | | | | | According to the comment for MmIsAddressValid() there are issues on PAE kernels using pmap_kextract(). Submitted by: Paul B Mahol <onemda at gmail.com>
* Fix linux kernel module breakage introduced in r215675, by includingdim2010-11-221-0/+1
| | | | | | | <sys/sysent.h>. Noticed by: many Pointy hat to: netchild
* Add the ability for GDB to printout the thread name along with otherattilio2010-11-221-0/+5
| | | | | | | | | | | | | | | | | | | | thread specific informations. In order to do that, and in order to avoid KBI breakage with existing infrastructure the following semantic is implemented: - For live programs, a new member to the PT_LWPINFO is added (pl_tdname) - For cores, a new ELF note is added (NT_THRMISC) that can be used for storing thread specific, miscellaneous, informations. Right now it is just popluated with a thread name. GDB, then, retrieves the correct informations from the corefile via the BFD interface, as it groks the ELF notes and create appropriate pseudo-sections. Sponsored by: Sandvine Incorporated Tested by: gianni Discussed with: dim, kan, kib MFC after: 2 weeks
* Do not take the process lock. The assignment to u_short inside thenetchild2010-11-221-5/+3
| | | | | | | | | | | properly aligned structure is atomic on all supported architectures, and the thread that should see side-effect of assignment is the same thread that does assignment. Use a more appropriate conditional to detect the linux ABI. Suggested by: kib X-MFC: together with r215664
* Remove trailing dot from the unimplemented futex messages to makenetchild2010-11-221-5/+5
| | | | | | | them consistent with the syscall and ipc messages. Submitted by: arundel MFC after: 3 days
* By using the 32-bit Linux version of Sun's Java Development Kit 1.6netchild2010-11-223-22/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | on FreeBSD (amd64), invocations of "javac" (or "java") eventually end with the output of "Killed" and exit code 137. This is caused by: 1. After calling exec() in multithreaded linux program threads are not destroyed and continue running. They get killed after program being executed finishes. 2. linux_exit_group doesn't return correct exit code when called not from group leader. Which happens regularly using sun jvm. The submitters fix this in a similar way to how NetBSD handles this. I took the PRs away from dchagin, who seems to be out of touch of this since a while (no response from him). The patches committed here are from [2], with some little modifications from me to the style. PR: 141439 [1], 144194 [2] Submitted by: Stefan Schmidt <stefan.schmidt@stadtbuch.de>, gk Reviewed by: rdivacky (in april 2010) MFC after: 5 days
* Fix a panic on i386 for drivers using MmAllocateContiguousMemory()bschmidt2010-11-171-2/+2
| | | | | | | | | | | | and MmAllocateContiguousMemorySpecifyCache(). Those two functions take 64-bit variable(s) for their arguments. On i386 that takes additional 32-bit variable per argument. This is required so that windrv_wrap() can correctly wrap function that miniport driver calls with stdcall convention. Similar explanation is provided in subr_ndis.c for other functions. Submitted by: Paul B Mahol <onemda at gmail.com>
* Use kmem_alloc_contig() to honour the cache_type variable.bschmidt2010-11-172-6/+41
| | | | Pointed out by: alc
* Remove no-op assignment.des2010-11-151-2/+2
| | | | | Submitted by: clang via arundel@ MFC after: 2 weeks
* Some style(9) fixes.netchild2010-11-151-5/+5
| | | | | Submitted by: arundel MFC after: 1 week
* - print out the PID and program name of the program trying to use annetchild2010-11-152-15/+54
| | | | | | | | | | | | | | | | | unsupported futex operation - for those futex operations which are known to be not supported, print out which futex operation it is - shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in some cases: FUTEX_CLOCK_REALTIME can be used to tell linux to use CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME however must only be set, if either FUTEX_WAIT_BITSET or FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case we can die with ENOSYS right at the beginning. Submitted by: arundel Reviewed by: rdivacky (earlier iteration of the patch) MFC after: 1 week
* According to specs for MmAllocateContiguousMemorySpecifyCache() physicallybschmidt2010-11-111-6/+3
| | | | | | contiguous memory with requested restrictions must be allocated. Submitted by: Paul B Mahol <onemda at gmail.com>
* Break long line.des2010-11-081-1/+2
|
* Fix CPU ID in /proc/cpuinfo.des2010-11-081-4/+4
| | | | | | PR: kern/56451 Submitted by: arundel@ MFC after: 3 weeks
* Remove 4.x, 5.x and 6.x compatibility bits.bschmidt2010-11-043-68/+0
| | | | Submitted by: Paul B Mahol <onemda at gmail.com>
* Remove stale comment.kib2010-10-141-5/+0
| | | | | Submitted by: arundel MFC after: 3 days
* Add macro DECLARE_MODULE_TIED to denote a module as requiring thekib2010-10-121-1/+1
| | | | | | | | | | | | | | | kernel of exactly the same __FreeBSD_version as the headers module was compiled against. Mark our in-tree ABI emulators with DECLARE_MODULE_TIED. The modules use kernel interfaces that the Release Engineering Team feel are not stable enough to guarantee they will not change during the life cycle of a STABLE branch. In particular, the layout of struct sysentvec is declared to be not part of the STABLE KBI. Discussed with: bz, rwatson Approved by: re (bz, kensmith) MFC after: 2 weeks
* Simplify timeout check in futex_wait() using itimerfix() and return errorjkim2010-10-061-22/+10
| | | | | if the given timeout is invalid. Consistently use int type for timeout and correct a format string in futex_sleep().
* Fix a comparision of an uninitialised pointer.netchild2010-10-061-1/+1
| | | | | | Submitted by: arundel Found by: clang analysis (automatic service by uqs@) Reviewed by: rdivacky
* Use the printf-like capability from kproc_create().thompsa2010-10-051-8/+3
| | | | Submitted by: Paul B Mahol
* Prefer pmap_unmapbios() over pmap_unmapdev(). The binary does not changejkim2010-10-051-1/+1
| | | | after this because pmap_unmapbios() is a macro for pmap_unmapdev() on amd64.
* In linprocfs_doargv():kib2010-09-281-97/+117
| | | | | | | | | | | | | | | | | | | | | | | - handle compat32 processes; - remove the checks for copied in addresses to belong into valid usermode range, proc_rwmem() does this; - simplify loop reading single string, limit the total amount of strings collected by ARG_MAX bytes; - correctly add '\0' at the end of each copied string; - fix style. In linprocfs_doprocenviron(): - unlock the process before calling copyin code [1]. The process is held by pseudofs. In linprocfs_doproccmdline: - use linprocfs_doargv() to handle !curproc case for which p_args is not cached. Reported by: plulnet [1] Tested by: pluknet Approved by: des (linprocfs maintainer, previous version of the patch) MFC after: 3 weeks
* Implement proc/$$/environment.des2010-09-161-2/+110
| | | | | Submitted by: Fernando ApesteguĂ­a <fernando.apesteguia@gmail.com> MFC after: 3 weeks
* Replace sbuf_overflowed() with sbuf_error(), which returns any errormdf2010-09-101-2/+2
| | | | | | code associated with overflow or with the drain function. While this function is not expected to be used often, it produces more information in the form of an errno that sbuf_overflowed() did.
* Add x86bios_set_intr() to set interrupt vectors for real mode and simplifyjkim2010-08-252-3/+15
| | | | x86bios_get_intr() a little.
* Check opcode for short jump as well. Some option ROMs do short jumpsjkim2010-08-251-1/+2
| | | | | | | (e.g., some NVIDIA video cards) and we were not able to do POST while resuming because we only honored long jump. MFC after: 3 days
* Supply some useful information to the started image using ELF aux vectors.kib2010-08-171-3/+26
| | | | | | | | In particular, provide pagesize and pagesizes array, the canary value for SSP use, number of host CPUs and osreldate. Tested by: marius (sparc64) MFC after: 1 month
* Place spinlock_enter() and spinlock_exit() just around X86EMU calls.jkim2010-08-101-4/+4
|
OpenPOWER on IntegriCloud