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

CVS log for src/sys/sys/imgact.h

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.53.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.53.2.1: preferred, colored
Changes since revision 1.53.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.53.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.53: preferred, colored
Changes since revision 1.53: +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.53: download - view: text, markup, annotated - select for diffs
Sat Jan 8 16:13:44 2011 UTC (13 months ago) by kib
Branches: MAIN
CVS tags: RELENG_9_BP, HEAD
Branch point for: RELENG_9
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -0 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.40.2.2.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.40.2.2: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.2: +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.43.2.1.6.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.43.2.1: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43.2.1: +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: download - view: text, markup, annotated - select for diffs
Tue Aug 17 08:55:45 2010 UTC (17 months, 3 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -0 lines
SVN rev 211412 on 2010-08-17 08:55:45Z by kib

Supply some useful information to the started image using ELF aux vectors.
In particular, provide pagesize and pagesizes array, the canary value
for SSP use, number of host CPUs and osreldate.

Tested by:	marius (sparc64)
MFC after:	1 month

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Jul 28 04:47:40 2010 UTC (18 months, 1 week ago) by alc
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +1 -0 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.50: download - view: text, markup, annotated - select for diffs
Tue Jul 27 17:31:03 2010 UTC (18 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +1 -0 lines
SVN rev 210545 on 2010-07-27 17:31:03Z by alc

Introduce exec_alloc_args().  The objective being to encapsulate the
details of the string buffer allocation in one place.

Eliminate the portion of the string buffer that was dedicated to storing
the interpreter name.  The pointer to the interpreter name can simply be
made to point to the appropriate argument string.

Reviewed by:	kib

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Jul 26 12:52:44 2010 UTC (18 months, 2 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -1 lines
SVN rev 210498 on 2010-07-26 12:52:44Z by kib

Revert r210451, and the similar part of the r210431. The forward-declaration
for the enum tag when enum definition is not complete is not allowed by
C99, and is gcc extension.

Requested by:	stefanf
MFC after:	28 days

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Jul 24 18:14:34 2010 UTC (18 months, 2 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +1 -2 lines
SVN rev 210451 on 2010-07-24 18:14:34Z by kib

Use forward declartion for enum uio_seg in imgact.h. This allows to remove
inclusion of sys/uio.h from the header.

Proposed by:	alc
MFC after:	1 week

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Jul 23 18:58:27 2010 UTC (18 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +1 -0 lines
SVN rev 210429 on 2010-07-23 18:58:27Z by alc

Eliminate a little bit of duplicated code.

Revision 1.43.2.1.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.43.2.1: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43.2.1: +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.46: download - view: text, markup, annotated - select for diffs
Thu Mar 25 14:31:26 2010 UTC (22 months, 2 weeks ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +1 -0 lines
SVN rev 205643 on 2010-03-25 14:31:26Z by nwhitehorn

Add the ELF relocation base to struct image_params. This will be
required to correctly relocate the executable entry point's function
descriptor on powerpc64.

Revision 1.45: 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.44: preferred, colored
Changes since revision 1.44: +1 -1 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.44: download - view: text, markup, annotated - select for diffs
Tue Mar 2 06:58:58 2010 UTC (23 months, 1 week ago) by alfred
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -0 lines
SVN rev 204552 on 2010-03-02 06:58:58Z by alfred

Merge projects/enhanced_coredumps (r204346) into HEAD:

  Enhanced process coredump routines.

  This brings in the following features:
  1) Limit number of cores per process via the %I coredump formatter.
  Example:
    if corefilename is set to %N.%I.core AND num_cores = 3, then
    if a process "rpd" cores, then the corefile will be named
    "rpd.0.core", however if it cores again, then the kernel will
    generate "rpd.1.core" until we hit the limit of "num_cores".

    this is useful to get several corefiles, but also prevent filling
    the machine with corefiles.

  2) Encode machine hostname in core dump name via %H.

  3) Compress coredumps, useful for embedded platforms with limited space.
    A sysctl kern.compress_user_cores is made available if turned on.

    To enable compressed coredumps, the following config options need to be set:
    options COMPRESS_USER_CORES
    device zlib   # brings in the zlib requirements.
    device gzio   # brings in the kernel vnode gzip output module.

  4) Eventhandlers are fired to indicate coredumps in progress.

  5) The imgact sv_coredump routine has grown a flag to pass in more
  state, currently this is used only for passing a flag down to compress
  the coredump or not.

  Note that the gzio facility can be used for generic output of gzip'd
  streams via vnodes.

Obtained from: Juniper Networks
Reviewed by: kan

Revision 1.40.2.2.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.40.2.2: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.2: +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.40.2.2: 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.40.2.1: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.1: +3 -0 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.43.2.1.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.43.2.1: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43.2.1: +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.43.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
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP, RELENG_8_0_BP
Branch point for: RELENG_8_2, RELENG_8_1, RELENG_8_0
Diff to: previous 1.43: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43: +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.40.2.1.4.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
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.40.2.1: preferred, colored; next MAIN 1.40.2.2: preferred, colored
Changes since revision 1.40.2.1: +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.43: 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
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -0 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.40.2.1.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.40.2.1: preferred, colored; next MAIN 1.40.2.2: preferred, colored
Changes since revision 1.40.2.1: +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.12.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.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +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.40.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 31 11:43:07 2008 UTC (3 years, 6 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_2_BP, RELENG_7_1_BP
Branch point for: RELENG_7_2, RELENG_7_1
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -0 lines
SVN rev 181055 on 2008-07-31 11:43:07Z by kib

MFC r180570:
Pair the VOP_OPEN call from do_execve() with the reciprocal VOP_CLOSE.

Note: the change needed small adaptation to RELENG_7 because fexecve(2)
is not merged into the branch.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Jul 17 16:44:07 2008 UTC (3 years, 6 months ago) by kib
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -0 lines
SVN rev 180570 on 2008-07-17 16:44:07Z by kib

Pair the VOP_OPEN call from do_execve() with the reciprocal VOP_CLOSE.
This was unnoticed because local filesystems usually do nothing
non-trivial in the close vop.

Reported and tested by:	Rick Macklem
MFC after:	2 weeks

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Mar 31 12:05:52 2008 UTC (3 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -0 lines
Implement the fexecve(2) syscall.

Based on the submission by rdivacky,
	sponsored by Google Summer of Code 2007
Reviewed by:	rwatson, rdivacky
Tested by:	pho

Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Aug 15 12:10:57 2006 UTC (5 years, 5 months ago) by netchild
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.39: preferred, colored
Changes since revision 1.39: +1 -0 lines
- Change process_exec function handlers prototype to include struct
  image_params arg.
- Change struct image_params to include struct sysentvec pointer and
  initialize it.
- Change all consumers of process_exit/process_exec eventhandlers to
  new prototypes (includes splitting up into distinct exec/exit functions).
- Add eventhandler to userret.

Sponsored by:		Google SoC 2006
Submitted by:		rdivacky
Parts suggested by:	jhb (on hackers@)

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Feb 6 22:06:54 2006 UTC (6 years ago) by jhb
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +0 -1 lines
- Always call exec_free_args() in kern_execve() instead of doing it in all
  the callers if the exec either succeeds or fails early.
- Move the code to call exit1() if the exec fails after the vmspace is
  gone to the bottom of kern_execve() to cut down on some code duplication.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Feb 25 11:49:42 2005 UTC (6 years, 11 months ago) by sobomax
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3, 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, RELENG_6
Branch point for: RELENG_6_4
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +2 -2 lines
Welcome to the 21st century: increase MAXSHELLCMDLEN from 128 bytes to
PAGE_SIZE.

Unlike originator of the PR suggests retain MAXSHELLCMDLEN definition
(he has been proposing to replace it with PAGE_SIZE everywhere), not only
this reduced the diff significantly, but prevents code obfuscation and also
allows to increase/decrease this parameter easily if needed.

PR:		kern/64196
Submitted by:	Magnus Bäckström <b@etek.chalmers.se>

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Jan 29 23:12:00 2005 UTC (7 years ago) by sobomax
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +17 -10 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.36: download - view: text, markup, annotated - select for diffs
Sat Apr 24 06:44:33 2004 UTC (7 years, 9 months ago) by bde
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.35: preferred, colored
Changes since revision 1.35: +3 -6 lines
Fixed some style bugs (useless forward declarations of structs and
misplaced forward declarations of structs).  This also reduces namespace
pollution (the misplaced declarations were declared in the !_KERNEL case
when they are not used).

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Apr 23 03:01:40 2004 UTC (7 years, 9 months ago) by alc
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -1 lines
Utilize sf_buf_alloc() rather than pmap_qenter() (and sometimes
kmem_alloc_wait()) for mapping the image header.  On all machines with a
direct virtual-to-physical mapping and SMP/HTT i386s, this is a clear win.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Wed Apr 7 04:19:49 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +0 -4 lines
Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Nov 5 17:51:55 2002 UTC (9 years, 3 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2, RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1, RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -0 lines
Bring in two sets of changes:

(1) Permit userland applications to request a change of label atomic
    with an execve() via mac_execve().  This is required for the
    SEBSD port of SELinux/FLASK.  Attempts to invoke this without
    MAC compiled in result in ENOSYS, as with all other MAC system
    calls.  Complexity, if desired, is present in policy modules,
    rather than the framework.

(2) Permit policies to have access to both the label of the vnode
    being executed as well as the interpreter if it's a shell
    script or related UNIX nonsense.  Because we can't hold both
    vnode locks at the same time, cache the interpreter label.
    SEBSD relies on this because it supports secure transitioning
    via shell script executables.  Other policies might want to
    take both labels into account during an integrity or
    confidentiality decision at execve()-time.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Nov 5 01:59:55 2002 UTC (9 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -1 lines
Remove reference to struct execve_args from struct imgact, which
describes an image activation instance.  Instead, make use of the
existing fname structure entry, and introduce two new entries,
userspace_argv, and userspace_envv.  With the addition of
mac_execve(), this divorces the image structure from the specifics
of the execve() system call, removes a redundant pointer, etc.
No semantic change from current behavior, but it means that the
structure doesn't depend on syscalls.master-generated includes.

There seems to be some redundant initialization of imgact entries,
which I have maintained, but which could probably use some cleaning
up at some point.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Sep 21 22:07:17 2002 UTC (9 years, 4 months ago) by jake
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
Use the fields in the sysentvec and in the vm map header in place of the
constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS.
This is mainly so that they can be variable even for the native abi, based
on different machine types.  Get stack protections from the sysentvec too.
This makes it trivial to map the stack non-executable for certain abis, on
machines that support it.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Sep 1 21:41:24 2002 UTC (9 years, 5 months ago) by jake
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +1 -0 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.29: download - view: text, markup, annotated - select for diffs
Thu Aug 29 06:17:48 2002 UTC (9 years, 5 months ago) by jake
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -0 lines
Renamed poorly named setregs to exec_setregs.  Moved its prototype to
imgact.h with the other exec support functions.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Jul 20 02:56:11 2002 UTC (9 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -1 lines
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).

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Jul 6 07:00:01 2002 UTC (9 years, 7 months ago) by jeff
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -0 lines
Clean up execve locking:

 - Grab the vnode object early in exec when we still have the vnode lock.
 - Cache the object in the image_params.
 - Make use of the cached object in imgact_*.c

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Mar 19 20:18:36 2002 UTC (9 years, 10 months ago) by alfred
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -4 lines
Remove __P

Revision 1.22.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 22 01:21:44 2001 UTC (10 years, 1 month ago) by jwd
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8, RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5, RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.22.2.1: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.2.1: +2 -2 lines
MFC of kern/32106

       1.30  src/lib/libc/sys/execve.2
       1.23  src/sys/kern/imgact_shell.c
       1.25  src/sys/sys/imgact.h

  Return a more meaningful errno when the length of the interpreter
  exceeds MAXSHELLCMDLEN to avoid secondary /bin/sh execution.

  Update execve man page to reflect change.

  Increase MAXSHELLCMDLEN to a slightly more meaningful value.

Approved by:	re

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Nov 28 03:26:49 2001 UTC (10 years, 2 months ago) by jwd
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
Return a more meaningful errno when the length of the interpreter
exceeds MAXSHELLCMDLEN to avoid secondary /bin/sh execution.

Update execve man page to reflect change.

Increase MAXSHELLCMDLEN to a slightly more meaningful value.

PR:		kern/32106
Submitted by:	b@etek.chalmers.se
Reviewed by:	bsd
MFC after:	2 weeks

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Sep 26 05:09:15 2000 UTC (11 years, 4 months ago) by takawata
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2, KSE_MILESTONE_2
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -1 lines
Make size of dynamic loader argument variable to support
various executable file format.

Reviewed by:	peter

Revision 1.22.2.1: download - view: text, markup, annotated - select for diffs
Tue May 9 17:41:24 2000 UTC (11 years, 9 months ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4, RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE, RELENG_4_1_0_RELEASE
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +5 -2 lines
    MFC i386/linux/imgact_linux.c 1.36 and friends - fix #! script exec
    under linux emulation to look for script binary in /compat/linux first.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Apr 26 20:58:40 2000 UTC (11 years, 9 months ago) by dillon
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +5 -2 lines
    Fix #! script exec under linux emulation.  If a script is exec'd from a
    program running under linux emulation, the script binary is checked for
    in /compat/linux first.  Without this patch the wrong script binary
    (i.e. the FreeBSD binary) will be run instead of the linux binary.
    For example, #!/bin/sh, thus breaking out of linux compatibility mode.

    This solves a number of problems people have had installing linux
    software on FreeBSD boxes.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Dec 29 04:24:41 1999 UTC (12 years, 1 month ago) by peter
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -2 lines
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers.  "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Nov 16 20:31:56 1999 UTC (12 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -1 lines
Introduce commandline caching in the kernel.

This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.

To disable this facility and revert to previous behaviour:
        sysctl -w kern.ps_arg_cache_limit=0

For full details see the current@FreeBSD.org mail-archives.

Revision 1.9.4.1: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:37:35 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_1_0
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.12.2.2: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:22:23 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.12.2.1: preferred, colored; branchpoint 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12.2.1: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.18.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:32:23 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.18.2.1: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.2.1: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:51:45 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 14 04:55:24 1999 UTC (12 years, 10 months ago) by jdp
Branches: RELENG_3
CVS tags: RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -1 lines
MFC (3 April 1999): Enable BSD/OS binaries to run in configurations
that have a large kernel virtual address space.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:20:03 1999 UTC (12 years, 10 months ago) by jdp
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, PRE_NEWBUS, POST_VFS_BIO_NFS_PATCH, POST_SMP_VMSHARE, POST_NEWBUS
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -1 lines
Restore support for executing BSD/OS binaries on the i386 by passing
the address of the ps_strings structure to the process via %ebx.
For other kinds of binaries, %ebx is still zeroed as before.

Submitted by:	Thomas Stephens <tas@stephens.org>
Reviewed by:	jdp

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Dec 30 10:38:59 1998 UTC (13 years, 1 month ago) by dfr
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_1_0_RELEASE
Branch point for: RELENG_3
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -1 lines
Various changes to support OSF1 emulation:

* Move the user stack from VM_MAXUSER_ADDRESS to a place below the 32bit
  boundary (needed to support 32bit OSF programs).  This should also save
  one pagetable per process.
* Add cvtqlsv to the set of instructions handled by the floating point
  software completion code.
* Disable all floating point exceptions by default.
* A minor change to execve to allow the OSF1 image activator to support
  dynamic loading.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Mar 2 05:47:43 1998 UTC (13 years, 11 months ago) by peter
Branches: MAIN
CVS tags: RELENG_3_0_0_RELEASE, PRE_SOFTUPDATE, PRE_NOBDEV, PRE_DEVFS_SLICE, POST_SOFTUPDATE, POST_DEVFS_SLICE
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -1 lines
Update the ELF image activator to use some of the exec resources rather
than rolling it's own.  This means that it now uses the "safe"
exec_map_first_page() to get the ld.so headers rather than risking a panic
on a page fault failure (eg: NFS server goes down).
Since all the ELF tools go to a lot of trouble to make sure everything
lives in the first page for executables, this is a win.  I have not seen
any ELF executable on any system where all the headers didn't fit in the
first page with lots of room to spare.
I have been running variations of this code for some time on my pure ELF
systems.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Jan 11 21:34:43 1998 UTC (14 years, 1 month ago) by dyson
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -1 lines
Implement the first page access for object type determination more
VM clean.  Also, use vm_map_insert instead of vm_mmap.
Reviewed by:	dg@freebsd.org

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 2 09:57:38 1997 UTC (14 years, 2 months ago) by danny
Branches: RELENG_2_2
CVS tags: RELENG_2_2_8_RELEASE, RELENG_2_2_7_RELEASE, RELENG_2_2_6_RELEASE
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -1 lines
Submitted by:	bde
Merge Bruce's fix for PR bin/5172 from HEAD

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Apr 23 22:02:37 1997 UTC (14 years, 9 months ago) by ache
Branches: MAIN
CVS tags: pre_smp_merge, post_smp_merge, WOLLMAN_MBUF, BP_WOLLMAN_MBUF
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -1 lines
Add argv0 field for imgact structure - for replacing argv0 in shell
image activator
Submitted by:  Tor Egge <Tor.Egge@idi.ntnu.no>

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:45:17 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$.  We are not
ready for it yet.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:54:59 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed May 1 02:43:13 1996 UTC (15 years, 9 months ago) by bde
Branches: MAIN
CVS tags: RELENG_2_2_BP, RELENG_2_2_5_RELEASE, RELENG_2_2_2_RELEASE, RELENG_2_2_1_RELEASE, RELENG_2_2_0_RELEASE
Branch point for: RELENG_2_2
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -7 lines
Removed unnecessary #includes from <sys/imgact.h> so that it is
self-sufficient and added explicit #includes where required.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sun Mar 10 08:42:52 1996 UTC (15 years, 11 months ago) by sos
Branches: MAIN
CVS tags: wollman_polling
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -1 lines
First attempt at FreeBSD & Linux ELF support.

Compile and link a new kernel, that will give native ELF support, and
provide the hooks for other ELF interpreters as well.

To make native ELF binaries use John Polstras elf-kit-1.0.1..
For the time being also use his ld-elf.so.1 and put it in
/usr/libexec.

The Linux emulator has been enhanced to also run ELF binaries, it
is however in its very first incarnation.
Just get some Linux ELF libs (Slackware-3.0) and put them in the
prober place (/compat/linux/...).
I've ben able to run all the Slackware-3.0 binaries I've tried
so far.
(No it won't run quake yet :)

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Nov 6 12:52:37 1995 UTC (16 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -2 lines
All:
   Changed vnodep -> vp for consistency with the rest of the kernel, and
changed iparams -> imgp for brevity.

kern_exec.c:
   Explicitly initialized some additional parts of the image_params struct
to avoid bzeroing it. Rewrote the set-id code to reduce the number of
logical tests. The rewrite exposed a mostly benign bug in the algorithm:
traced set-id images would get ktracing disabled even if the set-id didn't
happen for other reasons.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue May 30 08:14:24 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE, RELENG_2_1_5_RELEASE, RELENG_2_1_0_RELEASE, RELENG_2_1_0_BP, RELENG_2_0_5_RELEASE, RELENG_2_0_5_BP, RELENG_2_0_5
Branch point for: RELENG_2_1_0
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
Remove trailing whitespace.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Oct 2 17:24:45 1994 UTC (17 years, 4 months ago) by phk
Branches: MAIN
CVS tags: RELENG_2_0_5_ALPHA, RELEASE_2_0, OLAH_TTCP, BETA_2_0, ALPHA_2_0
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -1 lines
Prototypes, prototypes and even more prototypes.  Not quite done yet, but
getting closer all the time.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Aug 21 04:41:47 1994 UTC (17 years, 5 months ago) by paul
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -4 lines
Made them all idempotent.
Reviewed by:
Submitted by:

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Aug 19 11:45:29 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -13 lines
Terry Lambert's loadable kernel module support w/improvements from the
NetBSD group.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Aug 18 22:35:43 1994 UTC (17 years, 5 months ago) by wollman
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +7 -1 lines
Fix up some sloppy coding practices:

- Delete redundant declarations.
- Add -Wredundant-declarations to Makefile.i386 so they don't come back.
- Delete sloppy COMMON-style declarations of uninitialized data in
  header files.
- Add a few prototypes.
- Clean up warnings resulting from the above.

NB: ioconf.c will still generate a redundant-declaration warning, which
is unavoidable unless somebody volunteers to make `config' smarter.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Aug 13 03:50:34 1994 UTC (17 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
Change all #includes to follow the current Berkeley style.  Some of these
``changes'' are actually not changes at all, but CVS sometimes has trouble
telling the difference.

This also includes support for second-directory compiles.  This is not
quite complete yet, as `config' doesn't yet do the right thing.  You can
still make it work trivially, however, by doing the following:

rm /sys/compile
mkdir /usr/obj/sys/compile
ln -s M-. /sys/compile
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
ln -s /sys @
rm machine
ln -s @/i386/include machine
make depend
make

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed May 25 09:14:16 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +0 -6 lines
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by:	Rodney W. Grimes
Submitted by:	John Dyson and David Greenman

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Dec 20 19:31:41 1993 UTC (18 years, 1 month ago) by wollman
Branches: MAIN
CVS tags: REL_before_johndavid_2_0_0, MOVED_NEWCVS, GAMMA_1_1, FINAL_1_1, BP_BETA_1_1, BETA_1_1
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +12 -1 lines
Let the linker keep track of pseudo-devices needing initialization and
image activators, rather than listing them inline in the code.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Dec 12 12:31:40 1993 UTC (18 years, 2 months ago) by davidg
Branches: MAIN
1) Added proc file system from Paul Kranenburg with changes from
	John Dyson to make it reliably work under FreeBSD.
2) Added and enabled PROCFS in the GENERICxx and LINT kernels.
3) New execve() from me. Still work to be done here, but this version
	works well and is needed before other changes can be made. For
	a description of the design behind this, see freebsd-arch or
	ask me.
4) Rewrote stack fault code; made user stack VM grow as needed rather
	than all up front; improves performance a little and reduces
	process memory requirements.
5) Incorporated fix from Gene Stark to fault/wire a user page table
	page to fix a problem in copyout. This is a temporary fix and
	is not appropriate for pageable page tables. For a description
	of the problem, see Gene's post to the freebsd-hackers mailing
	list.
6) Tighten up vm_page struct to reduce memory requirements for it. ifdef
	pager page lock code as it's not being used currently.
7) Introduced new element to vmspace struct - vm_minsaddr; initial
	(minimum) stack address. Compliment to vm_maxsaddr.
8) Added a panic if the allocation for process u-pages fails.
9) Improve performance and accuracy of kernel profiling by putting in
	a little inline assembly instead of spl().
10) Made serial console with sio driver work. Still has problems with
	serial input, but is almost useable.
11) Added -Bstatic to SYSTEM_LD in Makefile.i386 so that kernels will
	build properly with the new ld.

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