History log of /netbsd-src/sys/kern/exec_script.c (Results 1 – 25 of 85)
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.


# e8311a17 03-May-2021 fcambus <fcambus@NetBSD.org>

Remove duplicate #ifdef block.


# 293d113e 23-Mar-2020 pgoyette <pgoyette@NetBSD.org>

Fix typo in comment.


# 32f28da6 23-Mar-2020 ad <ad@NetBSD.org>

LK_SHARED is OK for VOP_ACCESS().


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

adjust for new check_exec signature.


# d91f98a8 27-Jan-2019 pgoyette <pgoyette@NetBSD.org>

Merge the [pgoyette-compat] branch


# d1579b2d 03-Sep-2018 riastradh <riastradh@NetBSD.org>

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a n

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)

show more ...


# 873631e7 30-Jun-2018 kre <kre@NetBSD.org>

Fix module build.

Options SUIDSCRIPTS and FDSCRIPTS will be off for the module.
If one (or both) should be enabled, add it to CPPFLAGSin the module Makefile.


# f3e9eebe 30-Jun-2018 christos <christos@NetBSD.org>

defflag {SETUID,FD}SCRIPTS


# 860a01d9 27-Apr-2018 christos <christos@NetBSD.org>

Canonicalize the interpreter path in #! scripts since check_exec() expects
an absolute path, and we KASSERT if that's not the case later.


# 45b1ec74 05-Sep-2014 matt <matt@NetBSD.org>

Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.


# 1d2bb559 30-Jun-2014 maxv <maxv@NetBSD.org>

Reorder two variables and fix some comments.


# 8bd04c63 30-Jun-2014 maxv <maxv@NetBSD.org>

If the interpreter is "", do not keep loading the script (which will later
fail), but return ENOEXEC directly.

ok christos@


# 5fa25b57 23-Jun-2014 maxv <maxv@NetBSD.org>

Use KASSERT() instead of #ifdef(DIAGNOSTIC). Clearer.


# 54b7adb1 07-Mar-2014 christos <christos@NetBSD.org>

c99 initializers for struct execsw


# 0ff90255 21-Feb-2014 maxv <maxv@NetBSD.org>

Revert rev1.38. The header already begins with EXEC_SCRIPT_MAGIC="#!".
So it can't be ELFMAG="\177ELF" at the same time.

ok christos@


# 113995d2 17-Feb-2014 maxv <maxv@NetBSD.org>

Cosmetic; just replace whitespaces by tabs


# 721e82b5 19-Sep-2013 christos <christos@NetBSD.org>

exec modules need to be of the exec kind


# 8f6ed30d 19-Nov-2010 dholland <dholland@NetBSD.org>

Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string an

Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.

show more ...


# 1423e65b 24-Jun-2010 hannken <hannken@NetBSD.org>

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.


# 54f6c52b 02-May-2010 dholland <dholland@NetBSD.org>

Remove the nameidata from struct exec_package. It was used only for two
things: passing an argument to check_exec, which is better done explicitly,
and handing back the resolved pathname generated by

Remove the nameidata from struct exec_package. It was used only for two
things: passing an argument to check_exec, which is better done explicitly,
and handing back the resolved pathname generated by namei, which we can
make an explicit slot for in struct exec_package instead. While here,
perform some related tidyup, and store the kernel-side copy of the path
to the executable as well as the pointer into userspace. (But the latter
should probably be removed in the future.)

show more ...


# 92ce8c6a 19-Nov-2008 ad <ad@NetBSD.org>

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

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

show more ...


# a9ca7a37 21-Mar-2008 ad <ad@NetBSD.org>

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.


# 22d57011 02-Jan-2008 yamt <yamt@NetBSD.org>

use kmem_alloc instead of malloc.


1234