History log of /netbsd-src/sys/kern/exec_elf.c (Results 1 – 25 of 106)
Revision Date Author Comments
# b5090f27 06-Dec-2024 riastradh <riastradh@NetBSD.org>

sys/kern/kern_exec.c, exec_*.c: Sprinkle SET_ERROR dtrace probes.

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


# f47e8594 06-Dec-2024 riastradh <riastradh@NetBSD.org>

sys/kern/kern_exec.c, exec_*.c: Sort includes.

No functional change intended.


# 21280b65 17-Aug-2023 rin <rin@NetBSD.org>

exec_elf: Sort auxv entries by value of types

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


# bdc740e0 26-Oct-2022 riastradh <riastradh@NetBSD.org>

kern/exec_elf.c: Get emul_netbsd from sys/proc.h.


# b858ac13 08-Jun-2022 rin <rin@NetBSD.org>

Do not warn for ELF note for FDO packaging metadata
(https://systemd.io/COREDUMP_PACKAGE_METADATA/),
found in userland binaries of Fedora 36.


# dd75e6d7 18-May-2021 hannken <hannken@NetBSD.org>

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/

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.

show more ...


# f1ecb271 12-Jan-2020 ad <ad@NetBSD.org>

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.


# 0e8ea4cd 16-Sep-2019 christos <christos@NetBSD.org>

PR/54549: ng0: always initialize execname.


# ae5efbe2 15-Sep-2019 christos <christos@NetBSD.org>

Don't set AT_SUN_EXECNAME if we don't have a fully resolved name.


# f8cd48a3 07-Jun-2019 christos <christos@NetBSD.org>

deduplicate the elf auxv builder code, welcome to 8.99.43


# e9bf2ea4 12-Apr-2018 christos <christos@NetBSD.org>

ignore the ancient NetBSD emulation tag.


# 00cf4274 18-Mar-2018 christos <christos@NetBSD.org>

stsrt with an alignment of 1 (which means no alignment). From alnsn


# 109cfb32 18-Mar-2018 christos <christos@NetBSD.org>

Turn KASSERTS that check alignment which are user triggerable into errors.
From alnsn


# 37456883 17-Mar-2018 christos <christos@NetBSD.org>

CID/1427732: Don't dereference NULL execname if there is no emul_arg.
(there always is one in our emulations) from alnsn@


# 0011aa65 07-Nov-2017 christos <christos@NetBSD.org>

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

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?

show more ...


# bb321f61 16-Oct-2017 christos <christos@NetBSD.org>

Setting AT_BASE on static binaries breaks TLS because they assume that
it is 0, will fix it differently.


# 3df3b581 08-Oct-2017 christos <christos@NetBSD.org>

For static PIE set the interpreter address to be the entry offset so we
don't lose it.


# 34e270cb 21-Apr-2017 kamil <kamil@NetBSD.org>

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-d

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.

show more ...


# 006dc29c 18-Feb-2017 chs <chs@NetBSD.org>

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).


# 11594012 12-Feb-2017 uwe <uwe@NetBSD.org>

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 o

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.

show more ...


# cbcfdd13 15-Sep-2016 christos <christos@NetBSD.org>

oops removed too much


# 406ea0ab 15-Sep-2016 christos <christos@NetBSD.org>

Add debugging.


# cd1c56e8 25-May-2016 christos <christos@NetBSD.org>

randomize the location of the rtld.


# b039ee77 22-May-2016 christos <christos@NetBSD.org>

reduce #ifdef mess caused by PaX


# 6b2e8a53 08-May-2016 christos <christos@NetBSD.org>

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.


12345