The NetBSD Project

CVS log for src/sys/kern/exec_elf.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.104.2.1: download - view: text, markup, annotated - select for diffs
Sun Nov 15 13:59:49 2026 UTC (21 hours, 6 minutes ago) by martin
Branches: netbsd-10
Diff to: previous 1.104: preferred, colored; next MAIN 1.105: preferred, colored
Changes since revision 1.104: +7 -5 lines
Pull up following revision(s) (requested by riastradh in ticket #1418):

	sys/kern/exec_elf.c: revision 1.108
	sys/kern/exec_elf.c: revision 1.109
	sys/sys/exec_elf.h: revision 1.187
	sys/sys/exec_elf.h: revision 1.188

exec_elf: Ignore freedesktop.org dlopen ELF notes.

PR kern/60901: Unknown elf note type 1081871370
exec_elf: Nix diagnostic messages for all (unknown) fd.o notes.

Same as for unknown GNU notes.  Shaves off a tiny bit of code in
non-DIAGNOSTIC builds, saves us some trouble when fd.o invariably
adds more metadata not relevant to execution semantics.

PR kern/60901: Unknown elf note type 1081871370

Revision 1.107.2.1: download - view: text, markup, annotated - select for diffs
Sun Nov 15 13:58:26 2026 UTC (21 hours, 8 minutes ago) by martin
Branches: netbsd-11
Diff to: previous 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107: +7 -5 lines
Pull up following revision(s) (requested by riastradh in ticket #575):

	sys/kern/exec_elf.c: revision 1.108
	sys/kern/exec_elf.c: revision 1.109
	sys/sys/exec_elf.h: revision 1.187
	sys/sys/exec_elf.h: revision 1.188

exec_elf: Ignore freedesktop.org dlopen ELF notes.

PR kern/60901: Unknown elf note type 1081871370
exec_elf: Nix diagnostic messages for all (unknown) fd.o notes.

Same as for unknown GNU notes.  Shaves off a tiny bit of code in
non-DIAGNOSTIC builds, saves us some trouble when fd.o invariably
adds more metadata not relevant to execution semantics.

PR kern/60901: Unknown elf note type 1081871370

Revision 1.105.6.2: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:27:47 2026 UTC (11 days, 11 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.105.6.1: preferred, colored; branchpoint 1.105: preferred, colored; next MAIN 1.106: preferred, colored
Changes since revision 1.105.6.1: +7 -5 lines
Sync with HEAD

Revision 1.109: download - view: text, markup, annotated - select for diffs
Mon Oct 19 18:44:20 2026 UTC (3 weeks, 6 days ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +7 -6 lines
exec_elf: Nix diagnostic messages for all (unknown) fd.o notes.

Same as for unknown GNU notes.  Shaves off a tiny bit of code in
non-DIAGNOSTIC builds, saves us some trouble when fd.o invariably
adds more metadata not relevant to execution semantics.

PR kern/60901: Unknown elf note type 1081871370

Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Oct 18 18:51:08 2026 UTC (4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +3 -2 lines
exec_elf: Ignore freedesktop.org dlopen ELF notes.

PR kern/60901: Unknown elf note type 1081871370

Revision 1.105.6.1: download - view: text, markup, annotated - select for diffs
Sat Aug 2 05:57:40 2025 UTC (15 months, 2 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +34 -31 lines
Sync with HEAD

Revision 1.107: download - view: text, markup, annotated - select for diffs
Fri Dec 6 16:19:41 2024 UTC (23 months, 1 week ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20250801, netbsd-11-base, netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1
Branch point for: netbsd-11
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +22 -21 lines
sys/kern/kern_exec.c, exec_*.c: Sprinkle SET_ERROR dtrace probes.

PR kern/58378: Kernel error code origination lacks dtrace probes

Revision 1.106: download - view: text, markup, annotated - select for diffs
Fri Dec 6 16:18:41 2024 UTC (23 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +14 -12 lines
sys/kern/kern_exec.c, exec_*.c: Sort includes.

No functional change intended.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Thu Aug 17 06:58:26 2023 UTC (3 years, 3 months ago) by rin
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base
Branch point for: perseant-exfatfs
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +6 -6 lines
exec_elf: Sort auxv entries by value of types

No significant changes intended.
Just for slightly nicer output for gdb "info auxv".

Revision 1.104: download - view: text, markup, annotated - select for diffs
Wed Oct 26 23:20:36 2022 UTC (4 years ago) by riastradh
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -4 lines
kern/exec_elf.c: Get emul_netbsd from sys/proc.h.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Wed Jun 8 10:12:42 2022 UTC (4 years, 5 months ago) by rin
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +5 -2 lines
Do not warn for ELF note for FDO packaging metadata
(https://systemd.io/COREDUMP_PACKAGE_METADATA/),
found in userland binaries of Fedora 36.

Revision 1.101.10.1: download - view: text, markup, annotated - select for diffs
Thu Jun 17 04:46:33 2021 UTC (5 years, 5 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +3 -9 lines
Sync w/ HEAD.

Revision 1.101.12.1: download - view: text, markup, annotated - select for diffs
Mon May 31 22:15:20 2021 UTC (5 years, 5 months ago) by cjep
Branches: cjep_staticlib_x
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +3 -9 lines
sync with head

Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue May 18 08:59:44 2021 UTC (5 years, 6 months ago) by hannken
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +3 -9 lines
Remove a superfluous VOP_GETATTR() from elf_load_interp() and replace
the LK_EXCLUSIVE lock with a LK_SHARED lock.

The attributes requested were not used since Rev 1.25 of exec_elf32.c
from 1997/05/08 when mycroft GCd the va_mode check.

Revision 1.97.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:03 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.97.2.2: preferred, colored; branchpoint 1.97: preferred, colored; next MAIN 1.98: preferred, colored
Changes since revision 1.97.2.2: +8 -6 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.97.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:51 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.97.2.1: preferred, colored; branchpoint 1.97: preferred, colored
Changes since revision 1.97.2.1: +50 -28 lines
Merge changes from current as of 20200406

Revision 1.100.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:35 2020 UTC (6 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +50 -28 lines
Sync with head.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun Jan 12 18:30:58 2020 UTC (6 years, 10 months ago) by ad
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_staticlib_x-base, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1
Branch point for: thorpej-i2c-spi-conf, cjep_staticlib_x
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +50 -28 lines
Tidy up the vnode locking around execve() on ELF images to acquire and
release the locks fewer times.  Proposed on tech-kern a very long time go.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Mon Sep 16 11:11:34 2019 UTC (7 years, 2 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20191119, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -4 lines
PR/54549: ng0: always initialize execname.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Sun Sep 15 20:20:26 2019 UTC (7 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +9 -6 lines
Don't set AT_SUN_EXECNAME if we don't have a fully resolved name.

Revision 1.97.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:03 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +21 -11 lines
Sync with HEAD

Revision 1.98: download - view: text, markup, annotated - select for diffs
Fri Jun 7 23:35:52 2019 UTC (7 years, 5 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-5-RELEASE, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +21 -11 lines
deduplicate the elf auxv builder code, welcome to 8.99.43

Revision 1.93.2.4: download - view: text, markup, annotated - select for diffs
Mon Apr 16 02:00:07 2018 UTC (8 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.93.2.3: preferred, colored; branchpoint 1.93: preferred, colored; next MAIN 1.94: preferred, colored
Changes since revision 1.93.2.3: +6 -2 lines
Sync with HEAD, resolve some conflicts

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Apr 12 20:49:08 2018 UTC (8 years, 7 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +6 -2 lines
ignore the ancient NetBSD emulation tag.

Revision 1.93.2.3: download - view: text, markup, annotated - select for diffs
Thu Mar 22 01:44:50 2018 UTC (8 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.93.2.2: preferred, colored; branchpoint 1.93: preferred, colored
Changes since revision 1.93.2.2: +40 -21 lines
Synch with HEAD, resolve conflicts

Revision 1.90.4.1: download - view: text, markup, annotated - select for diffs
Tue Mar 20 09:10:57 2018 UTC (8 years, 7 months ago) by bouyer
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90: +28 -14 lines
Pull up following revision(s) (requested by alnsn in ticket #644):
	sys/kern/exec_elf.c: revision 1.95
	sys/kern/exec_elf.c: revision 1.96
Turn KASSERTS that check alignment which are user triggerable into errors.
=46rom alnsn
stsrt with an alignment of 1 (which means no alignment). From alnsn

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun Mar 18 13:18:39 2018 UTC (8 years, 8 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -3 lines
stsrt with an alignment of 1 (which means no alignment). From alnsn

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Mar 18 02:16:21 2018 UTC (8 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +27 -13 lines
Turn KASSERTS that check alignment which are user triggerable into errors.
From alnsn

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sat Mar 17 00:30:50 2018 UTC (8 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +14 -9 lines
CID/1427732: Don't dereference NULL execname if there is no emul_arg.
(there always is one in our emulations) from alnsn@

Revision 1.93.2.2: download - view: text, markup, annotated - select for diffs
Wed Mar 7 09:33:26 2018 UTC (8 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.93.2.1: preferred, colored; branchpoint 1.93: preferred, colored
Changes since revision 1.93.2.1: +2 -76 lines
Move the emul_find_root() and emul_find_interp() to a new file
subr_emul.c

The previous location was in exec_elf.c but that can get built
multiple times for a single kernel, so we could end up with
duplicate symbols.

Thanks to ,rg@ for the heads-up.

Revision 1.93.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 6 10:37:41 2018 UTC (8 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +76 -2 lines
Move necessary routines out of compat_util.c and into exec_elf.c

Once again, compat_util.c is only for modules, so move it back into
compat/common/files.common and out of kern/files.kern

Revision 1.43.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:44 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.43.2.2: preferred, colored; branchpoint 1.43: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43.2.2: +249 -226 lines
update from HEAD

Revision 1.93: download - view: text, markup, annotated - select for diffs
Tue Nov 7 19:44:04 2017 UTC (9 years ago) by christos
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +11 -16 lines
Store full executable path in p->p_path as discussed in tech-kern.
This means that the full executable path is always available.

- exec_elf.c: use p->path to set AT_SUN_EXECNAME, and since this is
  always set, do so unconditionally.
- kern_exec.c: simplify pathexec, use kmem_strfree where appropriate
  and set p->p_path
- kern_exit.c: free p->p_path
- kern_fork.c: set p->p_path for the child.
- kern_proc.c: use p->p_path to return the executable pathname; the
  NULL check for p->p_path, should be a KASSERT?
- exec.h: gc ep_path, it is not used anymore
- param.h: bump version, 'struct proc' size change

TODO:
1. reference count the path string, to save copy at fork and free
   just before exec?
2. canonicalize the pathname by changing namei() to LOCKPARENT
   vnode and then using getcwd() on the parent directory?

Revision 1.92: download - view: text, markup, annotated - select for diffs
Mon Oct 16 01:50:55 2017 UTC (9 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +4 -4 lines
Setting AT_BASE on static binaries breaks TLS because they assume that
it is 0, will fix it differently.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Oct 8 15:00:40 2017 UTC (9 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +7 -6 lines
For static PIE set the interpreter address to be the entry offset so we
don't lose it.

Revision 1.70.2.8: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:07 2017 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70.2.7: preferred, colored; branchpoint 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70.2.7: +179 -158 lines
Sync with HEAD

Revision 1.37.2.3: download - view: text, markup, annotated - select for diffs
Fri Jul 14 06:18:25 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-6
Diff to: previous 1.37.2.2: preferred, colored; branchpoint 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.2.2: +114 -70 lines
Pull up following revision(s) (requested by uwe in ticket #1438):
	sys/kern/exec_elf.c: revision 1.88 via patch
netbsd_elf_signature - look at note segments (phdrs) not note
sections.  They point to the same data in the file, but sections are
for linkers and are not necessarily present in an executable.
The original switch from phdrs to shdrs seems to be just a cop-out to
avoid parsing multiple notes per segment, which doesn't really avoid
the problem b/c sections also can contain multiple notes.

Revision 1.85.2.3: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:26 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.85.2.2: preferred, colored; branchpoint 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85.2.2: +6 -4 lines
Sync with HEAD

Revision 1.87.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:02 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.87: preferred, colored; next MAIN 1.88: preferred, colored
Changes since revision 1.87: +179 -158 lines
Sync with HEAD

Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Apr 21 13:17:42 2017 UTC (9 years, 6 months ago) by kamil
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +6 -4 lines
Enhance verbosity of debug message for ELF magic mismatch

Print e_ident[EI_MAG3] (it was missed)
Print e_ident[EI_CLASS] as it is used do determine correct ELF magic.

No functional change for non-debug (without option DEBUG_ELF) build.

Revision 1.85.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:47 2017 UTC (9 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.85.2.1: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.1: +175 -156 lines
Sync with HEAD

Revision 1.69.2.5: download - view: text, markup, annotated - select for diffs
Sat Mar 18 05:22:18 2017 UTC (9 years, 8 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.69.2.4: preferred, colored; branchpoint 1.69: preferred, colored; next MAIN 1.70: preferred, colored
Changes since revision 1.69.2.4: +164 -147 lines
Pull up following revision(s) (requested by uwe in ticket #1368):
	sys/kern/exec_elf.c: revision 1.88 via patch
netbsd_elf_signature - look at note segments (phdrs) not note
sections.  They point to the same data in the file, but sections are
for linkers and are not necessarily present in an executable.
The original switch from phdrs to shdrs seems to be just a cop-out to
avoid parsing multiple notes per segment, which doesn't really avoid
the problem b/c sections also can contain multiple notes.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Sat Feb 18 01:29:09 2017 UTC (9 years, 8 months ago) by chs
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +5 -3 lines
obey the executable's ELF alignment constraints for PIE.
this fixes gdb of PIE binaries on mac68k (and other platforms
which use an ELF alignment that is larger than PAGE_SIZE).

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sun Feb 12 21:52:46 2017 UTC (9 years, 9 months ago) by uwe
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +172 -155 lines
netbsd_elf_signature - look at note segments (phdrs) not note
sections.  They point to the same data in the file, but sections are
for linkers and are not necessarily present in an executable.

The original switch from phdrs to shdrs seems to be just a cop-out to
avoid parsing multiple notes per segment, which doesn't really avoid
the problem b/c sections also can contain multiple notes.

Revision 1.85.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:17 2016 UTC (10 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +42 -9 lines
Sync with HEAD

Revision 1.70.2.7: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:02 2016 UTC (10 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70.2.6: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.6: +42 -9 lines
Sync with HEAD

Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Sep 15 18:40:34 2016 UTC (10 years, 2 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +3 -2 lines
oops removed too much

Revision 1.86: download - view: text, markup, annotated - select for diffs
Thu Sep 15 17:45:44 2016 UTC (10 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +41 -9 lines
Add debugging.

Revision 1.70.2.6: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:37 2016 UTC (10 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70.2.5: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.5: +5 -33 lines
Sync with HEAD

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed May 25 17:25:32 2016 UTC (10 years, 5 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +4 -2 lines
randomize the location of the rtld.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun May 22 14:26:09 2016 UTC (10 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +2 -9 lines
reduce #ifdef mess caused by PaX

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun May 8 01:28:09 2016 UTC (10 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +6 -29 lines
Move all the randomization inside kern_pax.c so we can control it directly.
Add debugging flags to be able to set the random number externally.

Revision 1.70.2.5: download - view: text, markup, annotated - select for diffs
Fri Apr 22 15:44:16 2016 UTC (10 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70.2.4: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.4: +8 -7 lines
Sync with HEAD

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sat Mar 19 18:56:37 2016 UTC (10 years, 8 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +8 -7 lines
Allow enabling and disabling PaX ASLR debug

Revision 1.69.2.4: download - view: text, markup, annotated - select for diffs
Tue Jan 26 01:18:37 2016 UTC (10 years, 9 months ago) by riz
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Diff to: previous 1.69.2.3: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.3: +35 -9 lines
Apply patch (requested by martin in ticket #1062):

sys/kern/exec_elf.c			patch

	Restore binary compatibility on sparc64 for old binaries.
	[martin, ticket #1062]

Revision 1.70.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:04 2015 UTC (10 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70.2.3: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.3: +43 -25 lines
Sync with HEAD (as of 26th Dec)

Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Nov 26 13:15:34 2015 UTC (10 years, 11 months ago) by martin
Branches: MAIN
CVS tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +10 -10 lines
We never exec(2) with a kernel vmspace, so do not test for that, but instead
KASSERT() that we don't.
When calculating the load address for the interpreter (e.g. ld.elf_so),
we need to take into account wether the exec'd process will run with
topdown memory or bottom up. We can not use the current vmspace's flags
to test for that, as this happens too early. Luckily the execpack already
knows what the new state will be later, so instead of testing the current
vmspace, pass the info as additional argument to struct emul
e_vm_default_addr.
Fix all such functions and adopt all callers.

Revision 1.69.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 8 00:57:09 2015 UTC (11 years ago) by riz
Branches: netbsd-7
Diff to: previous 1.69.2.2: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.2: +14 -4 lines
Pull up following revision(s) (requested by christos in ticket #1019):
	sys/kern/exec_elf.c: revision 1.79
	sys/sys/exec_elf.h: revision 1.150
	sys/sys/exec_elf.h: revision 1.151
	sys/kern/exec_elf.c: revision 1.80
Ignore the ancient 01.01 tag that gnuc used to put in old NetBSD binaries.
Add buildid Go note

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sun Nov 1 17:44:41 2015 UTC (11 years ago) by christos
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +11 -4 lines
Ignore the ancient 01.01 tag that gnuc used to put in old NetBSD binaries.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Nov 1 15:21:42 2015 UTC (11 years ago) by christos
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -2 lines
Add buildid Go note

Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu Oct 22 11:38:51 2015 UTC (11 years ago) by maxv
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +11 -5 lines
Check the error code from es_setup_stack, and correctly free ep_emul_arg if
it fails.

That bug is harmless, since ep_setup_stack never fails.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Sep 26 16:12:24 2015 UTC (11 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +14 -12 lines
Revamp the way processes are PaX'ed in the kernel. Sent on tech-kern@ two
months ago, but no one reviewed it - probably because it's not a trivial
change.

This change fixes the following bug: when loading a PaX'ed binary, the
kernel updates the PaX flag of the calling process before it makes sure
the new process is actually launched. If the kernel fails to launch the
new process, it does not restore the PaX flag of the calling process,
leaving it in an inconsistent state.

Actually, simply restoring it would be horrible as well, since in the
meantime another thread may have used the flag.

The solution is therefore: modify all the functions used by PaX so that
they take as argument the exec package instead of the lwp, and set the PaX
flag in the process *right before* launching the new process - it cannot
fail in the meantime.

Revision 1.70.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:07 2015 UTC (11 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70.2.2: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.2: +5 -8 lines
Sync with HEAD

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sat Aug 8 06:24:40 2015 UTC (11 years, 3 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20150921
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -9 lines
revert; but still fix the comment

Revision 1.75: download - view: text, markup, annotated - select for diffs
Wed Aug 5 15:58:01 2015 UTC (11 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +9 -6 lines
stupid comment, and make sure we are not executing a lib

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Aug 4 18:28:09 2015 UTC (11 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3 lines
Some changes, to reduce a bit my tech-kern@ patch:
 - move the P_PAX_ flags out of #ifdef PAX_ASLR in pax.h
 - add a generic pax_flags_active() function
 - fix a comment in exec_elf.c; interp is not static
 - KNF for return
 - rename pax_aslr() to pax_aslr_mmap()
 - rename pax_segvguard_cb() to pax_segvguard_cleanup_cb()

Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Jul 30 15:28:18 2015 UTC (11 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3 lines
Revamp PaX:
 - don't confuse between ELF flags and proc flags. Introduce the proc-
   specific P_PAX_ASLR, P_PAX_MPROTECT and P_PAX_GUARD flags.
 - introduce pax_setup_elf_flags(), which takes as argument the PaX flag
   of the ELF PaX note section, and which sets the proc flag as
   appropriate. Also introduce a couple of other functions used for that
   purpose.
 - modify pax_aslr_active(), and all the other similar pieces of code, so
   that it checks the proc flag directly, without extra ELF computation

In addition to making PaX clearer, the combination of these changes fixes
the following bug: if a non-PaX'ed process is launched, and then someone
sets security.pax.{aslr,mprotect,segvguard}.global=1, the process becomes
PaX'ed while its address space hasn't been randomized, which is not likely
to be a good idea.

Now, only the proc flag is checked at runtime, which means the process's
PaX status won't be altered during the execution.

Also:
 - declare PAX_DPRINTF, makes it more readable
 - fix a typo in exec_elf.h

Revision 1.70.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:21 2015 UTC (11 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70.2.1: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.1: +3 -13 lines
Sync with HEAD

Revision 1.72: download - view: text, markup, annotated - select for diffs
Mon Apr 27 09:19:58 2015 UTC (11 years, 6 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +2 -12 lines
Remove #ifdef notyet.

Revision 1.70.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:20 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +4 -2 lines
Sync with HEAD

Revision 1.69.2.2: download - view: text, markup, annotated - select for diffs
Sun Mar 29 09:07:55 2015 UTC (11 years, 7 months ago) by martin
Branches: netbsd-7
CVS tags: netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Diff to: previous 1.69.2.1: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.1: +4 -2 lines
Pull up following revision(s) (requested by maxv in ticket #650):
	sys/compat/netbsd32/netbsd32_exec_elf32.c: revision 1.39
	sys/kern/exec_elf.c: revision 1.71
	sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.18
	sys/compat/linux/common/linux_exec_elf32.c: revision 1.92
	sys/compat/svr4_32/svr4_32_exec_elf32.c: revision 1.24
Zero-fill the ELF auxiliary vectors. Otherwise, on 64bit systems, the
padding between a_v and a_type contains kernel garbage, therefore
exposed to userland.
Original report by uebayasi@

Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri Mar 20 20:36:28 2015 UTC (11 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +4 -2 lines
Zero-fill the ELF auxiliary vectors. Otherwise, on 64bit systems, the
padding between a_v and a_type contains kernel garbage, therefore
exposed to userland.

Original report by uebayasi@

Revision 1.43.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:28 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.43.2.1: preferred, colored; branchpoint 1.43: preferred, colored
Changes since revision 1.43.2.1: +209 -138 lines
Rebase to HEAD as of a few days ago.

Revision 1.69.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 18 07:37:04 2014 UTC (12 years, 3 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +9 -16 lines
Pull up following revision(s) (requested by chs in ticket #32):
	sys/kern/exec_elf.c: revision 1.70
eliminate COMPAT_OLDNOTE and just always recognize the old notes.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Aug 17 23:03:58 2014 UTC (12 years, 3 months ago) by chs
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +9 -16 lines
eliminate COMPAT_OLDNOTE and just always recognize the old notes.

Revision 1.65.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:55:58 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65: +48 -23 lines
Rebase.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Jul 8 17:16:25 2014 UTC (12 years, 4 months ago) by maxv
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +7 -14 lines
Define ELF_MAXNOTESIZE, ELF_MAXSHNUM and ELF_MAXPHNUM in <sys/exec_elf.h>, so
that it can be used externally.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Jul 6 07:41:41 2014 UTC (12 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -3 lines
Check .evs_used==0 instead of .evs_cmds==NULL. evs_cmds would not be NULL if
another _makecmds() had allocated and deallocated VMCMDs (not the case
currently).

Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed Jun 25 17:10:39 2014 UTC (12 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +16 -2 lines
Provide a compatibility define for binaries generated before NetBSD 1.5.
These binaries contain multiple notes per section and their NetBSD version
value is 199905. This is enabled via COMPAT_OLDNOTE (default off).

Revision 1.32.2.4: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:02 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.32.2.3: preferred, colored; branchpoint 1.32: preferred, colored; next MAIN 1.33: preferred, colored
Changes since revision 1.32.2.3: +173 -129 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.45.4.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:07 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.45.4.1: preferred, colored; branchpoint 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45.4.1: +188 -124 lines
sync with head

Revision 1.66: download - view: text, markup, annotated - select for diffs
Thu May 15 19:37:22 2014 UTC (12 years, 6 months ago) by christos
Branches: MAIN
CVS tags: rmind-smpnet-nbase, rmind-smpnet-base
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +28 -10 lines
be a bit more verbose about why we think a note is bad.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Mar 22 07:27:21 2014 UTC (12 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +19 -27 lines
Small changes:
 - rename elf_load_file() to elf_load_interp()
 - use the correct type for 'nused'
 - remove useless cases
 - reorder a kmem_alloc

ok christos@

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Mar 16 07:57:25 2014 UTC (12 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: riastradh-drm2-base3
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +13 -14 lines
Remove the 'prot' argument from elf_load_psection(). It is not used
outside, and can be declared locally. Clearer.

ok christos@

Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Mar 6 09:30:37 2014 UTC (12 years, 8 months ago) by matt
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -2 lines
add ep_entryoffset to exec_package so one can calculate the relocabase
of an ET_DYN image.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Feb 27 09:58:05 2014 UTC (12 years, 8 months ago) by maxv
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +18 -12 lines
We have to ensure the string is NUL-terminated and of the expected
length to avoid copying uninitialized data.

ok christos@

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sat Feb 22 07:53:16 2014 UTC (12 years, 8 months ago) by maxv
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +32 -43 lines
Simplify error path.

ok christos@

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Feb 21 07:47:02 2014 UTC (12 years, 8 months ago) by maxv
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +22 -9 lines
Properly check the section size to avoid out-of-bound reads. The
computed size must be the exact same size that is indicated in
sh_size.

ok agc@ christos@

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Feb 19 15:23:20 2014 UTC (12 years, 8 months ago) by maxv
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +19 -4 lines
We need VMCMDs for a binary and its interpreter, so make sure we have
at least one VMCMD. This also prevents the kernel from using an
uninitialized pointer as entry point for the execution.

From me and Christos

ok christos@

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sun Feb 16 17:46:36 2014 UTC (12 years, 9 months ago) by maxv
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +31 -37 lines
Small cleanup:
 - make elf_load_file() and elf_load_psection() static
 - make loops consistent
 - 'nload' is not used - see rev1.24
 - 'ap' is not used in elf_load_file()

ok agc@ christos@

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Feb 15 17:39:03 2014 UTC (12 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +3 -3 lines
initialize offset to 0 (Maxime Villard)

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Feb 15 16:17:01 2014 UTC (12 years, 9 months ago) by maxv
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +15 -16 lines
Remove the last argument of elf_check_header(). It is easier - and faster - to
check the e_type field in the calling function. Other BSD's already do this.

ok christos@

Revision 1.37.2.1.4.1: download - view: text, markup, annotated - select for diffs
Fri Feb 14 23:21:28 2014 UTC (12 years, 9 months ago) by bouyer
Branches: netbsd-6-0
CVS tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE
Diff to: previous 1.37.2.1: preferred, colored; next MAIN 1.37.2.2: preferred, colored
Changes since revision 1.37.2.1: +3 -2 lines
Pull up following revision(s) (requested by maxv in ticket #1028):
	sys/kern/exec_elf.c: revision 1.55
Fix memory leak.
ok christos@ agc@

Revision 1.37.2.1.6.1: download - view: text, markup, annotated - select for diffs
Fri Feb 14 23:21:25 2014 UTC (12 years, 9 months ago) by bouyer
Branches: netbsd-6-1
CVS tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE
Diff to: previous 1.37.2.1: preferred, colored; next MAIN 1.37.2.2: preferred, colored
Changes since revision 1.37.2.1: +3 -2 lines
Pull up following revision(s) (requested by maxv in ticket #1028):
	sys/kern/exec_elf.c: revision 1.55
Fix memory leak.
ok christos@ agc@

Revision 1.37.2.2: download - view: text, markup, annotated - select for diffs
Fri Feb 14 23:21:20 2014 UTC (12 years, 9 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.37.2.1: preferred, colored; branchpoint 1.37: preferred, colored
Changes since revision 1.37.2.1: +3 -2 lines
Pull up following revision(s) (requested by maxv in ticket #1028):
	sys/kern/exec_elf.c: revision 1.55
Fix memory leak.
ok christos@ agc@

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Feb 14 07:30:07 2014 UTC (12 years, 9 months ago) by maxv
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -2 lines
Fix memory leak.

ok christos@ agc@

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Jan 25 19:44:11 2014 UTC (12 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
__USING_TOPDOWN_VM is no more, __USE_TOPDOWN_VM...

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Dec 21 17:44:33 2013 UTC (12 years, 10 months ago) by skrll
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +5 -5 lines
Check interp after reading it. Checking newly allocated memory doesn't
work.

Hi Christos.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Dec 21 14:41:02 2013 UTC (12 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +8 -4 lines
Consistency checks for the length of the interpreter (the length includes
the trailing NUL): make sure it is not empty and has the proper length.
From Maxime Villard

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Nov 14 12:07:11 2013 UTC (13 years ago) by martin
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +6 -5 lines
As discussed on tech-kern: make TOPDOWN-VM runtime selectable per process
(offer MD code or emulations to override it).

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Nov 11 15:22:11 2013 UTC (13 years ago) by martin
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -7 lines
Remove dead code

Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue Nov 5 14:26:19 2013 UTC (13 years ago) by martin
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +17 -2 lines
Define a new NetBSD specific note to encode the code model used for a binary.
Allow MD code to check these notes in the exec path.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Oct 30 23:32:30 2013 UTC (13 years ago) by joerg
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -2 lines
Preserve NetBSD version from the ABI tag for compat use.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Sep 10 21:30:21 2013 UTC (13 years, 2 months ago) by matt
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +20 -2 lines
Support an optional MARCH ELF tag.
Store the MACHINE_ARCH of the executable in mdproc and override sysctl
so that value returned.

Revision 1.45.4.1: download - view: text, markup, annotated - select for diffs
Wed Aug 28 23:59:35 2013 UTC (13 years, 2 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +6 -6 lines
sync with head

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Aug 26 12:24:10 2013 UTC (13 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +6 -6 lines
Fix a comment and a few minor optimizations:

 * elf_check_header() already ensures eh.e_phnum > MAXPHNUM, so do not
   test it again at the call site
 * is_dyn == true implies a successfull call to elf_check_header(eh, ET_DYN),
   so no need to call elf_check_header(eh, ET_EXEC)

From Maxime Villard.

Revision 1.43.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:57 2013 UTC (13 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -5 lines
resync from head

Revision 1.45: download - view: text, markup, annotated - select for diffs
Tue Apr 9 07:39:01 2013 UTC (13 years, 7 months ago) by skrll
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -3 lines
Fix PAX build.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Apr 8 21:12:33 2013 UTC (13 years, 7 months ago) by skrll
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -4 lines
Remove some set but unused variables

Revision 1.32.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:26 2012 UTC (14 years ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.32.2.2: preferred, colored; branchpoint 1.32: preferred, colored
Changes since revision 1.32.2.2: +9 -9 lines
sync with head

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sun Aug 5 01:43:58 2012 UTC (14 years, 3 months ago) by matt
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -19 lines
back out elf note changes and use EF_ARM_ABIVERS to determine EABI usage.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Aug 3 07:54:14 2012 UTC (14 years, 3 months ago) by matt
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +19 -2 lines
Add a elf note to describe the ARM ABI in use.  If encounters on arm,
set EXEC_ARM_AAPCS bit in exec_package's ep_flags.
XXX kind of gross but it there's isn't a MD hook for notes so ...

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Jun 2 18:32:27 2012 UTC (14 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -2 lines
put back missing break;

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Jun 2 16:48:13 2012 UTC (14 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +8 -9 lines
the gnu tag name is valid for both type 1 (abi) and type 3 (build id)

Revision 1.33.2.3: download - view: text, markup, annotated - select for diffs
Sat Jun 2 11:09:32 2012 UTC (14 years, 5 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.33.2.2: preferred, colored; branchpoint 1.33: preferred, colored; next MAIN 1.34: preferred, colored
Changes since revision 1.33.2.2: +41 -28 lines
sync to latest -current.

Revision 1.32.2.2: download - view: text, markup, annotated - select for diffs
Wed May 23 10:08:10 2012 UTC (14 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.32.2.1: preferred, colored; branchpoint 1.32: preferred, colored
Changes since revision 1.32.2.1: +41 -28 lines
sync with head.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue May 22 02:40:05 2012 UTC (14 years, 5 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +41 -28 lines
- Recognize the SuSE ABI note.
- Restructure the code to do the checking in the appropriate note type,
and harmonize all the checks to be positive.
- Print only the tag data being careful not to overrun the allocated buffer.

Revision 1.33.2.2: download - view: text, markup, annotated - select for diffs
Sun Apr 29 23:05:03 2012 UTC (14 years, 6 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.33.2.1: preferred, colored; branchpoint 1.33: preferred, colored
Changes since revision 1.33.2.1: +4 -3 lines
sync to latest -current.

Revision 1.32.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:22 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +39 -11 lines
sync with head

Revision 1.37.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 12 17:05:36 2012 UTC (14 years, 7 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -3 lines
Pull up following revision(s) (requested by martin in ticket #175):
	sys/kern/kern_exit.c: revision 1.238
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.4
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.5
	sys/uvm/uvm_extern.h: revision 1.183
	lib/libc/gen/posix_spawn_fileactions.c: revision 1.2
	sys/kern/kern_exec.c: revision 1.348
	sys/kern/kern_exec.c: revision 1.349
	sys/compat/netbsd32/syscalls.master: revision 1.95
	sys/uvm/uvm_glue.c: revision 1.159
	sys/uvm/uvm_map.c: revision 1.317
	sys/compat/netbsd32/netbsd32.h: revision 1.95
	sys/kern/exec_elf.c: revision 1.38
	sys/sys/spawn.h: revision 1.2
	sys/sys/exec.h: revision 1.135
	sys/compat/netbsd32/netbsd32_execve.c: revision 1.34
Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat
Fix asynchronous posix_spawn child exit status (and test for it).

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Apr 8 11:27:44 2012 UTC (14 years, 7 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base4, jmcneill-usbmp-base9
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -3 lines
Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat

Revision 1.33.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:26 2012 UTC (14 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +36 -10 lines
merge to -current.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Feb 11 23:16:16 2012 UTC (14 years, 9 months ago) by martin
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +14 -3 lines
Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Feb 4 18:12:02 2012 UTC (14 years, 9 months ago) by joerg
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +9 -3 lines
Add AuxInfo record with the base address of the main thread.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Feb 3 20:11:54 2012 UTC (14 years, 9 months ago) by matt
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +16 -6 lines
Add a hook for freeing an ep_emul_arg.  Add a wrapper routine
(exec_free_emul_arg) to call the hook and then clear the ep_emul_arg
and ep_emul_arg_free members in the exec_package.
Change users/accessors to use these routines.
Approved by releng.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Wed Feb 1 21:49:52 2012 UTC (14 years, 9 months ago) by matt
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +5 -6 lines
Use kmem instead of malloc.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Nov 19 22:51:25 2011 UTC (15 years ago) by tls
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +4 -3 lines
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Aug 27 17:53:21 2011 UTC (15 years, 2 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -2 lines
In execve1(), don't assume VM_MIN_ADDRESS is 0 for PIE executables.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Aug 2 16:44:01 2011 UTC (15 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -2 lines
Add SuSE note

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Jul 19 19:45:36 2011 UTC (15 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +9 -2 lines
don't produce diagnostics for GNU tags

Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:25 2011 UTC (15 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27: +6 -2 lines
Sync with HEAD.

Revision 1.13.2.4: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:42:06 2011 UTC (15 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.13.2.3: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.2.3: +1 -0 lines
sync with head

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Mar 7 05:09:12 2011 UTC (15 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -2 lines
Pass down ELF Auxillary Vectors for static NetBSD binaries too.
Rename __libc_init to _libc_init and call it explicitly from CSU code.
This enforces the constructor run order for newly linked programs.
Keep it as constructor with run-once semantic for binary compatibility.
Implement dl_iterate_phdr for statically linked programs.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

Revision 1.13.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:12 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.13.2.2: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.2.2: +36 -30 lines
sync with head

Revision 1.27.4.1: download - view: text, markup, annotated - select for diffs
Thu Feb 17 12:00:43 2011 UTC (15 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27: +5 -2 lines
Sync with HEAD

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Feb 15 11:43:53 2011 UTC (15 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: bouyer-quota2-nbase, bouyer-quota2-base
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +5 -2 lines
augment comment

Revision 1.12.2.3: download - view: text, markup, annotated - select for diffs
Fri Oct 22 07:22:24 2010 UTC (16 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.12.2.2: preferred, colored; branchpoint 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12.2.2: +31 -28 lines
Sync with HEAD (-D20101022).

Revision 1.9.82.4: download - view: text, markup, annotated - select for diffs
Sat Oct 9 03:32:30 2010 UTC (16 years, 1 month ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.9.82.3: preferred, colored; branchpoint 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9.82.3: +33 -30 lines
sync with head

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Oct 7 02:14:02 2010 UTC (16 years, 1 month ago) by chs
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
when we use a fake data section, make sure that the start is page-aligned.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Sep 11 20:49:28 2010 UTC (16 years, 2 months ago) by chs
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +19 -13 lines
always supply an auxiliary vector for linux ELF processes.
static executables (such as newer versions of /sbin/ldconfig)
require this to work properly.  since static executables
also don't have a PT_PHDR entry, use the same heuristic as
linux does to provide a value for AT_PHDR in this case.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Sep 7 21:32:03 2010 UTC (16 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -8 lines
Remember the end of the last text segment and set up a fake data segment
if size 0 and starting after the text segments, if no data segment was
found. Unbreaks sbrk on platforms where all loaded segments are
executable (PR 43817). The cast of executable segments after data
segments is left out for now.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Aug 20 14:59:53 2010 UTC (16 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +18 -19 lines
Allow ELF objects with more than two PT_LOAD sections. Go creates such
binaries by default with separate sections for executable, writeable
data and constants. Use the same heuristic as FreeBSD to match up the
text and data segment assumptions.

Revision 1.12.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:47:24 2010 UTC (16 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.12.2.1: preferred, colored; branchpoint 1.12: preferred, colored
Changes since revision 1.12.2.1: +4 -4 lines
Sync with HEAD.

Revision 1.9.82.3: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:37 2010 UTC (16 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.9.82.2: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.82.2: +85 -82 lines
sync with head.

Revision 1.13.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:52 2010 UTC (16 years, 4 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.13.2.1: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.2.1: +5 -5 lines
sync with head

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Jun 24 13:03:11 2010 UTC (16 years, 4 months ago) by hannken
Branches: MAIN
CVS tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -4 lines
Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Jun 6 06:20:16 2010 UTC (16 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -3 lines
Improve previous: there were two printfs and I'd only noticed and fixed
one of them. PR 43217.

Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:56 2010 UTC (16 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +83 -80 lines
sync with head

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun May 2 06:35:21 2010 UTC (16 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
Don't printf a userspace pointer; print the copied-in kernel version
instead, now that it's readily available. Fixes PR 43217.

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:08 2010 UTC (16 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +81 -66 lines
Sync with HEAD.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Apr 2 14:11:18 2010 UTC (16 years, 7 months ago) by christos
Branches: MAIN
CVS tags: uebayasi-xip-base1
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +5 -4 lines
fix debugging printf.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Mar 22 22:10:10 2010 UTC (16 years, 7 months ago) by drochner
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +10 -16 lines
When choosing the start address of a dynamic (ie relocatable) executable,
respect the alignment in the ELF phdr.
Also, for correctness, use the maximum alignment of the PT_LOAD
sections rather than just the first one found.
Also, use more meaningful types.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Mar 20 01:52:16 2010 UTC (16 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +6 -6 lines
more debugging compilation fixes.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Mar 20 01:47:12 2010 UTC (16 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -3 lines
fix debugging code.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Mar 20 01:45:30 2010 UTC (16 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +12 -30 lines
minimize ifdefs and avoid duplicated code.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Mar 19 22:08:13 2010 UTC (16 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +74 -50 lines
- Make maximum memory limits for various things #define constants and use the
  consistently across the code.
- Re-do note parsing code to read the section headers instead of the program
  headers because the new binutils merge all the note sections in one program
  header. This fixes all the pax note parsing which has been broken for all
  binaries built with the new binutils.
- Add diagnostics to the note parsing code to detect malformed binaries.
- Allocate and free note scratch space only once, not once per note.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Mar 15 20:35:20 2010 UTC (16 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -5 lines
rename DEBUG_ASLR -> PAX_ASLR_DEBUG

Revision 1.9.82.2: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:15 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.9.82.1: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.82.1: +19 -4 lines
sync with head

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Feb 22 19:46:18 2010 UTC (16 years, 8 months ago) by drochner
Branches: MAIN
CVS tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +15 -3 lines
Run binaries with ELF_TYPE==DYN at virtual address PAGE_SIZE rather
than 0. This is still not the intent of PIE, but it allows them to
run with VA 0 disabled.
(The PAX_ASLR stuff which should deal with this needs work.)
CV: ----------------------------------------------------------------------

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Dec 14 00:48:35 2009 UTC (16 years, 11 months ago) by matt
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +6 -3 lines
Merge from matt-nb5-mips64

Revision 1.9.82.1: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:46 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +649 -338 lines
sync with head.

Revision 1.11.2.2: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:19:37 2009 UTC (17 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.11.2.1: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.2.1: +916 -0 lines
Sync with HEAD.

Revision 1.9.78.1: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:18 2009 UTC (17 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +649 -338 lines
Sync with HEAD.

Revision 1.11.2.1
Wed Dec 17 20:51:35 2008 UTC (17 years, 11 months ago) by skrll
Branches: nick-hppapmap
FILE REMOVED
Changes since revision 1.11: +0 -916 lines
file exec_elf.c was added on branch nick-hppapmap on 2009-01-19 13:19:37 +0000

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Dec 17 20:51:35 2008 UTC (17 years, 11 months ago) by cegger
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Branch point for: nick-hppapmap
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -4 lines
kill MALLOC and FREE macros.

Revision 1.9.86.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:07 2008 UTC (17 years, 11 months ago) by haad
Branches: haad-dm
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +649 -338 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Nov 19 18:36:06 2008 UTC (18 years ago) by ad
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +649 -338 lines
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime

Revision 1.6.4.2: download - view: text, markup, annotated - select for diffs
Wed Dec 11 05:32:43 1996 UTC (29 years, 11 months ago) by mycroft
Branches: netbsd-1-2
CVS tags: netbsd-1-2-PATCH001
Diff to: previous 1.6.4.1: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.4.1: +20 -7 lines
From trunk:
Change the exec locking protocol to fix a deadlock.

Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Thu Dec 5 06:41:12 1996 UTC (29 years, 11 months ago) by rat
Branches: netbsd-1-2
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +7 -3 lines
Patch request from frank@fwi.uva.nl (Frank van der Linden)

>Fixes a problem with Linux ELF binaries which contain only one loadable
>section.  The code expected 2 loadable sections (text and data), and if it
>did not get those totally wrong values for the data address and size were
>used.

Revision 1.9
Fri Sep 20 22:33:23 1996 UTC (30 years, 2 months ago) by cgd
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, yamt-lazymbuf, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, yamt-idlelwp-base8, yamt-idlelwp, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, vmlocking-base, vmlocking, thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej_scsipi, thorpej-vnode-attr-base, thorpej-vnode-attr, thorpej-signal-base, thorpej-signal, thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base, thorpej-devvp, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, post-newlock2-merge, newlock2-nbase, newlock2-base, newlock2, newlock-base, newlock, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, nathanw_sa_before_merge, nathanw_sa_base, mjf-ufs-trans-base, mjf-devfs-base, mjf-devfs, matt-nb5-pq3-base, matt-nb5-pq3, marc-pcmcia-base, ktrace-lwp-base, ktrace-lwp, kqueue-base, kqueue, kent-audio2-base, kent-audio2, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jmcneill-pm-base, jmcneill-pm, jmcneill-base, ifpoll-base, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, haad-dm-base1, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, gdamore-uart-base, gdamore-uart, fvdl-softdep-base, elad-kernelauth-nbase, eeh-devprop-base, eeh-devprop, cube-autoconf-base, cube-autoconf, chs-ubc2-newbase, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64, ad-socklock-base1, ad-audiomp-base, ad-audiomp
Branch point for: yamt-nfs-mp, mjf-devfs2, haad-dm
FILE REMOVED
Changes since revision 1.8: +1 -1 lines
rename exec_elf.c to exec_elf32.c, since it execs 32-bit ELF.  exec_elf32.c
was copied from exec_elf.c on the CVS server to keep the logs intact.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jun 14 18:15:55 1996 UTC (30 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +72 -6 lines
Merge pagedvn changes from OpenBSD and added mips defines. Also added
ELF_MAP_PAGE_ZERO define. The entry point computation is different than
the one OpenBSD uses.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Jun 13 18:35:25 1996 UTC (30 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +8 -10 lines
- Pass the Elf exec header in the emulation dependent probe functions.
- remove static from elf_read_from().

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Feb 9 18:59:18 1996 UTC (30 years, 9 months ago) by christos
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +7 -2 lines
More proto fixes

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Feb 9 13:25:54 1996 UTC (30 years, 9 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +9 -1 lines
Use a default, 'safe' address to map the loader to in case the an emulation-
specific probe function did not specify it. It picks the same address
as mmap() does for a non-fixed map at address 0. See also the comment
around a similar line of code in vm/vm_mmap.c.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jan 16 23:07:18 1996 UTC (30 years, 10 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +40 -93 lines
* Don't rely on the protection bits of segments anymore to decide whether
  it's text or data; use the entry point instead (this solves some trouble
  with ELF executables with strange permissions)
* Incorporate some fixes from r_friedl@informatik.uni-kl.de sent to
  netbsd-bugs a while ago

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Sep 16 00:28:08 1995 UTC (31 years, 2 months ago) by thorpej
Branches: MAIN
CVS tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -6 lines
s/memcmp/bcmp/

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Jun 30 02:57:20 1995 UTC (31 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -2 lines
Remove unused define

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 21:29:53 1995 UTC (31 years, 5 months ago) by fvdl
Branches: MAIN
Generic mi ELF loader; delete Linux and Svr4 compat conf entries and
add generic ELF entry to exec_conf.c

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

CVSweb <webmaster@jp.NetBSD.org>