#
ede8dc43 |
| 19-Mar-1996 |
Bruce Evans <bde@FreeBSD.org> |
Fixed unsigned longs that should have been vm_offset_t.
vm_offset_t is currently unsigned long but should probably be plain unsigned for i386's to match the choice of minimal types to represent for
Fixed unsigned longs that should have been vm_offset_t.
vm_offset_t is currently unsigned long but should probably be plain unsigned for i386's to match the choice of minimal types to represent for fixed-width types in Lite2. Anyway, it shouldn't be assumed to be unsigned long.
I only fixed the type mismatches that were detected when I changed vm_offset_t to unsigned. Only pointer type mismatches were detected.
show more ...
|
#
71d7d1b1 |
| 12-Mar-1996 |
Peter Wemm <peter@FreeBSD.org> |
Remove references to MAP_FILE.. That is now "default" and is only a "#define MAP_FILE 0" that is still there for net-2 source compatability.
|
#
0946c36c |
| 11-Mar-1996 |
Peter Wemm <peter@FreeBSD.org> |
Fix the vm_map_remove and vm_map_protect calls.. Somewhere along the line, these had got (start, length) arguments instead of (start, end) args. This could be the cause of Robert Sanders lockups wi
Fix the vm_map_remove and vm_map_protect calls.. Somewhere along the line, these had got (start, length) arguments instead of (start, end) args. This could be the cause of Robert Sanders lockups with ZMAGIC binaries.
show more ...
|
#
e1743d02 |
| 10-Mar-1996 |
Søren Schmidt <sos@FreeBSD.org> |
First attempt at FreeBSD & Linux ELF support.
Compile and link a new kernel, that will give native ELF support, and provide the hooks for other ELF interpreters as well.
To make native ELF binaries
First attempt at FreeBSD & Linux ELF support.
Compile and link a new kernel, that will give native ELF support, and provide the hooks for other ELF interpreters as well.
To make native ELF binaries use John Polstras elf-kit-1.0.1.. For the time being also use his ld-elf.so.1 and put it in /usr/libexec.
The Linux emulator has been enhanced to also run ELF binaries, it is however in its very first incarnation. Just get some Linux ELF libs (Slackware-3.0) and put them in the prober place (/compat/linux/...). I've ben able to run all the Slackware-3.0 binaries I've tried so far. (No it won't run quake yet :)
show more ...
|
#
d66a5066 |
| 02-Mar-1996 |
Peter Wemm <peter@FreeBSD.org> |
Mega-commit for Linux emulator update.. This has been stress tested under netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-)
I'm
Mega-commit for Linux emulator update.. This has been stress tested under netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
show more ...
|
#
5297fc55 |
| 16-Feb-1996 |
Peter Wemm <peter@FreeBSD.org> |
This is an extract of changes from what I am currently running... - Optimise the linux a.out loading and uselib system calls so they take advantage of some of John's recent interface improvements.
This is an extract of changes from what I am currently running... - Optimise the linux a.out loading and uselib system calls so they take advantage of some of John's recent interface improvements. Basically, this means they make far less map changes than before. - Attempt to plug some potentially nasty kernel_map memory leaks.. - Improve support for QMAGIC libs (I only use QMAGIC (ie: a.out libraries from the slackware 3.0 dist) but this depends on other changes to enhance the /compat/linux support) - uselib goes out through a single exit as part of the resource tracking that I did when closing the resource leaks on errors. This could be cleaner than what I did, but making a 30-deep nested if/else was not my idea of fun, neither did I want to repeat the same code 30 times over for each failure possibility. I guess this function needs to be split into smaller functions to solve this.
I've been running the Linux Netscape-2.0 (with Java) to test this, and apart from the long-standing problem with the missing scrollbars, it appears to still work as before with ZMAGIC libs (and the leaks).. However, I've been using it with mods for the signal trampoline code for native linux stack frames on signals and exterminated the blasted sigreturn printf() problem, so I can't be certain that there is not a dependency on something else.
show more ...
|
#
a4fc5c1a |
| 19-Jan-1996 |
John Dyson <dyson@FreeBSD.org> |
Fixed vm_map_find for new vm updates.
|
Revision tags: release/2.1.0_cvs |
|
#
e0067d71 |
| 14-Dec-1995 |
Bruce Evans <bde@FreeBSD.org> |
Restored a vm #include.
|
#
ac9a8f2f |
| 09-Dec-1995 |
Peter Wemm <peter@FreeBSD.org> |
Attempt to make the Linux LKM compile again after the recent VM include de-nesting changes... (I figured this might be usefulif it actually built, since I've told everybody to rebuild it or die.. :-)
|
#
1f3dad5a |
| 22-Nov-1995 |
Bruce Evans <bde@FreeBSD.org> |
Completed function declarations and added prototypes.
Removed some unnecessary #includes.
Fixed warnings about nested externs.
|
#
c52007c2 |
| 06-Nov-1995 |
David Greenman <dg@FreeBSD.org> |
All: Changed vnodep -> vp for consistency with the rest of the kernel, and changed iparams -> imgp for brevity.
kern_exec.c: Explicitly initialized some additional parts of the image_params st
All: Changed vnodep -> vp for consistency with the rest of the kernel, and changed iparams -> imgp for brevity.
kern_exec.c: Explicitly initialized some additional parts of the image_params struct to avoid bzeroing it. Rewrote the set-id code to reduce the number of logical tests. The rewrite exposed a mostly benign bug in the algorithm: traced set-id images would get ktracing disabled even if the set-id didn't happen for other reasons.
show more ...
|
#
c0e5de7d |
| 24-Aug-1995 |
David Greenman <dg@FreeBSD.org> |
Moved setting of VTEXT flag into the appropriate image activators. This fixes a bug where linux binaries would get the flag set inappropriately.
|
#
c21dee17 |
| 25-Jun-1995 |
Søren Schmidt <sos@FreeBSD.org> |
First incarnation of our Linux emulator or rather compatibility code. This first shot only incorporaties so much functionality that DOOM can run (the X version), signal handling is VERY weak, so is m
First incarnation of our Linux emulator or rather compatibility code. This first shot only incorporaties so much functionality that DOOM can run (the X version), signal handling is VERY weak, so is many other things. But it meets my milestone number one (you guessed it - running DOOM).
Uses /compat/linux as prefix for loading shared libs, so it won't conflict with our own libs.
Kernel must be compiled with "options COMPAT_LINUX" for this to work.
show more ...
|
Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
#
22db15c0 |
| 13-Jan-2008 |
Attilio Rao <attilio@FreeBSD.org> |
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary.
KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed.
Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
show more ...
|
#
cb05b60a |
| 10-Jan-2008 |
Attilio Rao <attilio@FreeBSD.org> |
vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and
vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed.
Manpage and FreeBSD_version will be updated through further commits.
As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock.
Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com>
show more ...
|
#
89b57fcf |
| 05-Nov-2007 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix for the panic("vm_thread_new: kstack allocation failed") and silent NULL pointer dereference in the i386 and sparc64 pmap_pinit() when the kmem_alloc_nofault() failed to allocate address space. B
Fix for the panic("vm_thread_new: kstack allocation failed") and silent NULL pointer dereference in the i386 and sparc64 pmap_pinit() when the kmem_alloc_nofault() failed to allocate address space. Both functions now return error instead of panicing or dereferencing NULL.
As consequence, vmspace_exec() and vmspace_unshare() returns the errno int. struct vmspace arg was added to vm_forkproc() to avoid dealing with failed allocation when most of the fork1() job is already done.
The kernel stack for the thread is now set up in the thread_alloc(), that itself may return NULL. Also, allocation of the first process thread is performed in the fork1() to properly deal with stack allocation failure. proc_linkup() is separated into proc_linkup() called from fork1(), and proc_linkup0(), that is used to set up the kernel process (was known as swapper).
In collaboration with: Peter Holm Reviewed by: jhb
show more ...
|
#
802e08a3 |
| 24-Feb-2007 |
Alexander Leidinger <netchild@FreeBSD.org> |
Partial MFp4 of 114977: Whitespace commit: Fix grammar, spelling and punctuation.
Submitted by: "Scot Hetzel" <swhetzel@gmail.com>
|
Revision tags: release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0 |
|
#
98df9218 |
| 01-Apr-2005 |
John Baldwin <jhb@FreeBSD.org> |
- Change the vm_mmap() function to accept an objtype_t parameter specifying the type of object represented by the handle argument. - Allow vm_mmap() to map device memory via cdev objects in additio
- Change the vm_mmap() function to accept an objtype_t parameter specifying the type of object represented by the handle argument. - Allow vm_mmap() to map device memory via cdev objects in addition to vnodes and anonymous memory. Note that mmaping a cdev directly does not currently perform any MAC checks like mapping a vnode does. - Unbreak the DRM getbufs ioctl by having it call vm_mmap() directly on the cdev the ioctl is acting on rather than trying to find a suitable vnode to map from.
Reviewed by: alc, arch@
show more ...
|
#
610ecfe0 |
| 30-Jan-2005 |
Maxim Sobolev <sobomax@FreeBSD.org> |
o Split out kernel part of execve(2) syscall into two parts: one that copies arguments into the kernel space and one that operates completely in the kernel space;
o use kernel-only version of ex
o Split out kernel part of execve(2) syscall into two parts: one that copies arguments into the kernel space and one that operates completely in the kernel space;
o use kernel-only version of execve(2) to kill another stackgap in linuxlator/i386.
Obtained from: DragonFlyBSD (partially) MFC after: 2 weeks
show more ...
|
Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
13a0a973 |
| 24-Jun-2004 |
David E. O'Brien <obrien@FreeBSD.org> |
Add casts so all these quantities are a constant type.
|
Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1 |
|
#
91d5354a |
| 04-Feb-2004 |
John Baldwin <jhb@FreeBSD.org> |
Locking for the per-process resource limits structure. - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always
Locking for the per-process resource limits structure. - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists.
Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
show more ...
|
Revision tags: release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
2cf50c62 |
| 07-Sep-2003 |
Bruce Evans <bde@FreeBSD.org> |
Restored non-egregious casts so that this file compiles on i386's with 64-bit longs again.
|
Revision tags: release/5.1.0_cvs, release/5.1.0 |
|
#
27e0099c |
| 02-Jun-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Use __FBSDID().
|
Revision tags: release/4.8.0_cvs, release/4.8.0 |
|
#
1d062e2b |
| 03-Mar-2003 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Clean up whitespace and remove register keyword.
|
#
4b7ef73d |
| 03-Mar-2003 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
More caddr_t removal, in conjunction with copy{in,out}(9) this time. Also clean up some egregious casts and incorrect use of sizeof.
|