summaryrefslogtreecommitdiffstats
path: root/sys/alpha/linux/linux_sysvec.c
Commit message (Collapse)AuthorAgeFilesLines
* Add missing includes from previous commit.jhb2003-03-271-0/+1
| | | | Reported by: des
* Add a cleanup function to destroy the osname_lock and call it on modulejhb2003-03-261-0/+1
| | | | | | | unload. Submitted by: gallatin Reported by: Martin Karlsson <mk-freebsd@bredband.net>
* Sync up linux and svr compat elf fixup functions for exec(). Thesejhb2003-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.
* Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections tojake2002-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.
* Infrastructure tweaks to allow having both an Elf32 and an Elf64 executablepeter2002-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).
* Fix typo in the BSD copyright: s/withough/without/schweikh2002-06-021-1/+1
| | | | | Spotted and suggested by: des MFC after: 3 weeks
* Remove __P(). This was tested on the GENERIC kernel.obrien2002-03-201-3/+3
|
* Pre-KSE/M3 commit.julian2002-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,
* Eliminate the prefix parameter to linux_emul_find(), which was alwaysdes2001-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
* Make this compile again. I would have sworn that I did this already inpeter2001-09-201-2/+2
| | | | the KSE tree and thought it had been merged.
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-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
* track the One True Architecture (i386)mjacob2001-05-251-4/+4
|
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-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)
* Add MODULE_DEPEND() for the sysvipc modules. This allows the linulatorgallatin2001-03-051-0/+3
| | | | | | to load when sysvipc is not in the kernel Reported by: naddy@mips.inka.de (Christian Weisgerber)
* sync with i386: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
* Proc locking.jhb2001-01-241-0/+2
|
* Minor cleanups:marcel2000-12-051-8/+3
| | | | | | o remove unused prototypes, o remove unused extern declarations, o move prototypes up.
* Don't auto-generate the syscalls.marcel2000-12-031-1/+1
|
* Don't unregister the ioctl handlers before we verified wemarcel2000-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
* Make MINSIGSTKSZ machine dependent, and have the sigaltstackmarcel2000-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
* back out 1.66 -- the Elfxx_Brandinfo compat_3_brand field doesn't existgallatin2000-11-091-2/+0
| | | | in -current
* Fix the Elf64 branding initialization.obrien2000-11-041-0/+2
|
* Move the linux abi's alpha md files over to using David's build-timegallatin2000-11-011-1/+1
| | | | syscall generation method
* Need to dummy-out rt_sigreturn.obrien2000-11-011-0/+3
| | | | submitted by: gallatin
* Apply style(9). [best I could]obrien2000-10-231-35/+40
|
* Minimal set of diffs from the i386 bits to the AlphaLinux.obrien2000-09-061-335/+28
| | | | Submitted by: gallatin (content, minimization by me)
* Update include directives for Linuxulator headers after themarcel2000-08-221-1/+1
| | | | MD/MI split.
* Remove the only use of SCARG and perform dead code elimination.marcel2000-07-271-3/+2
|
* Add a version tag for the rtc port to depend on.peter2000-05-061-0/+2
|
* Fix #! script exec under linux emulation. If a script is exec'd from adillon2000-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.
* Remove unneeded <sys/buf.h> includes.phk2000-04-181-1/+0
| | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
* Change our ELF binary branding to something more acceptable to the Binutilsobrien2000-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. *
* Changed the type used to represent the user stack pointer from `long *'bde1999-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.
* Implement pluggable ioctl handlers.marcel1999-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
* Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for thephk1999-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)
* useracc() the prequel:phk1999-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.
* Add a per-signal flag to mark handlers registered with osigaction, so weluoqi1999-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
* sigset_t change (part 4 of 5)marcel1999-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.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Tweak include ordering so sys/systm.h is before sys/buf.h to keep buf.h'speter1999-06-281-2/+2
| | | | inlines happy.
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-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>
* unifdef -DVM_STACK - it's been on for a while for x86 and was checkedpeter1999-04-191-5/+1
| | | | and appeared to be working for the Alpha some time ago.
* Added call to elf_brand_inuse() to prevent you from cutting your ownnewton1999-02-041-3/+11
| | | | legs out from under you.
* Minor cleanup; no more references to LKM's.peter1999-01-171-4/+1
|
* Add (but don't activate) code for a special VM option to makejulian1999-01-061-20/+3
| | | | | | | | | | | | | downward growing stacks more general. Add (but don't activate) code to use the new stack facility when running threads, (specifically the linux threads support). This allows people to use both linux compiled linuxthreads, and also the native FreeBSD linux-threads port. The code is conditional on VM_STACK. Not using this will produce the old heavily tested system. Submitted by: Richard Seaman <dick@tar.com>
* Make it compile again.sos1998-12-191-5/+5
| | | | | | I have no idea if the new stuff works though. Broken by: Julian
* Reviewed by: Luoqi Chen, Jordan Hubbardjulian1998-12-191-1/+22
| | | | | | | | | | | | Submitted by: "Richard Seaman, Jr." <lists@tar.com> Obtained from: linux :-) Code to allow Linux Threads to run under FreeBSD. By default not enabled This code is dependent on the conditional COMPAT_LINUX_THREADS (suggested by Garret) This is not yet a 'real' option but will be within some number of hours.
* Removed the cast to a pointer in the definition of PS_STRINGS andbde1998-12-161-2/+2
| | | | | | | adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change.
* Added 3 new errno values, requred by various standards: EOVERFLOW,dt1998-12-141-5/+5
| | | | | | | ECANCELED, EILSEQ. Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping. Reviewed by: Dan Nelson <dnelson@emsphone.com>
* Finished updating module event handlers to be compatible withbde1998-11-151-8/+2
| | | | modeventhand_t.
OpenPOWER on IntegriCloud