Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libc



Module Name:    src
Committed By:   kamil
Date:           Tue Feb  7 19:29:40 UTC 2017

Modified Files:
        src/lib/libc/gen: Makefile.inc
        src/lib/libc/sys: Makefile.inc
Added Files:
        src/lib/libc/gen: exect.c
Removed Files:
        src/lib/libc/arch/aarch64/sys: exect.S
        src/lib/libc/arch/alpha/sys: exect.S
        src/lib/libc/arch/arm/sys: exect.S
        src/lib/libc/arch/hppa/sys: exect.S
        src/lib/libc/arch/i386/sys: exect.S
        src/lib/libc/arch/ia64/sys: exect.S
        src/lib/libc/arch/m68k/sys: exect.S
        src/lib/libc/arch/mips/sys: exect.S
        src/lib/libc/arch/or1k/sys: exect.S
        src/lib/libc/arch/powerpc/sys: exect.S
        src/lib/libc/arch/powerpc64/sys: exect.S
        src/lib/libc/arch/riscv/sys: exect.S
        src/lib/libc/arch/sh3/sys: exect.S
        src/lib/libc/arch/sparc/sys: exect.S
        src/lib/libc/arch/sparc64/sys: exect.S
        src/lib/libc/arch/vax/sys: exect.S
        src/lib/libc/arch/x86_64/sys: exect.S
        src/lib/libc/sys: Lint_exect.c

Log Message:
Mark exect(3) obsolete and bind it to plain execve(2) on all platforms

The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
 - exect(2) traces (single-steps) libc and it requires hundreds or
   thousands steps before entering a new image
 - it's vax and x86 specific code
 - this functionality has been moved to the kernel - once a process is
   traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
   its debugger
 - the side effects and unportability make this interface unusable
 - there are no known users of this interface
 - it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/aarch64/sys/exect.S
cvs rdiff -u -r1.3 -r0 src/lib/libc/arch/alpha/sys/exect.S
cvs rdiff -u -r1.4 -r0 src/lib/libc/arch/arm/sys/exect.S
cvs rdiff -u -r1.2 -r0 src/lib/libc/arch/hppa/sys/exect.S
cvs rdiff -u -r1.15 -r0 src/lib/libc/arch/i386/sys/exect.S
cvs rdiff -u -r1.2 -r0 src/lib/libc/arch/ia64/sys/exect.S
cvs rdiff -u -r1.8 -r0 src/lib/libc/arch/m68k/sys/exect.S
cvs rdiff -u -r1.10 -r0 src/lib/libc/arch/mips/sys/exect.S
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/or1k/sys/exect.S
cvs rdiff -u -r1.3 -r0 src/lib/libc/arch/powerpc/sys/exect.S
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/powerpc64/sys/exect.S
cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/riscv/sys/exect.S
cvs rdiff -u -r1.5 -r0 src/lib/libc/arch/sh3/sys/exect.S
cvs rdiff -u -r1.3 -r0 src/lib/libc/arch/sparc/sys/exect.S
cvs rdiff -u -r1.2 -r0 src/lib/libc/arch/sparc64/sys/exect.S
cvs rdiff -u -r1.6 -r0 src/lib/libc/arch/vax/sys/exect.S
cvs rdiff -u -r1.4 -r0 src/lib/libc/arch/x86_64/sys/exect.S
cvs rdiff -u -r1.197 -r1.198 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/exect.c
cvs rdiff -u -r1.2 -r0 src/lib/libc/sys/Lint_exect.c
cvs rdiff -u -r1.231 -r1.232 src/lib/libc/sys/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index