Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/amd64/linux32/linux32_sysvec.c

[BACK] Up to [FreeBSD] / src / sys / amd64 / linux32

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Jan 15 13:23:18 2012 UTC (3 weeks, 4 days ago) by uqs
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +1 -1 lines
SVN rev 230132 on 2012-01-15 13:23:18Z by uqs

Convert files to UTF-8

Revision 1.67.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.67.2.1: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67.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.68: download - view: text, markup, annotated - select for diffs
Mon Nov 7 15:43:11 2011 UTC (3 months ago) by ed
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +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.67.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.67: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67: +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.52.2.12: 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.52.2.11: preferred, colored; branchpoint 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52.2.11: +1 -4 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.67: download - view: text, markup, annotated - select for diffs
Sat Mar 26 09:25:35 2011 UTC (10 months, 2 weeks ago) by dchagin
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +1 -2 lines
SVN rev 220026 on 2011-03-26 09:25:35Z by dchagin

Export the correct AT_PLATFORM value.
Since signal trampolines are copied to the shared page do not need to
leave place on the stack for it. Forgotten in the previous commit.

MFC after:	1 Week

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sun Mar 13 14:58:02 2011 UTC (10 months, 4 weeks ago) by dchagin
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +11 -15 lines
SVN rev 219609 on 2011-03-13 14:58:02Z by dchagin

Enable shared page use for amd64/linux32 and i386/linux binaries.
Move signal trampoline code from the top of the stack to the shared page.

MFC after:	2 Weeks

Revision 1.65: 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.64: preferred, colored
Changes since revision 1.64: +1 -4 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.52.2.11: download - view: text, markup, annotated - select for diffs
Wed Mar 2 19:45:50 2011 UTC (11 months, 1 week ago) by dchagin
Branches: RELENG_8
Diff to: previous 1.52.2.10: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.10: +1 -1 lines
SVN rev 219198 on 2011-03-02 19:45:50Z by dchagin

MFC r218658, r218668:
Sort include files in the alphabetical order.

Revision 1.52.2.10: download - view: text, markup, annotated - select for diffs
Wed Mar 2 19:09:49 2011 UTC (11 months, 1 week ago) by jkim
Branches: RELENG_8
Diff to: previous 1.52.2.9: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.9: +6 -7 lines
SVN rev 219187 on 2011-03-02 19:09:49Z by jkim

MFC:	r216634, r216673

Improve PCB flags handling and make it more robust.  Add two new functions
for manipulating pcb_flags.  These inline functions are very similar to
atomic_set_int(9) and atomic_clear_int(9) but without unnecessary LOCK
prefix for SMP.  Add comments about the rationale.  Use these functions
wherever possible.  Although there are some places where it is not strictly
necessary (e.g., a PCB is copied to create a new PCB), it is done across
the board for sake of consistency.  Turn pcb_full_iret into a PCB flag as
it is safe now.  Move rarely used fields before pcb_flags and reduce size
of pcb_flags to four bytes.  Fix some style(9) nits in pcb.h while I am in
the neighborhood.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Feb 13 19:07:48 2011 UTC (11 months, 3 weeks ago) by dchagin
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -1 lines
SVN rev 218658 on 2011-02-13 19:07:48Z by dchagin

Sort include files in the alphabetical order.

Revision 1.31.2.14: download - view: text, markup, annotated - select for diffs
Fri Jan 21 18:32:29 2011 UTC (12 months, 2 weeks ago) by jkim
Branches: RELENG_7
Diff to: previous 1.31.2.13: preferred, colored; branchpoint 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31.2.13: +1 -1 lines
SVN rev 217701 on 2011-01-21 18:32:29Z by jkim

MFC:	r217424

Remove redundant, bogus, and even harmful uses of setting TS bit in CR0.
It is done from fpstate_drop() when it is really necessary.

Revision 1.52.2.9: download - view: text, markup, annotated - select for diffs
Fri Jan 21 18:31:57 2011 UTC (12 months, 2 weeks ago) by jkim
Branches: RELENG_8
Diff to: previous 1.52.2.8: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.8: +1 -1 lines
SVN rev 217700 on 2011-01-21 18:31:57Z by jkim

MFC:	r217424

