CVS log for src/sys/compat/ia32/ia32_sysvec.c
Up to [FreeBSD] / src / sys / compat / ia32
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.41.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.41.2.1: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Nov 7 15:43:11 2011 UTC (3 months ago) by ed
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -1 lines
SVN rev 227309 on 2011-11-07 15:43:11Z by ed Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
Revision 1.41.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.33.2.7: download - view: text, markup, annotated - select for diffs
Wed Jun 8 03:45:40 2011 UTC (8 months ago) by dchagin
Branches: RELENG_8
Diff to: previous 1.33.2.6: preferred, colored; branchpoint 1.33: preferred, colored; next MAIN 1.34: preferred, colored
Changes since revision 1.33.2.6: +1 -0 lines
SVN rev 222846 on 2011-06-08 03:45:40Z by dchagin MFC r219405: Extend struct sysvec with new method sv_schedtail, which is used for an explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process. Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method. While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI. MFC r219421: Remove bogus since r219405 check of the Linux ABI.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Apr 1 11:16:29 2011 UTC (10 months, 1 week ago) by kib
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -4 lines
SVN rev 220238 on 2011-04-01 11:16:29Z by kib Add support for executing the FreeBSD 1/i386 a.out binaries on amd64. In particular: - implement compat shims for old stat(2) variants and ogetdirentries(2); - implement delivery of signals with ancient stack frame layout and corresponding sigreturn(2); - implement old getpagesize(2); - provide a user-mode trampoline and LDT call gate for lcall $7,$0; - port a.out image activator and connect it to the build as a module on amd64. The changes are hidden under COMPAT_43. MFC after: 1 month
Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Mar 8 19:01:45 2011 UTC (11 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -0 lines
SVN rev 219405 on 2011-03-08 19:01:45Z by dchagin Extend struct sysvec with new method sv_schedtail, which is used for an explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process. Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method. While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI. Discussed with: kib MFC after: 2 Week
Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Jan 8 16:13:44 2011 UTC (13 months ago) by kib
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +11 -4 lines
SVN rev 217151 on 2011-01-08 16:13:44Z by kib Create shared (readonly) page. Each ABI may specify the use of page by setting SV_SHP flag and providing pointer to the vm object and mapping address. Provide simple allocator to carve space in the page, tailored to put the code with alignment restrictions. Enable shared page use for amd64, both native and 32bit FreeBSD binaries. Page is private mapped at the top of the user address space, moving a start of the stack one page down. Move signal trampoline code from the top of the stack to the shared page. Reviewed by: alc
Revision 1.27.2.7.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.27.2.7: preferred, colored; next MAIN 1.27.6.1: preferred, colored
Changes since revision 1.27.2.7: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.33.2.6.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.33.2.6: preferred, colored; next MAIN 1.33.2.7: preferred, colored
Changes since revision 1.33.2.6: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.33.2.6: download - view: text, markup, annotated - select for diffs
Wed Nov 3 21:21:12 2010 UTC (15 months ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.33.2.5: preferred, colored; branchpoint 1.33: preferred, colored
Changes since revision 1.33.2.5: +6 -1 lines
SVN rev 214755 on 2010-11-03 21:21:12Z by kib MFC r208453: 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.
Revision 1.33.2.5.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.33.2.5: preferred, colored; next MAIN 1.33.2.6: preferred, colored
Changes since revision 1.33.2.5: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun May 23 18:32:02 2010 UTC (20 months, 2 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +6 -1 lines
SVN rev 208453 on 2010-05-23 18:32:02Z by kib Reorganize syscall entry and leave handling. Extend struct sysvec with three new elements: sv_fetch_syscall_args - the method to fetch syscall arguments from usermode into struct syscall_args. The structure is machine-depended (this might be reconsidered after all architectures are converted). sv_set_syscall_retval - the method to set a return value for usermode from the syscall. It is a generalization of cpu_set_syscall_retval(9) to allow ABIs to override the way to set a return value. sv_syscallnames - the table of syscall names. Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding the call to cpu_set_syscall_retval(). The new functions syscallenter(9) and syscallret(9) are provided that use sv_*syscall* pointers and contain the common repeated code from the syscall() implementations for the architecture-specific syscall trap handlers. Syscallenter() fetches arguments, calls syscall implementation from ABI sysent table, and set up return frame. The end of syscall bookkeeping is done by syscallret(). Take advantage of single place for MI syscall handling code and implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the thread is stopped at syscall entry or return point respectively. The EXEC flag augments SCX and notifies debugger that the process address space was changed by one of exec(2)-family syscalls. 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. Reviewed by: jhb, marcel, marius, nwhitehorn, stas Tested by: marcel (ia64), marius (sparc64), nwhitehorn (powerpc), stas (mips) MFC after: 1 month
Revision 1.33.2.5: download - view: text, markup, annotated - select for diffs
Wed Apr 7 02:24:41 2010 UTC (22 months ago) by nwhitehorn
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.33.2.4: preferred, colored; branchpoint 1.33: preferred, colored
Changes since revision 1.33.2.4: +1 -123 lines
SVN rev 206336 on 2010-04-07 02:24:41Z by nwhitehorn MFC r205014,205015: 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
Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Mar 11 14:49:06 2010 UTC (23 months ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +1 -123 lines
SVN rev 205014 on 2010-03-11 14:49:06Z by nwhitehorn 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. Reviewed by: kib, jhb
Revision 1.27.2.7.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.27.2.7: preferred, colored; next MAIN 1.27.6.1: preferred, colored
Changes since revision 1.27.2.7: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.27.2.7: download - view: text, markup, annotated - select for diffs
Tue Dec 22 20:05:09 2009 UTC (2 years, 1 month ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP
Branch point for: RELENG_7_4, RELENG_7_3
Diff to: previous 1.27.2.6: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.2.6: +18 -3 lines
SVN rev 200864 on 2009-12-22 20:05:09Z by kib MFC r189927: Supply AT_EXECPATH auxinfo entry to the interpreter, both for native and compat32 binaries. Note that the merge was edited due to fexecve(2) support not present in stable/7. Tested by: bms, Mykola Dzham <freebsd levsha org ua>
Revision 1.33.2.4: download - view: text, markup, annotated - select for diffs
Sat Dec 5 20:43:15 2009 UTC (2 years, 2 months ago) by bz
Branches: RELENG_8
Diff to: previous 1.33.2.3: preferred, colored; branchpoint 1.33: preferred, colored
Changes since revision 1.33.2.3: +1 -1 lines
SVN rev 200165 on 2009-12-05 20:43:15Z by bz MFC r197729: Make sure that the primary native brandinfo always gets added first and the native ia32 compat as middle (before other things). o(ld)brandinfo as well as third party like linux, kfreebsd, etc. stays on SI_ORDER_ANY coming last. The reason for this is only to make sure that even in case we would overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo would still be there and the system would be operational. Reviewed by: kib
Revision 1.33.2.3.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.33.2.3: preferred, colored; next MAIN 1.33.2.4: preferred, colored
Changes since revision 1.33.2.3: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Oct 3 11:57:21 2009 UTC (2 years, 4 months ago) by bz
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +1 -1 lines
SVN rev 197729 on 2009-10-03 11:57:21Z by bz Make sure that the primary native brandinfo always gets added first and the native ia32 compat as middle (before other things). o(ld)brandinfo as well as third party like linux, kfreebsd, etc. stays on SI_ORDER_ANY coming last. The reason for this is only to make sure that even in case we would overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo would still be there and the system would be operational. Reviewed by: kib MFC after: 1 month
Revision 1.27.2.6: download - view: text, markup, annotated - select for diffs
Mon Sep 7 13:37:04 2009 UTC (2 years, 5 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.27.2.5: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.5: +1 -1 lines
SVN rev 196924 on 2009-09-07 13:37:04Z by bz MFC r196653: Make sure FreeBSD binaries without .note.ABI-tag section work correctly and do not match a colliding Debian GNU/kFreeBSD brandinfo statements. For this mark the Debian GNU/kFreeBSD brandinfo that it must have an .note.ABI-tag section and ignore the old EI_OSABI brandinfo when comparing a possibly colliding set of options. Due to SYSINIT we add the brandinfo in a non-deterministic order, so native FreeBSD is not always first. We may want to consider to force native FreeBSD to come first as well. The only way a problem could currently be noticed is when running an i386 binary without the .note.ABI-tag on amd64 and the Debian GNU/kFreeBSD brandinfo was matched first, as the fallback to ld-elf32.so.1 does not exist in that case. Reported and tested by: ticso In collaboration with: kib
Revision 1.33.2.3: download - view: text, markup, annotated - select for diffs
Wed Sep 2 10:39:46 2009 UTC (2 years, 5 months ago) by bz
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.33.2.2: preferred, colored; branchpoint 1.33: preferred, colored
Changes since revision 1.33.2.2: +1 -1 lines
SVN rev 196761 on 2009-09-02 10:39:46Z by bz MFC r196653: Make sure FreeBSD binaries without .note.ABI-tag section work correctly and do not match a colliding Debian GNU/kFreeBSD brandinfo statements. For this mark the Debian GNU/kFreeBSD brandinfo that it must have an .note.ABI-tag section and ignore the old EI_OSABI brandinfo when comparing a possibly colliding set of options. Due to SYSINIT we add the brandinfo in a non-deterministic order, so native FreeBSD is not always first. We may want to consider to force native FreeBSD to come first as well. The only way a problem could currently be noticed is when running an i386 binary without the .note.ABI-tag on amd64 and the Debian GNU/kFreeBSD brandinfo was matched first, as the fallback to ld-elf32.so.1 does not exist in that case. Reported and tested by: ticso In collaboration with: kib MFC after: 3 days Approved by: re (rwatson)
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Aug 30 14:38:17 2009 UTC (2 years, 5 months ago) by bz
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +1 -1 lines
SVN rev 196653 on 2009-08-30 14:38:17Z by bz Make sure FreeBSD binaries without .note.ABI-tag section work correctly and do not match a colliding Debian GNU/kFreeBSD brandinfo statements. For this mark the Debian GNU/kFreeBSD brandinfo that it must have an .note.ABI-tag section and ignore the old EI_OSABI brandinfo when comparing a possibly colliding set of options. Due to SYSINIT we add the brandinfo in a non-deterministic order, so native FreeBSD is not always first. We may want to consider to force native FreeBSD to come first as well. The only way a problem could currently be noticed is when running an i386 binary without the .note.ABI-tag on amd64 and the Debian GNU/kFreeBSD brandinfo was matched first, as the fallback to ld-elf32.so.1 does not exist in that case. Reported and tested by: ticso In collaboration with: kib MFC after: 3 days
Revision 1.27.2.5: download - view: text, markup, annotated - select for diffs
Thu Aug 27 17:36:59 2009 UTC (2 years, 5 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.27.2.4: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.4: +15 -0 lines
SVN rev 196602 on 2009-08-27 17:36:59Z by bz
MFC r196512:
Fix handling of .note.ABI-tag section for GNU systems [1].
Handle GNU/Linux according to LSB Core Specification 4.0,
Chapter 11. Object Format, 11.8. ABI note tag.
Also check the first word of desc, not only name, according to
glibc abi-tags specification to distinguish between Linux and
kFreeBSD.
Add explicit handling for Debian GNU/kFreeBSD, which runs
on our kernels as well [2].
In {amd64,i386}/trap.c, when checking osrel of the current process,
also check the ABI to not change the signal behaviour for Linux
binary processes, now that we save an osrel version for all three
from the lists above in struct proc [2] (slightly different to HEAD).
These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD
and Linux binaries on the same machine again for at least i386 and
amd64, and no longer break kFreeBSD which was detected as GNU(/Linux).
PR: kern/135468
Submitted by: dchagin [1] (initial patch)
Suggested by: kib [2]
Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD
Reviewed by: kib
Revision 1.33.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 27 17:34:13 2009 UTC (2 years, 5 months ago) by bz
Branches: RELENG_8
Diff to: previous 1.33.2.1: preferred, colored; branchpoint 1.33: preferred, colored
Changes since revision 1.33.2.1: +15 -0 lines
SVN rev 196601 on 2009-08-27 17:34:13Z by bz
MFC r196512:
Fix handling of .note.ABI-tag section for GNU systems [1].
Handle GNU/Linux according to LSB Core Specification 4.0,
Chapter 11. Object Format, 11.8. ABI note tag.
Also check the first word of desc, not only name, according to
glibc abi-tags specification to distinguish between Linux and
kFreeBSD.
Add explicit handling for Debian GNU/kFreeBSD, which runs
on our kernels as well [2].
In {amd64,i386}/trap.c, when checking osrel of the current process,
also check the ABI to not change the signal behaviour for Linux
binary processes, now that we save an osrel version for all three
from the lists above in struct proc [2].
These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD
and Linux binaries on the same machine again for at least i386 and
amd64, and no longer break kFreeBSD which was detected as GNU(/Linux).
PR: kern/135468
Submitted by: dchagin [1] (initial patch)
Suggested by: kib [2]
Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD
Reviewed by: kib
Approved by: re (kensmith)
Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Aug 24 16:19:47 2009 UTC (2 years, 5 months ago) by bz
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +15 -0 lines
SVN rev 196512 on 2009-08-24 16:19:47Z by bz
Fix handling of .note.ABI-tag section for GNU systems [1].
Handle GNU/Linux according to LSB Core Specification 4.0,
Chapter 11. Object Format, 11.8. ABI note tag.
Also check the first word of desc, not only name, according to
glibc abi-tags specification to distinguish between Linux and
kFreeBSD.
Add explicit handling for Debian GNU/kFreeBSD, which runs
on our kernels as well [2].
In {amd64,i386}/trap.c, when checking osrel of the current process,
also check the ABI to not change the signal behaviour for Linux
binary processes, now that we save an osrel version for all three
from the lists above in struct proc [2].
These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD
and Linux binaries on the same machine again for at least i386 and
amd64, and no longer break kFreeBSD which was detected as GNU(/Linux).
PR: kern/135468
Submitted by: dchagin [1] (initial patch)
Suggested by: kib [2]
Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD
Reviewed by: kib
MFC after: 3 days
Revision 1.33.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.27.2.3.2.2: download - view: text, markup, annotated - select for diffs
Fri Apr 17 17:05:31 2009 UTC (2 years, 9 months ago) by dchagin
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.27.2.3.2.1: preferred, colored; branchpoint 1.27.2.3: preferred, colored; next MAIN 1.27.2.4: preferred, colored
Changes since revision 1.27.2.3.2.1: +2 -2 lines
SVN rev 191213 on 2009-04-17 17:05:31Z by dchagin Merge r190708 from HEAD to releng/7.2: Fix KBI breakage by r190520 which affects older linux.ko binaries: 1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored. Suggested by: jhb Reviewed by: jhb Approved by: re (Ken Smith), kib (mentor)
Revision 1.27.2.4: download - view: text, markup, annotated - select for diffs
Fri Apr 17 16:42:57 2009 UTC (2 years, 9 months ago) by dchagin
Branches: RELENG_7
Diff to: previous 1.27.2.3: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.3: +2 -2 lines
SVN rev 191210 on 2009-04-17 16:42:57Z by dchagin Merge r190708 from HEAD to stable/7: Fix KBI breakage by r190520 which affects older linux.ko binaries: 1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored. Suggested by: jhb Reviewed by: jhb Approved by: re (Ken Smith), kib (mentor)
Revision 1.27.2.3.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
Diff to: previous 1.27.2.3: preferred, colored
Changes since revision 1.27.2.3: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Apr 5 09:27:19 2009 UTC (2 years, 10 months ago) by dchagin
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
SVN rev 190708 on 2009-04-05 09:27:19Z by dchagin Fix KBI breakage by r190520 which affects older linux.ko binaries: 1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored. Suggested by: jhb Reviewed by: jhb Approved by: kib (mentor) MFC after: 6 days
Revision 1.27.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 29 08:07:36 2009 UTC (2 years, 10 months ago) by dchagin
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.27.2.2: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.2: +3 -1 lines
SVN rev 190520 on 2009-03-29 08:07:36Z by dchagin Merge from head to stable/7: r189771: Implement new way of branding ELF binaries by looking to a ".note.ABI-tag" section. The search order of a brand is changed, now first of all the ".note.ABI-tag" is looked through. Move code which fetch osreldate for ELF binary to check_note() handler. r189919: Use the properly sized types for ELF object header and program headers. This fixes osrel fetching from the FreeBSD branding note for the 64bit platforms (bug introduced by r189771). r190264: Fix several issues with parsing the notes for ELF objects. Badly formed ELF note may cause the caclulated pointer to the next note to point both after the note region, that was checked in the code, but also to point before the region, that was not checked [1]. Remember the first note location in note0 and leap out if the note is not between note0 and note_end. In the similar way, badly formed note may cause infinite loop by pointing next note into the same or previous note. Guard against this by limiting amount of loop iterations by arbitrary choosen big number. For clarity, check the calculated note alignment in each iteration. PR: kern/132886 Approved by: re(Ken Smith)
Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Mar 17 12:53:28 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +18 -3 lines
SVN rev 189927 on 2009-03-17 12:53:28Z by kib Supply AT_EXECPATH auxinfo entry to the interpreter, both for native and compat32 binaries. Tested by: pho Reviewed by: kan
Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Mar 13 16:40:51 2009 UTC (2 years, 10 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -1 lines
SVN rev 189771 on 2009-03-13 16:40:51Z by dchagin Implement new way of branding ELF binaries by looking to a ".note.ABI-tag" section. The search order of a brand is changed, now first of all the ".note.ABI-tag" is looked through. Move code which fetch osreldate for ELF binary to check_note() handler. PR: 118473 Approved by: kib (mentor)
Revision 1.20.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 21 16:28:15 2009 UTC (3 years ago) by jhb
Branches: RELENG_6
Diff to: previous 1.20.2.2: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.2.2: +0 -2 lines
SVN rev 187536 on 2009-01-21 16:28:15Z by jhb MFC: Add support for installing 32-bit system calls from kernel modules.
Revision 1.27.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 21 16:14:43 2009 UTC (3 years ago) by jhb
Branches: RELENG_7
Diff to: previous 1.27.2.1: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.1: +0 -2 lines
SVN rev 187535 on 2009-01-21 16:14:43Z by jhb MFC: Add support for installing 32-bit system calls from kernel modules.
Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 9 11:09:57 2009 UTC (3 years, 1 month ago) by kib
Branches: RELENG_7
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +45 -45 lines
SVN rev 186936 on 2009-01-09 11:09:57Z by kib MFC r183322: Change the static struct sysentvec and struct Elf_Brandinfo initializers to the C99 style. Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs.
Revision 1.27.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.30: download - view: text, markup, annotated - select for diffs
Sat Nov 22 12:36:15 2008 UTC (3 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -1 lines
SVN rev 185169 on 2008-11-22 12:36:15Z by kib Add sv_flags field to struct sysentvec with intention to provide description of the ABI of the currently executing image. Change some places to test the flags instead of explicit comparing with address of known sysentvec structures to determine ABI features. Discussed with: dchagin, imp, jhb, peter
Revision 1.20.2.2.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.20.2.2: preferred, colored; next MAIN 1.20.2.3: preferred, colored
Changes since revision 1.20.2.2: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Sep 25 20:50:21 2008 UTC (3 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +0 -2 lines
SVN rev 183365 on 2008-09-25 20:50:21Z by jhb
Add support for installing 32-bit system calls from kernel modules. This
includes syscall32_{de,}register() routines as well as a module handler
and wrapper macros similar to the support for native syscalls in
<sys/sysent.h>.
MFC after: 1 month
Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Sep 24 10:14:37 2008 UTC (3 years, 4 months ago) by kib
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +45 -45 lines
SVN rev 183322 on 2008-09-24 10:14:37Z by kib Change the static struct sysentvec and struct Elf_Brandinfo initializers to the C99 style. At least, it is easier to read sysent definitions that way, and search for the actual instances of sigcode etc. Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs. No objection from: jhb MFC after: 1 month
Revision 1.20.2.2: download - view: text, markup, annotated - select for diffs
Mon Oct 1 20:13:49 2007 UTC (4 years, 4 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Branch point for: RELENG_6_4
Diff to: previous 1.20.2.1: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.2.1: +3 -0 lines
MFC: Allow the ia32 resource limits to be set via loader tunables.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Sep 24 20:49:39 2007 UTC (4 years, 4 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_1_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7_1, RELENG_7
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -0 lines
Allow the ia32 resource limits (compat.ia32.max{dsiz,ssiz,vmem} to be
set via loader tunables. They are already tunable via sysctl.
MFC after: 1 week
Approved by: re (kensmith)
Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Jul 12 18:01:30 2007 UTC (4 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +9 -8 lines
Fix a couple of issues with the stack limit for 32-bit processes on 64-bit kernels exposed by the recent fixes to resource limits for 32-bit processes on 64-bit kernels: - Let ABIs expose their maximum stack size via a new pointer in sysentvec and use that in preference to maxssiz during exec() rather than always using maxssiz for all processses. - Apply the ABI's limit fixup to the previous stack size when adjusting RLIMIT_STACK to determine if the existing mapping for the stack needs to be grown or shrunk (as well as how much it should be grown or shrunk). Approved by: re (kensmith)
Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Wed May 23 18:24:43 2007 UTC (4 years, 8 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +28 -31 lines
MFC: Rework the support used by ABIs to override resource limits so that a 64-bit process exec'd by a 32-bit process doesn't end up with 32-bit limits. This doesn't break the ABI as neither of the 32-bit ABIs (COMPAT_LINUX32 and COMPAT_IA32) are buildable as modules on 6.x/amd64 and none of the other ABIs use this hook.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue May 22 02:22:57 2007 UTC (4 years, 8 months ago) by kan
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
Allow FreeBSD's native ELF image activators to execute shared libraries the same way it was enabled for Linux binares in linuxulator. This allows binaries built with -pie. Many ports auto-detect -fPIE support in GCC 4.2 and build binaries FreeBSD was unable to run.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon May 14 22:40:04 2007 UTC (4 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +28 -30 lines
Rework the support for ABIs to override resource limits (used by 32-bit processes under 64-bit kernels). Previously, each 32-bit process overwrote its resource limits at exec() time. The problem with this approach is that the new limits affect all child processes of the 32-bit process, including if the child process forks and execs a 64-bit process. To fix this, don't ovewrite the resource limits during exec(). Instead, sv_fixlimits() is now replaced with a different function sv_fixlimit() which asks the ABI to sanitize a single resource limit. We then use this when querying and setting resource limits. Thus, if a 32-bit process sets a limit, then that new limit will be inherited by future children. However, if the 32-bit process doesn't change a limit, then a future 64-bit child will see the "full" 64-bit limit rather than the 32-bit limit. MFC is tentative since it will break the ABI of old linux.ko modules (no other modules are affected). MFC after: 1 week
Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Oct 5 01:56:11 2006 UTC (5 years, 4 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -1 lines
Move some declaration of 32-bit signal structures into file freebsd32-signal.h, implement sigtimedwait and sigwaitinfo system calls.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Dec 26 21:23:56 2005 UTC (6 years, 1 month ago) by sobomax
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -0 lines
Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structure 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>
Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Nov 2 21:18:07 2005 UTC (6 years, 3 months ago) by ps
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -3 lines
Calling setrlimit from 32bit apps could potentially increase certain limits beyond what should be capiable in a 32bit process, so we must fixup the limits. Reviewed by: jhb
Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat Jan 29 23:11:58 2005 UTC (7 years ago) by sobomax
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Branch point for: RELENG_6
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +7 -7 lines
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
Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Aug 11 02:35:05 2004 UTC (7 years, 6 months ago) by marcel
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3, RELENG_5
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +8 -0 lines
Add __elfN(dump_thread). This function is called from __elfN(coredump) to allow dumping per-thread machine specific notes. On ia64 we use this function to flush the dirty registers onto the backingstore before we write out the PRSTATUS notes. Tested on: alpha, amd64, i386, ia64 & sparc64 Not tested on: arm, powerpc
Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Jul 16 20:53:00 2004 UTC (7 years, 6 months ago) by obrien
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +1 -1 lines
/usr/libexec/ld-elf.so.1 -> /libexec/ld-elf32.so.1
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Mar 21 01:22:24 2004 UTC (7 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -2 lines
Change (yet again, sorry!) the path of the 32 bit ld-elf.so.1.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Feb 4 21:52:52 2004 UTC (8 years ago) by jhb
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +22 -39 lines
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
Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Dec 23 02:42:38 2003 UTC (8 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +18 -5 lines
Add an additional field to the elf brandinfo structure to support quicker exec-time replacement of the elf interpreter on an emulation environment where an entire /compat/* tree isn't really warranted.
Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 22:20:03 2003 UTC (8 years, 1 month ago) by peter
Branches: RELENG_5_2
CVS tags: RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +2 -1 lines
MFC: 1.13: use the correct symbol for declaring the sysvec table sizes Approved by: re (jhb, scottl)
Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Dec 11 01:05:09 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +7 -1 lines
Assimilate ia64 back into the fold with the common freebsd32/ia32 code. The split-up code is derived from the ia64 code originally. Note that I have only compile-tested this, not actually run-tested it. The ia64 side of the force is missing some significant chunks of signal delivery code.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Dec 10 23:16:32 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -1 lines
Use the correct syscall table limit
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Nov 8 07:43:44 2003 UTC (8 years, 3 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_2_BP
Branch point for: RELENG_5_2
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +0 -45 lines
Move a MD 32 bit binary support routine into the MD areas. exec_setregs is highly MD in an emulation environment since it operates on the host environment. Although the setregs functions are really for exec support rather than signals, they deal with the same sorts of context and include files. So I put it there rather than create yet another file.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Nov 8 03:35:06 2003 UTC (8 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +0 -11 lines
Remove some duplicated comments that refer to npx. XXX The setregs function is actually MD (not MI) though..
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Oct 30 02:43:19 2003 UTC (8 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +10 -0 lines
Oops, forgot to save these in the editor. Add CTASSERTS for signal and context related things.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Sep 25 01:10:23 2003 UTC (8 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +64 -1 lines
Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 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.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Aug 23 00:04:53 2003 UTC (8 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +9 -8 lines
Switch to using the emulator in the common compat area. Still work-in-progress.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Aug 22 23:19:02 2003 UTC (8 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -4 lines
Initial sweep at dividing up the generic 32bit-on-64bit kernel support from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area. This is still work-in-progress.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jul 25 21:16:26 2003 UTC (8 years, 6 months ago) by obrien
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -2 lines
Use __FBSDID(). Brought to you by: a boring talk at Ottawa Linux Symposium
Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri May 23 05:07:33 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
CVS tags: old_RELENG_5_1_BP, old_RELENG_5_1_0_RELEASE, old_RELENG_5_1
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -4 lines
Deal with the user VM space expanding. 32 bit applications do not like having their stack at the 512GB mark. Give 4GB of user VM space for 32 bit apps. Note that this is significantly more than on i386 which gives only about 2.9GB of user VM to a process (1GB for kernel, plus page table pages which eat user VM space). Approved by: re (blanket)
Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu May 15 00:23:39 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -8 lines
Collect the nastiness for preserving the kernel MSR_GSBASE around the load_gs() calls into a single place that is less likely to go wrong. Eliminate the per-process context switching of MSR_GSBASE, because it should be constant for a single cpu. Instead, save/restore it during the loading of the new %gs selector for the new process. Approved by: re (amd64/* blanket)
Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed May 14 04:10:48 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +75 -154 lines
Add BASIC i386 binary support for the amd64 kernel. This is largely stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that. Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place. On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized. Approved by: re (amd64/* blanket)
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Sep 1 21:41:23 2002 UTC (9 years, 5 months ago) by jake
Branches: MAIN
CVS tags: old_old_RELENG_5_0_BP, old_old_RELENG_5_0_0_RELEASE, old_old_RELENG_5_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +7 -4 lines
Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections to 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.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Jul 20 02:56:10 2002 UTC (9 years, 6 months ago) by peter
Branches: MAIN
Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable 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).
