summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* - Always call exec_free_args() in kern_execve() instead of doing it in alljhb2006-02-062-3/+0
| | | | | | the callers if the exec either succeeds or fails early. - Move the code to call exit1() if the exec fails after the vmspace is gone to the bottom of kern_execve() to cut down on some code duplication.
* - Remove ifdef disabled code that doesn't have a chance of working anymore.jeff2006-02-061-48/+0
|
* Regenerate.rwatson2006-02-044-196/+196
|
* Audit FreeBSD 32-bit system calls on 64-bit FreeBSD systems.rwatson2006-02-041-216/+216
| | | | Obtained from: TrustedBSD Project
* - vn_lock with LK_RETRY can not return an error. The code that handled thisjeff2006-01-301-10/+4
| | | | | | case was not necessary. Sponsored by: Isilon Systems, Inc.
* Fix a typo : deivce => devicecognet2006-01-261-1/+1
| | | | Spotted by: rwatson
* Linux compat bits needed to make linux programs use the new ptys :cognet2006-01-263-1/+33
| | | | | | | | | | linux_ioctl.[ch] : Implement LINUX_TIOCGPTN, which returns the pty number linux_stats.c : - Return the magic number for devfs. - In various stats()-related functions, check that we're stating a file in /dev/pts, and if so, change the st_rdev field to match what linux expects to be there for a slave pty device. The glibc checks for this, and their openpty() fails if it is no correct.
* Fix the build. When I added the lutimes the futimes definitionsambrisko2006-01-201-0/+5
| | | | | | | | went away in the generated files? This didn't happen on my amd64 test machine but did when I committed it on my other i386 machine. I need to figure this out since a regen on the amd64 doesn't fix it now. For now make the build work again. Matt caught this before my local mirror caught up.
* Regen.ambrisko2006-01-204-9/+9
|
* Add 32bit version of lutimes so untar doesn't mess up sym-links on amd64.ambrisko2006-01-202-2/+23
|
* Cast tv_sec to intmax_t and print with %jd in some ifdef'ed code.trhodes2005-12-281-8/+8
|
* Add \n to log() message.glebius2005-12-271-1/+1
| | | | Submitted by: Stanislaw Halik <weirdo tehran.lain.pl>
* Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structuresobomax2005-12-261-0/+2
| | | | | | | | | | with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually allow executing elf dynamic binaries (aka shared libraries). When it is requested to execute ET_DYN elf image check if this flag is on after we know the elf brand allowing execution if so. PR: kern/87615 Submitted by: Marcin Koziej <creep@desk.pl>
* Regen.ru2005-12-234-10/+4
|
* Fix build.ru2005-12-231-1/+1
|
* Regenerate sysent with new abort2 system call.phk2005-12-234-5/+30
| | | | | | Implement abort2(const char *reason, int narg, void **args); Submitted by: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
* Add missing 455-462 syscalls as unimplementedphk2005-12-231-0/+8
|
* Add abort2() systemcall.phk2005-12-231-0/+1
|
* Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1)jhb2005-12-152-9/+0
| | | | | | | | | which existed to cleanup the linux_osname mutex. Now that MTX_SYSINIT() has grown a SYSUNINIT to destroy mutexes on unload, the extra destroy here was redundant and resulted in panics in debug kernels. MFC after: 1 week Reported by: Goran Gajic ggajic at afrodita dot rcub dot bg dot ac dot yu
* In Linux, kernel parameters passed to ioctl are by value, while in FreeBSDdelphij2005-12-131-5/+5
| | | | | | | 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>
* Fix calculation of meminfo's swaptotal and swapfree on at least amd64.mlaier2005-12-111-2/+2
| | | | MFC after: 3 days
* Regen for futimes.ambrisko2005-12-084-3/+8
|
* Add 32bit version of futimes so untar doesn't result in bad datesambrisko2005-12-082-1/+24
| | | | | | (Jan 1, 1970) when run on amd64. Reviewed by: ps
* Suppress logging about unimplemented syscalls to one time per process. Thisglebius2005-12-081-9/+7
| | | | | | prevents hard flood of the system console. Reviewed by: bde
* Catch up to the system siginfo changes. Use a union for the ia32 layoutpeter2005-12-061-2/+19
| | | | | of siginfo just like the system one. There are now two fields to copy instead of one.
* Fix -Wundef.ru2005-12-042-2/+2
|
* Remove MNT_NODEV mount option. In RELENG_6, MNT_NODEV was a no-op.rodrigc2005-11-291-1/+0
| | | | | | The presence of MNT_NODEV was confusing the am-utils autoconf scripts. PR: conf/79715
* Somehow memmove() got mapped to memset() in the patch table. Create awpaul2005-11-231-1/+12
| | | | real memmove() implementation and use that instead.
* Correct the API for Windows interupt handling a little. The prototypewpaul2005-11-202-11/+13
| | | | | | | | | | | | | | | | | | | | | | | for a Windows ISR is 'BOOLEAN isrfunc(KINTERRUPT *, void *)' meaning the ISR get a pointer to the interrupt object and a context pointer, and returns TRUE if the ISR determines the interrupt was really generated by the associated device, or FALSE if not. I had mistakenly used 'void isrfunc(void *)' instead. It happens the only thing this affects is the internal ndis_intr() ISR in subr_ndis.c, but it should be fixed just in case we ever need to register a real Windows ISR vi IoConnectInterrupt(). For NDIS miniports that provide a MiniportISR() method, the 'is_our_intr' value returned by the method serves as the return value from ndis_isr(), and 'call_isr' is used to decide whether or not to schedule the interrupt handler via DPC. For drivers that only supply MiniportEnableInterrupt() and MiniportDisableInterrupt() methods, call_isr is always TRUE and is_our_intr is always FALSE. In the end, there should be no functional changes, except that now ntoskrnl_intr() can terminate early once it finds the ISR that wants to service the interrupt.
* Unlike the rest of the world, NDIS code can access "structru2005-11-141-1/+2
| | | | | ifnet" before is has been fully initialized by if_attach(). Account for that to avoid a null pointer dereference.
* Restore backwards source compatibility with 6.x and 5.x.wpaul2005-11-131-2/+6
|
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-4/+4
| | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
* Implement RtlZeroMemory() and RtlCopyMemory(). This seems to allowwpaul2005-11-101-0/+23
| | | | the Broadcom Win64 wireless driver for the BCM4318 to work on amd64.
* Change the definition for EXT_NDIS to EXT_NET_DRV. Since the latestwpaul2005-11-071-1/+1
| | | | | mbuf code changes, MEXTADD() can be used to add an external buffer with arbitrary type, but mb_ext_free() won't let you free it.
* The latest version of the Intel 2200BG/2915ABG driver (9.0.0.3-9) fromwpaul2005-11-063-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel's web site requires some minor tweaks to get it to work: - The driver seems to have been released with full WMI tracing enabled, and makes references to some WMI APIs, namely IoWMIRegistrationControl(), WmiQueryTraceInformation() and WmiTraceMessage(). Only the first one is ever called (during intialization). These have been implemented as do-nothing stubs for now. Also added a definition for STATUS_NOT_FOUND to ntoskrnl_var.h, which is used as a return code for one of the WMI routines. - The driver references KeRaiseIrqlToDpcLevel() and KeLowerIrql() (the latter as a function, which is unusual because normally KeLowerIrql() is a macro in the Windows DDK that calls KfLowewIrql()). I'm not sure why these are being called since they're not really part of WDM. Presumeably they're being used for backwards compatibility with old versions of Windows. These have been implemented in subr_hal.c. (Note that they're _stdcall routines instead of _fastcall.) - When querying the OID_802_11_BSSID_LIST OID to get a BSSID list, you don't know ahead of time how many networks the NIC has found during scanning, so you're allowed to pass 0 as the list length. This should cause the driver to return an 'insufficient resources' error and set the length to indicate how many bytes are actually needed. However for some reason, the Intel driver does not honor this convention: if you give it a length of 0, it returns some other error and doesn't tell you how much space is really needed. To get around this, if using a length of 0 yields anything besides the expected error case, we arbitrarily assume a length of 64K. This is similar to the hack that wpa_supplicant uses when doing a BSSID list query.
* Copy out the number of iovecs in freebsd32_recvmsg, not the lengthps2005-11-061-1/+1
| | | | of a single iovec.
* Calling setrlimit from 32bit apps could potentially increase certainps2005-11-021-3/+2
| | | | | | | limits beyond what should be capiable in a 32bit process, so we must fixup the limits. Reviewed by: jhb
* Tests with my dual Opteron system have shown that it's possiblewpaul2005-11-026-96/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for code to start out on one CPU when thunking into Windows mode in ctxsw_utow(), and then be pre-empted and migrated to another CPU before thunking back to UNIX mode in ctxsw_wtou(). This is bad, because then we can end up looking at the wrong 'thread environment block' when trying to come back to UNIX mode. To avoid this, we now pin ourselves to the current CPU when thunking into Windows code. Few other cleanups, since I'm here: - Get rid of the ndis_isr(), ndis_enable_interrupt() and ndis_disable_interrupt() wrappers from kern_ndis.c and just invoke the miniport's methods directly in the interrupt handling routines in subr_ndis.c. We may as well lose the function call overhead, since we don't need to export these things outside of ndis.ko now anyway. - Remove call to ndis_enable_interrupt() from ndis_init() in if_ndis.c. We don't need to do it there anyway (the miniport init routine handles it, if needed). - Fix the logic in NdisWriteErrorLogEntry() a little. - Change some NDIS_STATUS_xxx codes in subr_ntoskrnl.c into STATUS_xxx codes. - Handle kthread_create() failure correctly in PsCreateSystemThread().
* Retire MT_HEADER mbuf type and change its users to use MT_DATA.andre2005-11-021-1/+1
| | | | | | | | | | | | Having an additional MT_HEADER mbuf type is superfluous and redundant as nothing depends on it. It only adds a layer of confusion. The distinction between header mbuf's and data mbuf's is solely done through the m->m_flags M_PKTHDR flag. Non-native code is not changed in this commit. For compatibility MT_HEADER is mapped to MT_DATA. Sponsored by: TCP/IP Optimization Fundraise 2005
* Clean up one remaining 'multiple DPC thread' bogon: only bzero() onewpaul2005-11-011-0/+4
| | | | sizeof(kq_queue), not sizeof(kq_queue) * mp_ncpus.
* Reformat socket control messages on input/output for 32bit compatibilityps2005-10-311-18/+225
| | | | | | | on 64bit systems. Submitted by: ps, ups Reviewed by: jhb
* Regenerate (with the correct #ifdef COMPAT_43 tests now)peter2005-10-264-64/+70
|
* There is no 'freebsd3_' prefix for COMPAT_43 syscalls. Those are allpeter2005-10-262-31/+28
| | | | | bundled under MCOMPAT and have an 'o' prefix. Adjust as appropriate. This re-enables compiling without COMPAT_43 again.
* Minor nit: in ntoskrnl_finddev(), only free the 'children' device_twpaul2005-10-261-2/+9
| | | | array if device_find_children() actually returned a non-NULL array pointer.
* Clean up and apply the fix for PR 83477. The calculation for locatingwpaul2005-10-262-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the start of the section headers has to take into account the fact that the image_nt_header is really variable sized. It happens that the existing calculation is correct for _most_ production binaries produced by the Windows DDK, but if we get a binary with oddball offsets, the PE loader could crash. Changes from the supplied patch are: - We don't really need to use the IMAGE_SIZEOF_NT_HEADER() macro when computing how much of the header to return to callers of pe_get_optional_header(). While it's important to take the variable size of the header into account in other calculations, we never actually look at anything outside the non-variable portion of the header. This saves callers from having to allocate a variable sized buffer off the heap (I purposely tried to avoid using malloc() in subr_pe.c to make it easier to compile in both the -D_KERNEL and !-D_KERNEL case), and since we're copying into a buffer on the stack, we always have to copy the same amount of data or else we'll trash the stack something fierce. - We need <stddef.h> to get offsetof() in the !-D_KERNEL case. - ndiscvt.c needs the IMAGE_FIRST_SECTION() macro too, since it does a little bit of section pre-processing. PR: kern/83477
* Get rid of the timer tracking and reaping code in NdisMInitializeTimer()wpaul2005-10-264-47/+118
| | | | | | | | | | | | | | | | | | | | and ndis_halt_nic(). It's been disabled for some time anyway, and it turns out there's a possible deadlock in NdisMInitializeTimer() when acquiring the miniport block lock to modify the timer list: it's possible for a driver to call NdisMInitializeTimer() when the miniport block lock has already been acquired by an earlier piece of code. You can't acquire the same spinlock twice, so this can deadlock. Also, implement MmMapIoSpace() and MmUnmapIoSpace(), and make NdisMMapIoSpace() and NdisMUnmapIoSpace() use them. There are some drivers that want MmMapIoSpace() and MmUnmapIoSpace() so that they can map arbitrary register spaces not directly associated with their device resources. For example, there's an Atheros driver for a miniPci card (0x168C:0x1014) on the IBM Thinkpad x40 that wants to map some I/O spaces at 0xF00000 and 0xE00000 which are held by the acpi0 device. I don't know what it wants these ranges for, but if it can't map and access them, the MiniportInitialize() method fails.
* Fix handling of message table messages that got broken when Iwpaul2005-10-241-5/+5
| | | | | converted NdisWriteErrorLogEntry() to use the RtlXXX unicode/ansi conversion routines.
* Add a 'clean' target.obrien2005-10-231-0/+3
|
* regenps2005-10-234-26/+66
|
* Implement for FreeBSD 3 32 binaries:ps2005-10-232-8/+219
| | | | | sigaction, sigprocmask, sigpending, sigvec, sigblock, sigsetmask, sigsuspend, sigstack
OpenPOWER on IntegriCloud