Remove redundant, bogus, and even harmful uses of setting TS bit in CR0.
It is done from fpstate_drop() when it is really necessary.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Jan 14 21:09:01 2011 UTC (12 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +1 -1 lines
SVN rev 217424 on 2011-01-14 21:09:01Z by jkim

Remove redundant, bogus, and even harmful uses of setting TS bit in CR0.
It is done from fpstate_drop() when it is really necessary.

Reviewed by:	kib
MFC after:	1 week

Revision 1.62: download - view: text, markup, annotated - select for diffs
Wed Dec 22 00:18:42 2010 UTC (13 months, 2 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +6 -7 lines
SVN rev 216634 on 2010-12-22 00:18:42Z by jkim

Improve PCB flags handling and make it more robust.  Add two new functions
for manipulating pcb_flags.  These inline functions are very similar to
atomic_set_char(9) and atomic_clear_char(9) but without unnecessary LOCK
prefix for SMP.  Add comments about the rationale[1].  Use these functions
wherever possible.  Although there are some places where it is not strictly
necessary (e.g., a PCB is copied to create a new PCB), it is done across
the board for sake of consistency.  Turn pcb_full_iret into a PCB flag as
it is safe now.  Move rarely used fields before pcb_flags and reduce size
of pcb_flags to one byte.  Fix some style(9) nits in pcb.h while I am in
the neighborhood.

Reviewed by:	kib
Submitted by:	kib[1]
MFC after:	2 months

Revision 1.31.2.13.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.31.2.13: preferred, colored; next MAIN 1.31.2.14: preferred, colored
Changes since revision 1.31.2.13: +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.52.2.8.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.52.2.8: preferred, colored; next MAIN 1.52.2.9: preferred, colored
Changes since revision 1.52.2.8: +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.52.2.8: download - view: text, markup, annotated - select for diffs
Wed Dec 15 15:25:56 2010 UTC (13 months, 3 weeks ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.52.2.7: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.7: +2 -2 lines
SVN rev 216458 on 2010-12-15 15:25:56Z by kib

MFC r216255:
Update some comments related to use of amd64 full context switch.
In exec_linux_setregs(), use locally cached pointer to pcb to set
pcb_full_iret.
In set_regs(), note that full return is needed when code that sets
segment registers is enabled.

Approved by:	re (bz)

Revision 1.52.2.7: download - view: text, markup, annotated - select for diffs
Wed Dec 15 15:23:25 2010 UTC (13 months, 3 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.52.2.6: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.6: +1 -1 lines
SVN rev 216457 on 2010-12-15 15:23:25Z by kib

MFC r216253:
Retire write-only PCB_FULLCTX pcb flag on amd64.

Approved by:	re (bz)

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Dec 7 12:44:33 2010 UTC (14 months ago) by kib
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -2 lines
SVN rev 216255 on 2010-12-07 12:44:33Z by kib

Update some comments related to use of amd64 full context switch.
In exec_linux_setregs(), use locally cached pointer to pcb to set
pcb_full_iret.
In set_regs(), note that full return is needed when code that sets
segment registers is enabled.

MFC after:	1 week

Revision 1.60: download - view: text, markup, annotated - select for diffs
Tue Dec 7 12:17:43 2010 UTC (14 months ago) by kib
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +1 -1 lines
SVN rev 216253 on 2010-12-07 12:17:43Z by kib

Retire write-only PCB_FULLCTX pcb flag on amd64.

Reminded by:	Petr Salinger <Petr.Salinger seznam cz>
Tested by:	pho
MFC after:	1 week

Revision 1.52.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
Diff to: previous 1.52.2.5: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.5: +31 -16 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.52.2.5: download - view: text, markup, annotated - select for diffs
Wed Oct 27 15:57:17 2010 UTC (15 months, 2 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.52.2.4: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.4: +1 -1 lines
SVN rev 214421 on 2010-10-27 15:57:17Z by kib

MFC r213716:
Add macro DECLARE_MODULE_TIED to denote a module as requiring the
kernel of exactly the same __FreeBSD_version as the headers module was
compiled against.

Mark our in-tree ABI emulators with DECLARE_MODULE_TIED. The modules
use kernel interfaces that the Release Engineering Team feel are not
stable enough to guarantee they will not change during the life cycle
of a STABLE branch. In particular, the layout of struct sysentvec is
declared to be not part of the STABLE KBI.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Oct 12 09:18:17 2010 UTC (15 months, 4 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -1 lines
SVN rev 213716 on 2010-10-12 09:18:17Z by kib

Add macro DECLARE_MODULE_TIED to denote a module as requiring the
kernel of exactly the same __FreeBSD_version as the headers module was
compiled against.

Mark our in-tree ABI emulators with DECLARE_MODULE_TIED. The modules
use kernel interfaces that the Release Engineering Team feel are not
stable enough to guarantee they will not change during the life cycle
of a STABLE branch. In particular, the layout of struct sysentvec is
declared to be not part of the STABLE KBI.

Discussed with:	bz, rwatson
Approved by:	re (bz, kensmith)
MFC after:	2 weeks

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Jul 28 04:47:40 2010 UTC (18 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +5 -11 lines
SVN rev 210555 on 2010-07-28 04:47:40Z by alc

The interpreter name should no longer be treated as a buffer that can be
overwritten.  (This change should have been included in r210545.)

Submitted by:	kib

Revision 1.52.2.4.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.52.2.4: preferred, colored; next MAIN 1.52.2.5: preferred, colored
Changes since revision 1.52.2.4: +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.57: 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.56: preferred, colored
Changes since revision 1.56: +31 -16 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.52.2.4: 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.52.2.3: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.3: +2 -2 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.56: download - view: text, markup, annotated - select for diffs
Thu Mar 25 14:24:00 2010 UTC (22 months, 2 weeks ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +5 -9 lines
SVN rev 205642 on 2010-03-25 14:24:00Z by nwhitehorn

Change the arguments of exec_setregs() so that it receives a pointer
to the image_params struct instead of several members of that struct
individually. This makes it easier to expand its arguments in the future
without touching all platforms.

Reviewed by:	jhb

Revision 1.55: 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.54: preferred, colored
Changes since revision 1.54: +2 -2 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.31.2.13.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.31.2.13: preferred, colored; next MAIN 1.31.2.14: preferred, colored
Changes since revision 1.31.2.13: +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.52.2.3: download - view: text, markup, annotated - select for diffs
Sat Dec 19 11:31:28 2009 UTC (2 years, 1 month ago) by kib
Branches: RELENG_8
Diff to: previous 1.52.2.2: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.2: +6 -12 lines
SVN rev 200722 on 2009-12-19 11:31:28Z by kib

MFC r198507:
Use kern_sigprocmask() instead of direct manipulation of td_sigmask to
reschedule newly blocked signals.

MFC r198590:
Trapsignal() calls kern_sigprocmask() when delivering catched signal
with proc lock held.

MFC r198670:
For trapsignal() and postsig(), kern_sigprocmask() is called with
both process lock and curproc->p_sigacts->ps_mtx locked. Prevent lock
recursion on ps_mtx in reschedule_signals().

Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue Oct 27 10:47:58 2009 UTC (2 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +6 -12 lines
SVN rev 198507 on 2009-10-27 10:47:58Z by kib

In r197963, a race with thread being selected for signal delivery
while in kernel mode, and later changing signal mask to block the
signal, was fixed for sigprocmask(2) and ptread_exit(3). The same race
exists for sigreturn(2), setcontext(2) and swapcontext(2) syscalls.

Use kern_sigprocmask() instead of direct manipulation of td_sigmask to
reschedule newly blocked signals, closing the race.

Reviewed by:	davidxu
Tested by:	pho
MFC after:	1 month

Revision 1.52.2.2.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.52.2.2: preferred, colored; next MAIN 1.52.2.3: preferred, colored
Changes since revision 1.52.2.2: +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.31.2.13: 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
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP
Branch point for: RELENG_7_4, RELENG_7_3
Diff to: previous 1.31.2.12: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.12: +30 -5 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.52.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
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.52.2.1: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.1: +30 -5 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.53: 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.52: preferred, colored
Changes since revision 1.52: +30 -5 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.52.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.52: preferred, colored
Changes since revision 1.52: +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.52: download - view: text, markup, annotated - select for diffs
Thu Jul 9 09:34:11 2009 UTC (2 years, 7 months ago) by kib
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +5 -0 lines
SVN rev 195486 on 2009-07-09 09:34:11Z by kib

Restore the segment registers and segment base MSRs for amd64 syscall
return path only when neither thread was context switched while
executing syscall code nor syscall explicitely modified LDT or MSRs.

Save segment registers in trap handlers before interrupts are enabled,
to not allow context switches to happen before registers are saved.
Use separated byte in pcb for indication of fast/full return, since
pcb_flags are not synchronized with context switches.

The change puts back syscall microbenchmark numbers that were slowed
down after commit of the support for LDT on amd64.

Reviewed by:	jeff
Tested (and tested, and tested ...) by:	pho
Approved by:	re (kensmith)

Revision 1.31.2.12: download - view: text, markup, annotated - select for diffs
Mon Jun 1 04:44:43 2009 UTC (2 years, 8 months ago) by dchagin
Branches: RELENG_7
Diff to: previous 1.31.2.11: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.11: +1 -3 lines
SVN rev 193196 on 2009-06-01 04:44:43Z by dchagin

MFC r191741:
Move extern variable definitions to the header file.

Approved by:	kib (mentor)

Revision 1.31.2.11: download - view: text, markup, annotated - select for diffs
Sun May 31 06:58:35 2009 UTC (2 years, 8 months ago) by dchagin
Branches: RELENG_7
Diff to: previous 1.31.2.10: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.10: +3 -3 lines
SVN rev 193152 on 2009-05-31 06:58:35Z by dchagin

MFC r191719:

Reimplement futexes.
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.

New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.

Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.

Approved by:	kib (mentor)

Revision 1.31.2.10: download - view: text, markup, annotated - select for diffs
Thu May 28 18:26:18 2009 UTC (2 years, 8 months ago) by dchagin
Branches: RELENG_7
Diff to: previous 1.31.2.9: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.9: +12 -1 lines
SVN rev 192987 on 2009-05-28 18:26:18Z by dchagin

Merge r191883,191966,191973 from HEAD to stable/7:

Linux exports HZ value to user space via AT_CLKTCK auxiliary vector
entry since 2.4.0.
Being exported, AT_CLKTCK is returned by sysconf(_SC_CLK_TCK),
glibc falls back to the hard-coded CLK_TCK value when aux entry
is not present.

Glibc versions prior to 2.2.1 always use hard-coded CLK_TCK value.

For older applications/libc's which depends on hard-coded CLK_TCK
value user should set compat.linux.osrelease less than 2.4.0.

linux_times() shall use the value that is exported to user space.

PR:		kern/134251
Approved by:	kib (mentor)

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun May 10 18:43:43 2009 UTC (2 years, 9 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +11 -1 lines
SVN rev 191973 on 2009-05-10 18:43:43Z by dchagin

Do not export AT_CLKTCK when emulating Linux kernel prior
to 2.4.0, as it has appeared in the 2.4.0-rc7 first time.
Being exported, AT_CLKTCK is returned by sysconf(_SC_CLK_TCK),
glibc falls back to the hard-coded CLK_TCK value when aux entry
is not present.

Glibc versions prior to 2.2.1 always use hard-coded CLK_TCK value.

For older applications/libc's which depends on hard-coded CLK_TCK
value user should set compat.linux.osrelease less than 2.4.0.

Approved by:	kib (mentor)

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun May 10 18:16:07 2009 UTC (2 years, 9 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -1 lines
SVN rev 191966 on 2009-05-10 18:16:07Z by dchagin

Rework r189362, r191883.
The frequency of the statistics clock is given by stathz.
Use stathz if it is available, otherwise use hz.

Pointed out by:	bde

Approved by:	kib (mentor)

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu May 7 18:36:47 2009 UTC (2 years, 9 months ago) by jamie
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -0 lines
SVN rev 191896 on 2009-05-07 18:36:47Z by jamie

Move the per-prison Linux MIB from a private one-off pointer to the new
OSD-based jail extensions.  This allows the Linux MIB to accessed via
jail_set and jail_get, and serves as a demonstration of adding jail support
to a module.

Reviewed by:	dchagin, kib
Approved by:	bz (mentor)

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat May 2 10:06:49 2009 UTC (2 years, 9 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +1 -3 lines
SVN rev 191741 on 2009-05-02 10:06:49Z by dchagin

Move extern variable definitions to the header file.

Approved by:	kib (mentor)
MFC after:	1 month

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri May 1 15:36:02 2009 UTC (2 years, 9 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -3 lines
SVN rev 191719 on 2009-05-01 15:36:02Z by dchagin

Reimplement futexes.
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.

New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.

Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.

Approved by:	kib (mentor)
MFC after:	1 month

Revision 1.31.2.8.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.31.2.8.2.1: preferred, colored; branchpoint 1.31.2.8: preferred, colored; next MAIN 1.31.2.9: preferred, colored
Changes since revision 1.31.2.8.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.31.2.9: 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.31.2.8: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.8: +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.31.2.8.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.31.2.8: preferred, colored
Changes since revision 1.31.2.8: +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.31.2.8: download - view: text, markup, annotated - select for diffs
Fri Apr 10 13:45:56 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.31.2.7: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.7: +32 -17 lines
SVN rev 190893 on 2009-04-10 13:45:56Z by dchagin

Merge from HEAD to stable/7:

r186211:
Remove obsolete AT_DEBUG stuff.  It never should have been committed
in the first place, let alone migrated to linux emulation.

r189362:
Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries which
are used by glibc. This silents the message "2.4+ kernel w/o ELF notes?"
from some programs at start, among them are top and pkill.

Do the assignment of the vector entries in elf_linux_fixup()
as it is done in glibc.

Fix some minor style issues.

Approved by:	re (Ken Smith), kib(mentor)

Revision 1.46: 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
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +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.45: download - view: text, markup, annotated - select for diffs
Wed Apr 1 13:09:26 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +38 -32 lines
SVN rev 190620 on 2009-04-01 13:09:26Z by kib

Save and restore segment registers on amd64 when entering and leaving
the kernel on amd64. Fill and read segment registers for mcontext and
signals. Handle traps caused by restoration of the
invalidated selectors.

Implement user-mode creation and manipulation of the process-specific
LDT descriptors for amd64, see sysarch(2).

Implement support for TSS i/o port access permission bitmap for amd64.

Context-switch LDT and TSS. Do not save and restore segment registers on
the context switch, that is handled by kernel enter/leave trampolines
now. Remove segment restore code from the signal trampolines for
freebsd/amd64, freebsd/ia32 and linux/i386 for the same reason.

Implement amd64-specific compat shims for sysarch.

Linuxolator (temporary ?) switched to use gsbase for thread_area pointer.

TODO:
Currently, gdb is not adapted to show segment registers from struct reg.
Also, no machine-depended ptrace command is added to set segment
registers for debugged process.

In collaboration with:	pho
Discussed with:	peter
Reviewed by:	jhb
Linuxolator tested by:	dchagin

Revision 1.31.2.7: 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
Diff to: previous 1.31.2.6: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.6: +14 -2 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.31.2.6: download - view: text, markup, annotated - select for diffs
Thu Mar 26 12:13:19 2009 UTC (2 years, 10 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.31.2.5: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.5: +1 -0 lines
SVN rev 190439 on 2009-03-26 12:13:19Z by kib

Include linux_misc.h to get the definition for __LINUX_NPXCW__.

Approved by:	re (kensmith)

Revision 1.31.2.5: download - view: text, markup, annotated - select for diffs
Wed Mar 25 17:22:15 2009 UTC (2 years, 10 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.31.2.4: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.4: +1 -0 lines
SVN rev 190418 on 2009-03-25 17:22:15Z by jhb

Allow different ABIs to use different initial control words for the FPU on
amd64 and i386.  This fixes a bug were 32-bit binaries would run with a
different floating point exception mask under FreeBSD/amd64 vs FreeBSD/i386.
This commit also includes a few other minor changes to keep the code in
sync with 8.

Approved by:	re (kib)

Revision 1.31.2.4: download - view: text, markup, annotated - select for diffs
Tue Mar 24 02:09:48 2009 UTC (2 years, 10 months ago) by obrien
Branches: RELENG_7
Diff to: previous 1.31.2.3: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.3: +53 -51 lines
SVN rev 190360 on 2009-03-24 02:09:48Z by obrien

MFC: r187964: Fix the inconsistent tabbing.

Revision 1.44: 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.43: preferred, colored
Changes since revision 1.43: +14 -2 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.43: download - view: text, markup, annotated - select for diffs
Thu Mar 5 19:42:11 2009 UTC (2 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -0 lines
SVN rev 189423 on 2009-03-05 19:42:11Z by jhb

A better fix for handling different FPU initial control words for different
ABIs:
- Store the FPU initial control word in the pcb for each thread.
- When first using the FPU, load the initial control word after restoring
  the clean state if it is not the standard control word.
- Provide a correct control word for Linux/i386 binaries under
  FreeBSD/amd64.
- Adjust the control word returned for fpugetregs()/npxgetregs() when a
  thread hasn't used the FPU yet to reflect the real initial control
  word for the current ABI.
- The Linux/i386 ABI for FreeBSD/i386 now properly sets the right control
  word instead of trashing whatever the current state of the FPU is.

Reviewed by:	bde

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Mar 4 12:14:33 2009 UTC (2 years, 11 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +33 -15 lines
SVN rev 189362 on 2009-03-04 12:14:33Z by dchagin

Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries which
are used by glibc. This silents the message "2.4+ kernel w/o ELF notes?"
from some programs at start, among them are top and pkill.

Do the assignment of the vector entries in elf_linux_fixup()
as it is done in glibc.

Fix some minor style issues.

Submitted by:	Marcin Cieslak <saper at SYSTEM PL>
Approved by:	kib (mentor)
MFC after:	1 week

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Jan 31 20:46:01 2009 UTC (3 years ago) by obrien
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +55 -52 lines
SVN rev 187964 on 2009-01-31 20:46:01Z by obrien

Fix the inconsistent tabbing.

Noticed by:	bde

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Jan 31 11:37:21 2009 UTC (3 years ago) by obrien
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +4 -4 lines
SVN rev 187948 on 2009-01-31 11:37:21Z by obrien

Change some movl's to mov's.  Newer GAS no longer accept 'movl' instructions
for moving between a segment register and a 32-bit memory location.

Looked at by:	jhb

Revision 1.31.2.3: 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.31.2.2: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.2: +49 -49 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.39: download - view: text, markup, annotated - select for diffs
Wed Dec 17 06:11:42 2008 UTC (3 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +0 -2 lines
SVN rev 186211 on 2008-12-17 06:11:42Z by imp

Remove obsolete AT_DEBUG stuff.  It never should have been committed
in the first place, let alone migrated to linux emulation.

Reviewed by:	peter, rdivacky

Revision 1.31.2.2.2.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.31.2.2: preferred, colored; next MAIN 1.31.2.3: preferred, colored
Changes since revision 1.31.2.2: +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.38: 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.37: preferred, colored
Changes since revision 1.37: +1 -0 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.31.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 21 18:50:52 2008 UTC (3 years, 3 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.31.2.1: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.1: +2 -1 lines
SVN rev 184134 on 2008-10-21 18:50:52Z by kib

MFC r184026:
Set PCB_32BIT and clear PCB_GS32BIT for linux32 binaries.

Approved by:	re (kensmith)

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Oct 19 10:02:26 2008 UTC (3 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +1 -3 lines
SVN rev 184058 on 2008-10-19 10:02:26Z by kib

Correctly fill siginfo for the signals delivered by linux tkill/tgkill.
It is required for async cancellation to work.

Fix PROC_LOCK leak in linux_tgkill when signal delivery attempt is made
to not linux process.

Do not call em_find(p, ...) with p unlocked.

Move common code for linux_tkill() and linux_tgkill() into
linux_do_tkill().

Change linux siginfo_t definition to match actual linux one. Extend
uid fields to 4 bytes from 2. The extension does not change structure
layout and is binary compatible with previous definition, because i386
is little endian, and each uid field has 2 byte padding after it.

Reported by:	Nicolas Joly <njoly pasteur fr>
Submitted by:	dchangin
MFC after:	1 month

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Oct 18 13:39:22 2008 UTC (3 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -1 lines
SVN rev 184026 on 2008-10-18 13:39:22Z by kib

Set PCB_32BIT and clear PCB_GS32BIT for linux32 binaries.

Tested by:	dchagin
MFC after:	3 days

Revision 1.7.2.11.2.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.7.2.11: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.2.11: +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.35: 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.34: preferred, colored
Changes since revision 1.34: +49 -49 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.34: download - view: text, markup, annotated - select for diffs
Tue Apr 8 09:45:47 2008 UTC (3 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -1 lines
Implement the linux syscalls
    openat, mkdirat, mknodat, fchownat, futimesat, fstatat, unlinkat,
    renameat, linkat, symlinkat, readlinkat, fchmodat, faccessat.

Submitted by:	rdivacky
Sponsored by:	Google Summer of Code 2007
Tested by:	pho

Revision 1.7.2.11: download - view: text, markup, annotated - select for diffs
Thu Mar 27 13:53:51 2008 UTC (3 years, 10 months ago) by kib
Branches: RELENG_6
CVS tags: RELENG_6_4_BP
Branch point for: RELENG_6_4
Diff to: previous 1.7.2.10: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.2.10: +2 -2 lines
MFC
rev. 1.682 of sys/amd64/amd64/machdep.c
rev. 1.16  of sys/amd64/ia32/ia32_signal.c
rev. 1.33  of sys/amd64/linux32/linux32_sysvec.c
rev. 1.666 of sys/i386/i386/machdep.c
rev. 1.152 of sys/i386/linux/linux_sysvec.c
rev. 1.39  of sys/i386/svr4/svr4_machdep.c
rev. 1.402 of sys/pc98/pc98/machdep.c

Modify the signal handler frame setup code to clear the DF {e,r}flags
bit on the amd64/i386 for the signal handlers.

Revision 1.31.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 27 13:46:26 2008 UTC (3 years, 10 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2 lines
MFC
rev. 1.682 of sys/amd64/amd64/machdep.c
rev. 1.16  of sys/amd64/ia32/ia32_signal.c
rev. 1.33  of sys/amd64/linux32/linux32_sysvec.c
rev. 1.666 of sys/i386/i386/machdep.c
rev. 1.152 of sys/i386/linux/linux_sysvec.c
rev. 1.39  of sys/i386/svr4/svr4_machdep.c
rev. 1.402 of sys/pc98/pc98/machdep.c

Modify the signal handler frame setup code to clear the DF {e,r}flags
bit on the amd64/i386 for the signal handlers.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Mar 13 10:54:37 2008 UTC (3 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Since version 4.3, gcc changed its behaviour concerning the i386/amd64
ABI and the direction flag, that is it now assumes that the direction
flag is cleared at the entry of a function and it doesn't clear once
more if needed. This new behaviour conforms to the i386/amd64 ABI.

Modify the signal handler frame setup code to clear the DF {e,r}flags
bit on the amd64/i386 for the signal handlers.

jhb@ noted that it might break old apps if they assumed DF == 1 would be
preserved in the signal handlers, but that such apps should be rare and
that older versions of gcc would not generate such apps.

Submitted by:	Aurelien Jarno <aurelien aurel32 net>
PR:	121422
Reviewed by:	jhb
MFC after:	2 weeks

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Mar 12 10:11:55 2008 UTC (3 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +1 -2 lines
Remove kernel support for M:N threading.

While the KSE project was quite successful in bringing threading to
FreeBSD, the M:N approach taken by the kse library was never developed
to its full potential.  Backwards compatibility will be provided via
libmap.conf for dynamically linked binaries and static binaries will
be broken.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Sep 20 13:46:26 2007 UTC (4 years, 4 months ago) by kib
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -0 lines
Fill in cr2 in the signal context from ksi->ksi_addr.
Together with the sys/i386/i386/trap.c rev. 1.306 it fixes the PR.

Submitted by:	rdivacky
Suggested by:	jhb
Sponsored by:	Google Summer of Code 2007
PR:		kern/77710
Approved by:	re (kensmith)

Revision 1.7.2.10: download - view: text, markup, annotated - select for diffs
Mon Sep 3 13:18:42 2007 UTC (4 years, 5 months ago) by netchild
Branches: RELENG_6
CVS tags: RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Diff to: previous 1.7.2.9: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.9: +0 -3 lines
MFC:
 - sync linuxulator:
   * de-COMPAT_43-ify:
     + socket related ioctl's
     This differs from -current, as the kernel ABI is different
     (kern_bind() and kern_connect() free the struct sockaddr on -stable
     themself, so two calls to free() are not included in this MFC).
   * bug-/compatibility-fixes
   * ioctl TIOCGPTN
   * 1 style(9)-fix

Tested by:	"Arno J. Klaassen" <arno@heho.snv.jussieu.fr>

Revision 1.30: 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.29: preferred, colored
Changes since revision 1.29: +2 -1 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.7.2.9: download - view: text, markup, annotated - select for diffs
Sun Jul 8 12:20:35 2007 UTC (4 years, 7 months ago) by netchild
Branches: RELENG_6
Diff to: previous 1.7.2.8: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.8: +2 -1 lines
MFC (5 of X):
 - linuxulator mmap handling
 - memleak fixes
 - extend linux errno mapping
 - handle address space limits for linux processes
 - sync linprocfs (/proc/sys/... part)

Compile tested by:	scf (i386, as part of a mega-MFC-patch)
Tested by:		Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)

Revision 1.7.2.8: download - view: text, markup, annotated - select for diffs
Sun Jul 8 09:04:43 2007 UTC (4 years, 7 months ago) by netchild
Branches: RELENG_6
Diff to: previous 1.7.2.7: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.7: +1 -1 lines
MFC (4 of X):
 - don't limit number of syscalls to 255
 - handle more socket options
 - bug-/compatibility-fixes to linux
   * file related (includes fixes which prevent creation of strange files
     which can only be removed with a fsck)
   * make ping work
   * ...
 - add devfs to the file system type handling/translation

Compile tested by:	scf (i386, as part of a mega-MFC-patch)
Tested by:		Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)

Revision 1.7.2.7: download - view: text, markup, annotated - select for diffs
Sun Jul 8 08:26:09 2007 UTC (4 years, 7 months ago) by netchild
Branches: RELENG_6
Diff to: previous 1.7.2.6: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.6: +2 -0 lines
MFC (1 of X):
 - easy linuxulator style(9) fixes (easy = hand removal of non-style code
   change sections in a full diff)

Tested by:	scf (i386), Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)

Revision 1.7.2.6: download - view: text, markup, annotated - select for diffs
Fri Jun 29 21:04:22 2007 UTC (4 years, 7 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.7.2.5: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.5: +1 -1 lines
Properly initialize the address value in siginfo for Linux binaries on
amd64.  amd64 has a separate tf_addr in the trapframe unlike i386 which
reuses tf_err to pass the address to signals.

Revision 1.7.2.5: download - view: text, markup, annotated - select for diffs
Wed May 23 18:24:42 2007 UTC (4 years, 8 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.7.2.4: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.4: +28 -35 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.29: 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.28: preferred, colored
Changes since revision 1.28: +28 -34 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.28: download - view: text, markup, annotated - select for diffs
Mon Apr 2 18:38:12 2007 UTC (4 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
MFP4:	Turn emul_lock into a mutex.

Submitted by:	rdivacky

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Mar 30 00:06:21 2007 UTC (4 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +6 -2 lines
MFP4: Linux set_thread_area syscall (aka TLS) support for amd64.

Initial version was submitted by Divacky Roman and mostly rewritten by me.

Tested by:	emulation

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Dec 3 21:06:07 2006 UTC (5 years, 2 months ago) by netchild
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +1 -1 lines
MFP4 (110939):

MFi386: return EOPNOTSUPP for unknown module events.

Submitted by:	rdivacky

Revision 1.7.2.4: download - view: text, markup, annotated - select for diffs
Fri Nov 3 09:18:31 2006 UTC (5 years, 3 months ago) by kib
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.7.2.3: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.3: +1 -1 lines
MFC rev. 1.25
Use correct linux32 signal trampoline length.

Approved by:	re (hrs)

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Oct 31 17:53:02 2006 UTC (5 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -1 lines
Fix a typo resulting in truncated linux32 signal trampoline code copied
to the usermode. Usually, signal handler segfaulted on return.

Reviewed by:	jhb
MFC after:	3 days

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Sep 9 16:25:25 2006 UTC (5 years, 5 months ago) by netchild
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
Change futex lock from mutex to sx. Make futex_get atomic (protected by the
futex lock).

Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Suggested by:	jhb

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Aug 17 21:06:48 2006 UTC (5 years, 5 months ago) by netchild
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +0 -2 lines
Move some stuff into headers where they belong.

Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Noticed by:	jhb, ssouhlal

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Aug 17 10:04:49 2006 UTC (5 years, 5 months ago) by netchild
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -0 lines
Initialize the emul sx-lock.

Sponsored by:	Google SoC 2006
Submitted by:	rdivacky

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Aug 15 14:58:15 2006 UTC (5 years, 5 months ago) by netchild
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +26 -0 lines
Initialize the eventhandlers, mutexes and sx locks.

Sponsored by:	Google SoC 2006
Submitted by:	rdivacky

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Aug 15 12:54:29 2006 UTC (5 years, 5 months ago) by netchild
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -1 lines
Add the linux 2.6.x stuff (not used by default!):
 - TLS - complete
 - pid/tid mangling - complete
 - thread area - complete
 - futexes - complete with issues
 - clone() extension - complete with some possible minor issues
 - mq*/timer*/clock* stuff - complete but untested and the mq* stuff is
   disabled when not build as part of the kernel with native FreeBSD mq*
   support (module support for this will come later)

Tested with:
 - linux-firefox - works, tested
 - linux-opera - works, tested
 - linux-realplay - doesnt work, issue with futexes
 - linux-skype - doesnt work, issue with futexes
 - linux-rt2-demo - works, tested
 - linux-acroread - doesnt work, unknown reason (coredump) and sometimes
   issue with futexes
 - various unix utilities in linux-base-gentoo3 and linux-base-fc4:
   everything tried worked

On amd64 not everything is supported like on i386, the catchup is planned for
later when the remaining bugs in the new functions are fixed.

To test this new stuff, you have to run
	sysctl compat.linux.osrelease=2.6.16
to switch back use
	sysctl compat.linux.osrelease=2.4.2

Don't switch while running a linux program, strange things may or may not
happen.

Sponsored by:			Google SoC 2006
Submitted by:			rdivacky
Some suggestions/help by:	jhb, kib, manu@NetBSD.org, netchild

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Aug 10 22:05:25 2006 UTC (5 years, 6 months ago) by netchild
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -1 lines
Add some more errno mappings (bsd -> linux) and a comment about the status..

Submitted by:	"Intron" <mag@intron.ac>

Revision 1.7.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 15 15:52:04 2006 UTC (5 years, 7 months ago) by ambrisko
Branches: RELENG_6
Diff to: previous 1.7.2.2: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.2: +6 -0 lines
MFC the enhancements to the Linux emulation layer so the MegaRAID SAS
management tools can work.  This is not totally connected to the build
yet.  The mfi(4) change have not been MFC'ed yet.  This will be done
shortly.  I'm trying to do this in chunks so I don't totally break
the build on a missed commit.  This has passed make universe a while
ago:
  Enhance the Linux emulation layer to make MegaRAID SAS managements tool happy.
  Add back in a scheme to emulate old type major/minor numbers via hooks into
  stat, linprocfs to return major/minors that Linux app's expect.  Currently
  only /dev/null is always registered.  Drivers can register via the Linux
  type shim similar to the ioctl shim but by using
  linux_device_register_handler/linux_device_unregister_handler functions.
  The structure is:

    struct linux_device_handler {
        char    *bsd_driver_name;
        char    *linux_driver_name;
        char    *bsd_device_name;
        char    *linux_device_name;
        int     linux_major;
        int     linux_minor;
        int     linux_char_device;
    };

  Linprocfs uses this to display the major number of the driver.  The
  soon to be available linsysfs will use it to fill in the driver name.
  Linux_stat uses it to translate the major/minor into Linux type values.

  Note major numbers are dynamically assigned via passing in a -1 for
  the major number so we don't need to keep track of them.

  This is somewhat needed due to us switching to our devfs.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat May 6 17:26:45 2006 UTC (5 years, 9 months ago) by ambrisko
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +6 -0 lines
Forgot the amd/linux32 part since sys/*/linux didn't match :-(

Pointed out by:	Alexander (thanks)

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Mar 19 11:10:32 2006 UTC (5 years, 10 months ago) by ru
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -0 lines
Unbreak COMPAT_LINUX32 option support on amd64.

Broken by:	netchild

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Mar 18 20:49:00 2006 UTC (5 years, 10 months ago) by netchild
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +0 -3 lines
regen

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Mar 18 18:24:38 2006 UTC (5 years, 10 months ago) by netchild
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +0 -3 lines
regen after COMPAT_43 removal

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Dec 26 21:23:57 2005 UTC (6 years, 1 month ago) by sobomax
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +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.7.2.2: download - view: text, markup, annotated - select for diffs
Thu Dec 22 21:25:19 2005 UTC (6 years, 1 month ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.7.2.1: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.1: +0 -1 lines
MFC: Remove linux_mib_destroy() since MTX_SYSINIT's gaining of a SYSUNINIT
that called mtx_destroy() made it obsolete.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Dec 15 16:30:41 2005 UTC (6 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +0 -1 lines
Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1)
which existed to cleanup the linux_osname mutex.  Now that MTX_SYSINIT()
has grown a SYSUNINIT to destroy mutexes on unload, the extra destroy here
was redundant and resulted in panics in debug kernels.

MFC after:	1 week
Reported by:	Goran Gajic ggajic at afrodita dot rcub dot bg dot ac dot yu

Revision 1.12: 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.11: preferred, colored
Changes since revision 1.11: +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.11: download - view: text, markup, annotated - select for diffs
Fri Oct 14 20:22:57 2005 UTC (6 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -2 lines
The signal code is now an int rather than a long, so update debug printfs.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Oct 14 12:43:43 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +27 -9 lines
1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most
   changes in MD code are trivial, before this change, trapsignal and
   sendsig use discrete parameters, now they uses member fields of
   ksiginfo_t structure. For sendsig, this change allows us to pass
   POSIX realtime signal value to user code.

2. Remove cpu_thread_siginfo, it is no longer needed because we now always
   generate ksiginfo_t data and feed it to libpthread.

3. Add p_sigqueue to proc structure to hold shared signals which were
   blocked by all threads in the proc.

4. Add td_sigqueue to thread structure to hold all signals delivered to
   thread.

5. i386 and amd64 now return POSIX standard si_code, other arches will
   be fixed.

6. In this sigqueue implementation, pending signal set is kept as before,
   an extra siginfo list holds additional siginfo_t data for signals.
   kernel code uses psignal() still behavior as before, it won't be failed
   even under memory pressure, only exception is when deleting a signal,
   we should call sigqueue_delete to remove signal from sigqueue but
   not SIGDELSET. Current there is no kernel code will deliver a signal
   with additional data, so kernel should be as stable as before,
   a ksiginfo can carry more information, for example, allow signal to
   be delivered but throw away siginfo data if memory is not enough.
   SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can
   not be caught or masked.
   The sigqueue() syscall allows user code to queue a signal to target
   process, if resource is unavailable, EAGAIN will be returned as
   specification said.
   Just before thread exits, signal queue memory will be freed by
   sigqueue_flush.
   Current, all signals are allowed to be queued, not only realtime signals.

Earlier patch reviewed by: jhb, deischen
Tested on: i386, amd64

Revision 1.7.2.1: download - view: text, markup, annotated - select for diffs
Mon Oct 3 20:08:00 2005 UTC (6 years, 4 months ago) by ups
Branches: RELENG_6
CVS tags: RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -0 lines
MFC revision 1.9:
Fix the "fpudna: fpcurthread == curthread XXX times" problem.

Approved by: re (scottl@)

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Sep 22 15:46:21 2005 UTC (6 years, 4 months ago) by ups
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -0 lines
Fix the "fpudna: fpcurthread == curthread XXX times" problem.

Tested by: kris@
Reviewed by:	peter@
MFC after:	3 days

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jul 29 19:40:38 2005 UTC (6 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +0 -3 lines
Move MODULE_DEPEND() statements for SYSVIPC dependencies to linux_ipc.c
so that they aren't duplicated 3 times and are also in the same file as
the code that depends on the SYSVIPC modules.

Revision 1.3.2.3: download - view: text, markup, annotated - select for diffs
Sat Apr 23 22:47:57 2005 UTC (6 years, 9 months ago) by ps
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.3.2.2: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.2: +6 -7 lines
MFC:
- Implement linux_nanosleep() using the recently added kern_nanosleep().
- Use linux_emul_convpath() instead of linux_emul_find() in
  exec_linux_imgact_try().

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 29 07:24:45 2005 UTC (6 years, 10 months ago) by das
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.1: +2 -2 lines
MFC linux32_sysvec.c,v 1.7  exec.h,v 1.32:
  Make ps_nargvstr and ps_nenvstr unsigned.

Approved by:	re

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Mar 23 08:27:58 2005 UTC (6 years, 10 months ago) by das
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
Make ps_nargvstr and ps_nenvstr unsigned.  This fixes an input
validation error in procfs/linprocfs that can be exploited by local
users to cause a kernel panic.  All versions of FreeBSD with the patch
referenced in SA-04:17.procfs have this bug, but versions without that
patch have a more serious bug instead.  This problem only affects
systems on which procfs or linprocfs is mounted.

Found by:	Coverity Prevent analysis tool
Security:	Local DOS

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Feb 18 18:51:59 2005 UTC (6 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -7 lines
- Add a custom version of exec_copyin_args() to deal with the 32-bit
  pointers in argv and envv in userland and use that together with
  kern_execve() and exec_free_args() to implement linux_execve() for the
  amd64/linux32 ABI without using the stackgap.
- Implement linux_nanosleep() using the recently added kern_nanosleep().
- Use linux_emul_convpath() instead of linux_emul_find() in
  exec_linux_imgact_try().

Tested by:	cokane
Silence on:	amd64

Revision 1.3.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 5 01:02:48 2005 UTC (7 years ago) by das
Branches: RELENG_5
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -1 lines
MFC:

  2004-11-27 06:51:39 UTC
  Don't include sys/user.h merely for its side-effect of recursively
  including other headers.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Jan 29 23:11:58 2005 UTC (7 years ago) by sobomax
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +9 -9 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.4: download - view: text, markup, annotated - select for diffs
Sat Nov 27 06:51:34 2004 UTC (7 years, 2 months ago) by das
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -1 lines
Don't include sys/user.h merely for its side-effect of recursively
including other headers.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Aug 16 11:15:46 2004 UTC (7 years, 5 months ago) by obrien
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -1 lines
I missed an 'IA32' in the documentation.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Aug 16 11:09:58 2004 UTC (7 years, 5 months ago) by obrien
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -4 lines
I'm not sure what tjr envisioned for turning on FreeBSD/i386 rt support,
but make it COMPAT_IA32 for now.
Fix the 'DEBUG' argument code to unbreak the amd64 LINT build.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Aug 16 07:55:06 2004 UTC (7 years, 5 months ago) by tjr
Branches: MAIN
Add preliminary support for running 32-bit Linux binaries on amd64, enabled
with the COMPAT_LINUX32 option. This is largely based on the i386 MD Linux
emulations bits, but also builds on the 32-bit FreeBSD and generic IA-32
binary emulation work.

Some of this is still a little rough around the edges, and will need to be
revisited before 32-bit and 64-bit Linux emulation support can coexist in
the same kernel.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options