aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* MFC r216572:Konstantin Belousov2010-12-261-0/+1
| | | | | | | | | Restore the ABI of struct kinfo_proc32 after r213536. Approved by: re (bz) Notes: svn path=/releng/8.2/; revision=216713
* MFC r215779,215782:Bernhard Schmidt2010-11-263-6/+150
| | | | | | | | | | Add a few functions used in newer drivers. Fix RtlCompareMemory() while here. Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/stable/8/; revision=215908
* MFC r215708:Bernhard Schmidt2010-11-264-8/+95
| | | | | | | | | | | | | | | | Resurrect amd64 support. - 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> Notes: svn path=/stable/8/; revision=215862
* MFC r215707:Bernhard Schmidt2010-11-261-1/+7
| | | | | | | | | | | Prefer pmap_extract() over pmap_kextract() as done in MmIsAddressValid(). According to the comment for MmIsAddressValid() there are issues on PAE kernels using pmap_kextract(). Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/stable/8/; revision=215861
* MFC r215741:Konstantin Belousov2010-11-262-0/+10
| | | | | | | Add include guards. Notes: svn path=/stable/8/; revision=215859
* MFC r213471:Alexander Leidinger2010-11-261-1/+1
| | | | | | | | | | | Fix a comparision of an uninitialised pointer. Submitted by: arundel Found by: clang analysis (automatic service by uqs@) Reviewed by: rdivacky Notes: svn path=/stable/8/; revision=215857
* MFC r215666:Alexander Leidinger2010-11-261-5/+5
| | | | | | | | | | Remove trailing dot from the unimplemented futex messages to make them consistent with the syscall and ipc messages. Submitted by: arundel Notes: svn path=/stable/8/; revision=215855
* MFC r215135,215419,215420:Bernhard Schmidt2010-11-252-11/+43
| | | | | | | | | | | | | - According to specs for MmAllocateContiguousMemorySpecifyCache() physically contiguous memory with requested restrictions must be allocated. - Use kmem_alloc_contig() to honour the cache_type variable. - Fix a panic on i386 for drivers using MmAllocateContiguousMemory() and MmAllocateContiguousMemorySpecifyCache(). Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/stable/8/; revision=215834
* MFC r214798:Bernhard Schmidt2010-11-253-68/+0
| | | | | | | | | Remove 4.x, 5.x and 6.x compatibility bits. Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/stable/8/; revision=215833
* MFC r213461:Bernhard Schmidt2010-11-251-8/+3
| | | | | | | | | | Use the printf-like capability from kproc_create(). Submitted by: Paul B Mahol <onemda at gmail.com> Committed by: thompsa Notes: svn path=/stable/8/; revision=215832
* MFC r198786,198816,198819:Bernhard Schmidt2010-11-257-681/+359
| | | | | | | | | | | Big style cleanup. While there remove references to FreeBSD versions older than 6.0. Submitted by: Paul B Mahol <onemda at gmail.com> Committed by: rpaulo Notes: svn path=/stable/8/; revision=215826
* Remove a stale file. It seems this file was mis-merged from current.Jung-uk Kim2010-11-221-81/+0
| | | | Notes: svn path=/stable/8/; revision=215712
* MFC r215339:Alexander Leidinger2010-11-221-5/+5
| | | | | | | | | Some style(9) fixes. Submitted by: arundel Notes: svn path=/stable/8/; revision=215662
* MFC r215338:Alexander Leidinger2010-11-222-15/+54
| | | | | | | | | | | | | | | | | | | | | - print out the PID and program name of the program trying to use an 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 Notes: svn path=/stable/8/; revision=215661
* MFC r206081:Alexander Leidinger2010-11-161-15/+23
| | | | | | | | | | | | | | | | Fix some bogus values in linprocfs. Submitted by: Petr Salinger <Petr.Salinger@seznam.cz> Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) PR: 144584 Reviewed by / discussed with: kib, des, jhb, submitter Requested by: emaste Tested by: olli Notes: svn path=/stable/8/; revision=215394
* MFC r208453:Konstantin Belousov2010-11-033-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganize syscall entry and leave handling. Implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and PL_FLAG_EXEC. The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are changed to use syscallenter()/syscallret(). MIPS and arm are not converted and use the mostly unchanged syscall() implementation. MFC r208514: Change ia64' struct syscall_args definition so that args is a pointer to the arguments array instead of array itself. MFC r208566: Allow to use syscallname(9) outside subr_trap.c. MFC r209258 (by rpaulo): Make DTrace syscall provider work again by including opt_kdtrace.h here. MFC r209313: Only enable kdtrace hook in the LINT on the architectures that implement it. MFC r209697: Obey sv_syscallnames bounds in syscallname(). NOTE: The KBI of the struct sysentvec is changed, new required members sv_set_syscall_retval, sv_fetch_syscall_args and sv_syscallnames are added. The sv_prepsyscall field is now ignored. Third-party modules using the struct sysentvec must be modified and recompiled, we believe that only ABI emulators are affected. No such out-of-tree modules are known. In-tree modules that are affected by the change were converted to depend on exact version of the kernel, see r214421. Notes: svn path=/stable/8/; revision=214755
* MFC r213716:Konstantin Belousov2010-10-271-1/+1
| | | | | | | | | | | | | | | Add macro DECLARE_MODULE_TIED to denote a module as requiring the 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. Notes: svn path=/stable/8/; revision=214421
* MFC r212723 (by des):Konstantin Belousov2010-10-191-41/+169
| | | | | | | | | | Implement proc/$$/environment. MFC r213246: Rework linprocfs_doprocenviron() and linprocfs_doproccmdline(). Notes: svn path=/stable/8/; revision=214050
* MFC r213846:Konstantin Belousov2010-10-171-5/+0
| | | | | | | Remove stale comment. Notes: svn path=/stable/8/; revision=213975
* MFC: r211823Jung-uk Kim2010-08-301-1/+2
| | | | | | | | | Check opcode for short jump as well. Some option ROMs do short jumps (e.g., some NVIDIA video cards) and we were not able to do POST while resuming because we only honored long jump. Notes: svn path=/stable/8/; revision=212003
* MFC r211006:Konstantin Belousov2010-08-141-1/+2
| | | | | | | | Prefer struct sysentvec sv_psstrings to hardcoding FREEBSD32_PS_STRINGS in the compat32 code. Use sv_usrstack instead of FREEBSD32_USRSTACK as well. Notes: svn path=/stable/8/; revision=211302
* MFC r211005:Konstantin Belousov2010-08-141-0/+18
| | | | | | | Add compat32 definition for (old) struct ostat. Notes: svn path=/stable/8/; revision=211300
* MFC r210848:Konstantin Belousov2010-08-111-0/+1
| | | | | | | Copy inode birthtime to the struct stat32. Notes: svn path=/stable/8/; revision=211174
* MFC r210847:Konstantin Belousov2010-08-111-1/+2
| | | | | | | Fix style. Notes: svn path=/stable/8/; revision=211173
* MFC r210796:Konstantin Belousov2010-08-101-0/+2
| | | | | | | | | | When compat32 recvmsg(2) does not need to copy out control messages, set msg_controllen to 0. PR: kern/149227 Notes: svn path=/stable/8/; revision=211138
* MFC r200107,200109-200110,202364,202376,205678,207569:Alexander Leidinger2010-07-294-1/+825
| | | | | | | | | Merge linux emulation parts for video4linux support (requires a native v4l device, e.g. something which works with ports://multimedia/webcamd). Notes: svn path=/stable/8/; revision=210608
* MFC r209687:Konstantin Belousov2010-07-112-2/+2
| | | | | | | Constify source argument for siginfo_to_siginfo32(). Notes: svn path=/stable/8/; revision=209894
* MFC r207008:Konstantin Belousov2010-04-281-0/+82
| | | | | | | | | | Provide compat32 shims for kinfo_proc sysctl. MFC r207016: Fix typo. Notes: svn path=/stable/8/; revision=207317
* MFC r207007:Konstantin Belousov2010-04-282-33/+28
| | | | | | | | Extract the code to copy-out struct rusage32 from struct rusage into the new function. Notes: svn path=/stable/8/; revision=207316
* Regen.Konstantin Belousov2010-04-074-53/+123
| | | | Notes: svn path=/stable/8/; revision=206354
* MFC r205327:Konstantin Belousov2010-04-071-1/+0
| | | | | | | Remove empty line. Notes: svn path=/stable/8/; revision=206353
* MFC r205325:Konstantin Belousov2010-04-072-6/+25
| | | | | | | Implement compat32 shims for mqueuefs. Notes: svn path=/stable/8/; revision=206351
* MFC r205324:Konstantin Belousov2010-04-071-11/+15
| | | | | | | Implement compat32 shims for ksem syscalls. Notes: svn path=/stable/8/; revision=206350
* MFC r205323:Konstantin Belousov2010-04-072-548/+21
| | | | | | | | | | | | | | | Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding sysv_{msg,sem,shm}.c files. Mark SysV IPC freebsd32 syscalls as NOSTD and add required SYSCALL_INIT_HELPER/SYSCALL32_INIT_HELPERs to provide auto register/unregister on module load. This makes COMPAT_FREEBSD32 functional with SysV IPC compiled and loaded as modules. Notes: svn path=/stable/8/; revision=206349
* MFC r205322:Konstantin Belousov2010-04-072-54/+8
| | | | | | | | Move SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to sysv_ipc.c. Notes: svn path=/stable/8/; revision=206348
* MFC r205321:Konstantin Belousov2010-04-072-0/+41
| | | | | | | | | | Introduce SYSCALL_INIT_HELPER and SYSCALL32_INIT_HELPER macros and neccessary support functions to allow registering dynamically loaded syscalls from the MOD_LOAD handlers. Helpers handle registration failures semi-automatically. Notes: svn path=/stable/8/; revision=206347
* MFC r205320:Konstantin Belousov2010-04-071-1/+1
| | | | | | | | | | For SYSCALL_MODULE_HELPER, use "sys/<syscallname>" module name. For SYSCALL32_MODULE_HELPER, use "sys32/<syscallname>" module name. This avoids modules name conflict when compat32 syscall does not need shims. Notes: svn path=/stable/8/; revision=206346
* MFC r205319:Konstantin Belousov2010-04-072-1/+4
| | | | | | | Make freebsd32_copyiniov() available outside of freebsd32_misc. Notes: svn path=/stable/8/; revision=206344
* Regen after MFC of COMPAT_FREEBSD32.Nathan Whitehorn2010-04-074-42/+203
| | | | Notes: svn path=/stable/8/; revision=206337
* MFC r205014,205015:Nathan Whitehorn2010-04-076-205/+245
| | | | | | | | | | | | | | | | Provide groundwork for 32-bit binary compatibility on non-x86 platforms, for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32 option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts of the kernel and enhances the freebsd32 compatibility code to support big-endian platforms. This MFC is required for MFCs of later changes to the freebsd32 compatibility from HEAD. Requested by: kib Notes: svn path=/stable/8/; revision=206336
* MFC: r205297, r205347, r205452, r205455, r205649, r205650Jung-uk Kim2010-03-311-23/+125
| | | | | | | | | | | | | | | Sync. x86bios with HEAD. - Detect illegal access to unmapped memory within real mode emulator. - Map EBDA if available and support memory wraparound above 1MB as VM86 does. - Set initial %ds to 0x40 as X.org int10 handler does. - Print the initial memory map when bootverbose is set. - Optimize real mode page table lookup. - Add strictly aligned memory access for distant future. - Update copyright date. Notes: svn path=/stable/8/; revision=205981
* MFC: r205647Jung-uk Kim2010-03-291-2/+2
| | | | | | | | | | | Fix stupid typos. Some VESA BIOSes directly call BIOS interrupt handlers within the VBE interrupt handler. Unfortunately it was causing real mode page faults because we were fetching instructions from bogus addresses. PR: kern/144654 Notes: svn path=/stable/8/; revision=205837
* MFC x86emu/x86bios emulator and make previously i386 only dpms and vesaXin LI2010-03-023-0/+783
| | | | | | | | | | | | | | | | framebuffer driver, etc. work on FreeBSD/amd64. A significant amount of improvements were done by jkim@ during the recent months to make vesa(4) work better, over the initial code import. This work is based on OpenBSD's x86emu implementation and contributed by paradox <ddkprog yahoo com> and swell.k at gmail com. Hopefully I have stolen all their work to 8-STABLE :) All bugs in this commit are mine, as usual. Notes: svn path=/stable/8/; revision=204546
* MFC r202143,202163,202341,202342,204278Brooks Davis2010-02-243-3/+3
| | | | | | | | | | | | | | | | | | | | Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic kern.ngroups+1. kern.ngroups can range from NGROUPS_MAX=1023 to somewhere in the neighborhood of INT_MAX/4 one a system with sufficent RAM and memory bandwidth. Given that the Windows group limit is 1024, this range should be sufficient for most applications r202342: Only allocate the space we need before calling kern_getgroups instead of allocating what ever the user asks for up to "ngroups_max + 1". On systems with large values of kern.ngroups this will be more efficient. The now redundant check that the array is large enough in kern_getgroups() is deliberate to allow this change to be merged to stable/8 without breaking potential third party consumers of the API. Notes: svn path=/stable/8/; revision=204293
* MFC r203728:Xin LI2010-02-231-2/+7
| | | | | | | | | | | | | | | - Return EAFNOSUPPORT instead of EINVAL for unsupported address family, this matches the Linux behavior. - Check if we have sufficient space allocated for socket structure, which fixes a buffer overflow when wrong length is being passed into the emulation layer. [1] PR: kern/138860 Submitted by: Mateusz Guzik <mjguzik gmail com> Reported by: Alexander Best [1] Notes: svn path=/stable/8/; revision=204232
* MFC a number of changes from head for ISP (203478,203463,203444,202418,201758,Matt Jacob2010-02-111-1/+1
| | | | | | | | 201408,201325,200089,198822,197373,197372,197214,196162). Since one of those changes was a semicolon cleanup from somebody else, this touches a lot more. Notes: svn path=/stable/8/; revision=203786
* MFC r200667:Konstantin Belousov2009-12-211-1/+1
| | | | | | | Return earlier from linux_do_tkill() when supplied signal number is 0. Notes: svn path=/stable/8/; revision=200768
* RegenKonstantin Belousov2009-12-194-5/+18
| | | | Notes: svn path=/stable/8/; revision=200728
* MFC r198508, r198509:Konstantin Belousov2009-12-192-0/+39
| | | | | | | | | | Reimplement pselect() in kernel, making change of sigmask and sleep atomic. MFC r198538: Move pselect(3) man page to section 2. Notes: svn path=/stable/8/; revision=200725
* MFC r198507:Konstantin Belousov2009-12-191-16/+7
| | | | | | | | | | | | | | | | | Use kern_sigprocmask() instead of direct manipulation of td_sigmask to reschedule newly blocked signals. MFC r198590: Trapsignal() calls kern_sigprocmask() when delivering catched signal with proc lock held. MFC r198670: For trapsignal() and postsig(), kern_sigprocmask() is called with both process lock and curproc->p_sigacts->ps_mtx locked. Prevent lock recursion on ps_mtx in reschedule_signals(). Notes: svn path=/stable/8/; revision=200722