aboutsummaryrefslogtreecommitdiff
path: root/sys/alpha/linux/linux_sysvec.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/6.0.0_cvscvs2svn2005-11-031-1/+1
| | | | | | 'RELENG_6_0_0_RELEASE'. This commit was manufactured to restore the state of the 6.0-RELEASE image.
* o Split out kernel part of execve(2) syscall into two parts: one thatMaxim Sobolev2005-01-291-4/+4
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=140992
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPPoul-Henning Kamp2004-07-151-0/+1
| | | | | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything". Notes: svn path=/head/; revision=132199
* Add an additional field to the elf brandinfo structure to supportPeter Wemm2003-12-231-2/+4
| | | | | | | | quicker exec-time replacement of the elf interpreter on an emulation environment where an entire /compat/* tree isn't really warranted. Notes: svn path=/head/; revision=123742
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitPeter Wemm2003-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | systems where the data/stack/etc limits are too big for a 32 bit process. Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c. Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy. Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced. Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does. Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things. Notes: svn path=/head/; revision=120422
* Rename P_THREADED to P_SA. P_SA means a process is using schedulerDavid Xu2003-06-151-1/+1
| | | | | | | activations. Notes: svn path=/head/; revision=116361
* Use __FBSDID().David E. O'Brien2003-06-101-2/+3
| | | | Notes: svn path=/head/; revision=116158
* Add missing includes from previous commit.John Baldwin2003-03-271-0/+1
| | | | | | | Reported by: des Notes: svn path=/head/; revision=112716
* Add a cleanup function to destroy the osname_lock and call it on moduleJohn Baldwin2003-03-261-0/+1
| | | | | | | | | | unload. Submitted by: gallatin Reported by: Martin Karlsson <mk-freebsd@bredband.net> Notes: svn path=/head/; revision=112682
* Sync up linux and svr compat elf fixup functions for exec(). TheseJohn Baldwin2003-03-211-10/+9
| | | | | | | | | | | | functions are now all basically identical except that alpha linux uses Elf64 arguments and svr4 and i386 linux use Elf32. The fixups include changing the first argument to be a register_t ** to match the prototype for fixup functions, asserting that the process in the image_params struct is always curproc and removing unnecessary locking to read credentials as a result, and a few style fixes. Notes: svn path=/head/; revision=112470
* Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections toJake Burkholder2002-09-011-5/+13
| | | | | | | | | sysentvec. Initialized all fields of all sysentvecs, which will allow them to be used instead of constants in more places. Provided stack fixup routines for emulations that previously used the default. Notes: svn path=/head/; revision=102808
* Infrastructure tweaks to allow having both an Elf32 and an Elf64 executablePeter Wemm2002-07-201-4/+6
| | | | | | | | | | | | | | | | | | handler in the kernel at the same time. Also, allow for the exec_new_vmspace() code to build a different sized vmspace depending on the executable environment. This is a big help for execing i386 binaries on ia64. The ELF exec code grows the ability to map partial pages when there is a page size difference, eg: emulating 4K pages on 8K or 16K hardware pages. Flesh out the i386 emulation support for ia64. At this point, the only binary that I know of that fails is cvsup, because the cvsup runtime tries to execute code in pages not marked executable. Obtained from: dfr (mostly, many tweaks from me). Notes: svn path=/head/; revision=100384
* Fix typo in the BSD copyright: s/withough/without/Jens Schweikhardt2002-06-021-1/+1
| | | | | | | | Spotted and suggested by: des MFC after: 3 weeks Notes: svn path=/head/; revision=97748
* Remove __P(). This was tested on the GENERIC kernel.David E. O'Brien2002-03-201-3/+3
| | | | Notes: svn path=/head/; revision=92816
* Pre-KSE/M3 commit.Julian Elischer2002-02-071-1/+1
| | | | | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice, Notes: svn path=/head/; revision=90361
* Eliminate the prefix parameter to linux_emul_find(), which was alwaysDag-Erling Smørgrav2001-10-271-2/+2
| | | | | | | | | | | linux_emul_path anyway. Linux_emul_find() has interesting bugs in its prefix handling (which luckily are not currently exploitable); this commit is preliminary to an attempt at cleaning it up. Approved by: marcel Notes: svn path=/head/; revision=85599
* Make this compile again. I would have sworn that I did this already inPeter Wemm2001-09-201-2/+2
| | | | | | | the KSE tree and thought it had been merged. Notes: svn path=/head/; revision=83695
* With this commit, I hereby pronounce gensetdefs past its use-by date.Peter Wemm2001-06-131-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind Notes: svn path=/head/; revision=78161
* track the One True Architecture (i386)Matt Jacob2001-05-251-4/+4
| | | | Notes: svn path=/head/; revision=77199
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inMark Murray2001-05-011-6/+10
| | | | | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations) Notes: svn path=/head/; revision=76166
* Add MODULE_DEPEND() for the sysvipc modules. This allows the linulatorAndrew Gallatin2001-03-051-0/+3
| | | | | | | | | to load when sysvipc is not in the kernel Reported by: naddy@mips.inka.de (Christian Weisgerber) Notes: svn path=/head/; revision=73774
* sync with i386:Andrew Gallatin2001-03-051-0/+2
| | | | | | | | | | | | MFS: bring the consistent `compat_3_brand' support This should fix the linux-related panics reported by naddy@mips.inka.de (Christian Weisgerber) Forgotten by: obrien Notes: svn path=/head/; revision=73773
* Proc locking.John Baldwin2001-01-241-0/+2
| | | | Notes: svn path=/head/; revision=71548
* Minor cleanups:Marcel Moolenaar2000-12-051-8/+3
| | | | | | | | | o remove unused prototypes, o remove unused extern declarations, o move prototypes up. Notes: svn path=/head/; revision=69609
* Don't auto-generate the syscalls.Marcel Moolenaar2000-12-031-1/+1
| | | | Notes: svn path=/head/; revision=69539
* Don't unregister the ioctl handlers before we verified weMarcel Moolenaar2000-11-231-11/+13
| | | | | | | | | | | | | | can unload. Doing so leaves the linuxulator in a crippled state (no ioctl support) when Linux binaries are run at unload time. While here, consistently spell ELF in capitals and perform some minor style improvements. ELF spelling submitted by: asmodai Notes: svn path=/head/; revision=69073
* Make MINSIGSTKSZ machine dependent, and have the sigaltstackMarcel Moolenaar2000-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | syscall compare against a variable sv_minsigstksz in struct sysentvec as to properly take the size of the machine- and ABI dependent struct sigframe into account. The SVR4 and iBCS2 modules continue to have a minsigstksz of 8192 to preserve behavior. The real values (if different) are not known at this time. Other ABI modules use the real values. The native MINSIGSTKSZ is now defined as follows: Arch MINSIGSTKSZ ---- ----------- alpha 4096 i386 2048 ia64 12288 Reviewed by: mjacob Suggested by: bde Notes: svn path=/head/; revision=68520
* back out 1.66 -- the Elfxx_Brandinfo compat_3_brand field doesn't existAndrew Gallatin2000-11-091-2/+0
| | | | | | | in -current Notes: svn path=/head/; revision=68511
* Fix the Elf64 branding initialization.David E. O'Brien2000-11-041-0/+2
| | | | Notes: svn path=/head/; revision=68298
* Move the linux abi's alpha md files over to using David's build-timeAndrew Gallatin2000-11-011-1/+1
| | | | | | | syscall generation method Notes: svn path=/head/; revision=68212
* Need to dummy-out rt_sigreturn.David E. O'Brien2000-11-011-0/+3
| | | | | | | submitted by: gallatin Notes: svn path=/head/; revision=68161
* Apply style(9). [best I could]David E. O'Brien2000-10-231-35/+40
| | | | Notes: svn path=/head/; revision=67462
* Minimal set of diffs from the i386 bits to the AlphaLinux.David E. O'Brien2000-09-061-335/+28
| | | | | | | Submitted by: gallatin (content, minimization by me) Notes: svn path=/head/; revision=65537
* Update include directives for Linuxulator headers after theMarcel Moolenaar2000-08-221-1/+1
| | | | | | | MD/MI split. Notes: svn path=/head/; revision=64929
* Remove the only use of SCARG and perform dead code elimination.Marcel Moolenaar2000-07-271-3/+2
| | | | Notes: svn path=/head/; revision=63903
* Add a version tag for the rtc port to depend on.Peter Wemm2000-05-061-0/+2
| | | | Notes: svn path=/head/; revision=60058
* Fix #! script exec under linux emulation. If a script is exec'd from aMatthew Dillon2000-04-261-2/+55
| | | | | | | | | | | | | program running under linux emulation, the script binary is checked for in /compat/linux first. Without this patch the wrong script binary (i.e. the FreeBSD binary) will be run instead of the linux binary. For example, #!/bin/sh, thus breaking out of linux compatibility mode. This solves a number of problems people have had installing linux software on FreeBSD boxes. Notes: svn path=/head/; revision=59663
* Remove unneeded <sys/buf.h> includes.Poul-Henning Kamp2000-04-181-1/+0
| | | | | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes. Notes: svn path=/head/; revision=59368
* Change our ELF binary branding to something more acceptable to the BinutilsDavid E. O'Brien2000-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | maintainers. After we established our branding method of writing upto 8 characters of the OS name into the ELF header in the padding; the Binutils maintainers and/or SCO (as USL) decided that instead the ELF header should grow two new fields -- EI_OSABI and EI_ABIVERSION. Each of these are an 8-bit unsigned integer. SCO has assigned official values for the EI_OSABI field. In addition to this, the Binutils maintainers and NetBSD decided that a better ELF branding method was to include ABI information in a ".note" ELF section. With this set of changes, we will now create ELF binaries branded using both "official" methods. Due to the complexity of adding a section to a binary, binaries branded with ``brandelf'' will only brand using the EI_OSABI method. Also due to the complexity of pulling a section out of an ELF file vs. poking around in the ELF header, our image activator only looks at the EI_OSABI header field. Note that a new kernel can still properly load old binaries except for Linux static binaries branded in our old method. * * For a short period of time, ``ld'' will also brand ELF binaries * using our old method. This is so people can still use kernel.old * with a new world. This support will be removed before 5.0-RELEASE, * and may not last anywhere upto the actual release. My expiration * time for this is about 6mo. * Notes: svn path=/head/; revision=59342
* Changed the type used to represent the user stack pointer from `long *'Bruce Evans1999-12-271-6/+6
| | | | | | | | | | | to `register_t *'. This fixes bugs like misplacement of argc and argv on the user stack on i386's with 64-bit longs. We still use longs to represent "words" like argc and argv, and assume that they are on the stack (and that there is stack). The suword() and fuword() families should also use register_t. Notes: svn path=/head/; revision=55141
* Implement pluggable ioctl handlers.Marcel Moolenaar1999-12-041-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Other modules can register and unregister ioctl handlers to extend the ioctls known by the Linuxulator. A recent application is the vmware port. The Linuxulator itself uses the new interface to register its handlers as well. Handlers for the following types of ioctls have been defined: cdrom console (=keyboard and VT handling) socket sound termio All ioctl related defines and declarations have been moved to a new file (linux_ioctl.h), except for the pluggable ioctl handler interface definition. While there, cleanup linux.h some more. linux.h and linux_ioctl.[ch] have been made to conform to style(9) as much as possible. Inspired and reviewed by: Vladimir N. Silyaev Notes: svn path=/head/; revision=54122
* Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for thePoul-Henning Kamp1999-10-301-1/+2
| | | | | | | | | | | | "rw" argument, rather than hijacking B_{READ|WRITE}. Fix two bugs (physio & cam) resulting by the confusion caused by this. Submitted by: Tor.Egge@fast.no Reviewed by: alc, ken (partly) Notes: svn path=/head/; revision=52644
* useracc() the prequel:Poul-Henning Kamp1999-10-291-1/+0
| | | | | | | | | | | | | | Merge the contents (less some trivial bordering the silly comments) of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts the #defines for the vm_inherit_t and vm_prot_t types next to their typedefs. This paves the road for the commit to follow shortly: change useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE} as argument. Notes: svn path=/head/; revision=52635
* Add a per-signal flag to mark handlers registered with osigaction, so weLuoqi Chen1999-10-111-11/+9
| | | | | | | | | | | | | | | | | | can provide the correct context to each signal handler. Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK as we did before the linuxthreads support merge (submitted by bde). Move ps_sigstk from to p_sigacts to the main proc structure since signal stack should not be shared among threads. Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag. Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag. Reviewed by: marcel, jdp, bde Notes: svn path=/head/; revision=52140
* sigset_t change (part 4 of 5)Marcel Moolenaar1999-09-291-46/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- The compatibility code and/or emulators have been updated: iBCS2 now mostly uses the older syscalls. SVR4 now properly handles all signals. This has been achieved by using the new sigset_t throughout the emulator. The Linuxulator has been severely updated. Internally the new Linux sigset_t is made the default. These are then mapped to and from the new FreeBSD sigset_t. Also, rt_sigsuspend has been implemented in the Linuxulator. Implementing this syscall basicly caused all this sigset_t changing in the first place and the syscall has been used throughout the change as a means for testing. It basicly is too much work to undo the implementation so that it can later be added again. A special note on the use of sv_sigtbl and sv_sigsize in struct sysentvec: Every signal larger than sv_sigsize is not translated and is passed on to the signal handler unmodified. Signals in the range 1 upto and including sv_sigsize are translated. The rationale is that only the system defined signals need to be translated. The emulators also have been updated so that the translation tables are only indexed for valid (system defined) signals. This change also fixes the translation bug already in the SVR4 emulator. Notes: svn path=/head/; revision=51793
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Tweak include ordering so sys/systm.h is before sys/buf.h to keep buf.h'sPeter Wemm1999-06-281-2/+2
| | | | | | | inlines happy. Notes: svn path=/head/; revision=48303
* Enable vmspace sharing on SMP. Major changes are,Luoqi Chen1999-04-281-4/+6
| | | | | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com> Notes: svn path=/head/; revision=46129
* unifdef -DVM_STACK - it's been on for a while for x86 and was checkedPeter Wemm1999-04-191-5/+1
| | | | | | | and appeared to be working for the Alpha some time ago. Notes: svn path=/head/; revision=45821
* Added call to elf_brand_inuse() to prevent you from cutting your ownMark Newton1999-02-041-3/+11
| | | | | | | legs out from under you. Notes: svn path=/head/; revision=43620