aboutsummaryrefslogtreecommitdiffstats
path: root/exec (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-08-14Bump Emacs version to 30.2.50Eli Zaretskii1-1/+1
* README: * configure.ac: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * nt/README.W32: * msdos/sed2v2.inp: Bump Emacs version to 30.2.50. * etc/NEWS: Add headers for Emacs 30.2.
2025-08-14Bump Emacs versionEli Zaretskii1-1/+1
* README: * configure.ac: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * nt/README.W32: * msdos/sed2v2.inp: Bump Emacs version to 30.2.
2025-05-18; Bump Emacs version to 30.1.90Eli Zaretskii1-1/+1
* README: * configure.ac: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * nt/README.W32: * msdos/sed2v2.inp: Bump Emacs version to 30.1.90.
2025-04-15; * exec/loader-mips64el.s (skip_environ): Eliminate one more `daddi'.Po Lu1-1/+2
2025-04-15Unconditionally define MIPS_NABI on mips64elPo Lu1-1/+2
* exec/configure.ac (MIPS_NABI): Always define to 1 on mips64el-*-linux*.
2025-04-15* exec/loader-mips64el.s (rest_of_exec): Deal with assembler bugs.Po Lu1-2/+4
2025-04-15* exec/configure.ac (exec_CHECK_MIPS_NABI): Test __LP64__ also.Po Lu1-2/+2
2025-04-15Port recent Android changes to mips64elPo Lu6-115/+253
* exec/config-mips.m4.in (DADDI2, DADDI3): Disable at-clobbering by assembler macros expressly. * exec/loader-mips64el.s: Adapt from loader-mipsel.s. * exec/configure.ac (exec_cv_as_daddi): Properly escape reg names. * exec/exec.c (struct exec_jump_command, exec_0): Don't define or set `fpu_mode' if __LP64__. * exec/exec.h (struct exec_tracee): New field `callno'. * exec/trace.c (process_system_call): Always record the current system call number in TRACEE lest it should be required once it has been overwritten upon the syscall's completion. (seccomp_system_call): Likewise. (after_fork): Clear `tracee->callno'.
2025-04-15Address typos in MIPS executable loaderPo Lu1-6/+5
* exec/loader-mipsel.s (rest_of_exec): Delete redundant nop. (skip_environ): Correct stack space test. Don't jump into the label for the sp preserving case's delay slot.
2025-04-14Port recent changes to mipsel systemsPo Lu5-101/+224
* exec/exec.c (exec_0): Don't disable AT_EXECFN substitution on MIPS systems. * exec/loader-aarch64.s (skip_environ): Correct typo in commentary. * exec/loader-mips64el.s: Add a disclaimer that this file is currently inoperable. * exec/loader-mipsel.s (__start): Move environment and argument vectors and produce and replace AT_EXECFN. Clear stack before proceeding to circumvent an oversight in glibc.
2025-04-14Fix typos in executable loadersPo Lu2-3/+3
* exec/loader-aarch64.s (skip_environ, cleanup): Minor thinkos. * exec/loader-x86_64.s (skip_environ): Insert missing label.
2025-04-13Fix file descriptor leaks on arm AndroidPo Lu2-2/+2
* exec/loader-aarch64.s (_start): * exec/loader-armeabi.s (_start): Fix thinko. Do not merge to master.
2025-04-13Replace AT_EXECFN in auxiliary vectors of programs executed on AndroidPo Lu6-325/+636
* exec/exec.c (insert_args, exec_0): On non-MIPS systems, copy NAME and its length to the loader area. State that MIPS support is not yet available (though it will be pending the availability of a functioning emulator). * exec/loader-aarch64.s (_start): * exec/loader-armeabi.s (_start): * exec/loader-x86.s (_start): * exec/loader-x86_64.s (_start): Displace auxv, environ, and argv to create sufficient space for the provided file name, and copy the file name there. Replace AT_EXECFN to refer to this space.
2025-02-23Bump Emacs version to 30.1.50Stefan Kangas1-1/+1
* README: * configure.ac: * etc/NEWS: * exec/configure.ac: * msdos/sed2v2.inp: * nt/README.W32: Bump Emacs version to 30.1.50.
2025-02-20Bump Emacs version to 30.1Stefan Kangas1-1/+1
* README: * configure.ac: * exec/configure.ac: * msdos/sed2v2.inp: * nt/README.W32: Bump Emacs version to 30.1.
2025-02-09Fix program execution on Android 15 QPR2 BetaPo Lu1-14/+44
* exec/trace.c (process_vm_readv, process_vm_writev): New function pointers. Attempt to load them on recent Android systems when `exec' was not linked with a sufficiently up-to-date libc. (read_memory, user_copy): Always use process_vm_readv and process_vm_writev if available. (handle_openat): Write trailing NULL byte of filename to user buffer. (exec_init): Attempt to dlsym process_vm_readv and process_vm_writev.
2025-01-03; * exec/configure.ac (config-mips.m4): Fix typo.Po Lu1-1/+1
2025-01-02Fix copyright years by handStefan Kangas1-1/+1
These are dates that admin/update-copyright did not update.
2025-01-02Update copyright year to 2025Stefan Kangas18-18/+18
Run "TZ=UTC0 admin/update-copyright".
2025-01-02Fix volatile Android buildPo Lu1-1/+1
* exec/Makefile.in (config-mips.m4): Call config.status in builddir.
2025-01-01Fix copyright years by handPaul Eggert1-1/+1
These are dates that admin/update-copyright did not update.
2025-01-01Update copyright year to 2025Paul Eggert18-18/+18
Run "TZ=UTC0 admin/update-copyright".
2024-12-19* Bump Emacs version to 30.0.93Andrea Corallo1-1/+1
* nt/README.W32: Update Emacs version. * msdos/sed2v2.inp: Likewise. * exec/configure.ac: Likewise. * configure.ac: Likewise. * README: Likewise.
2024-11-21; Fix typosStefan Kangas1-1/+1
2024-10-26Bump Emacs version to 30.0.92Andrea Corallo1-1/+1
* nt/README.W32: Update Emacs version. * msdos/sed2v2.inp: Likewise. * exec/configure.ac: Likewise. * configure.ac: Likewise. * README: Likewise.
2024-09-17Fix some #! misparsing in check_interpreterPaul Eggert1-5/+5
* exec/exec.c: Do not include ctype.h, as the kernel does not care about the locale. (check_interpreter): Treat only spaces and tabs as white space. Do not inspect more bytes than were read. Although the resulting code does not exactly match what the Android kernel does, it’s closer than what it was before.
2024-09-11Bump Emacs version to 30.0.91emacs-30.0.91Andrea Corallo1-1/+1
* nt/README.W32: Update Emacs version. * msdos/sed2v2.inp: Likewise. * exec/configure.ac: Likewise. * configure.ac: Likewise. * README: Likewise.
2024-09-11; * exec/configure.ac: Update version.Po Lu1-1/+1
2024-09-11; Update version number of exec/configure.acPo Lu1-1/+1
* admin/admin.el (set-version): Update AC_INIT expansion in exec/configure.ac. * exec/configure.ac: Update version to 30.0.90.
2024-07-02Port seccomp acceleration to Linux 3.5.0Po Lu3-26/+98
* etc/NEWS: Update correspondingly. * exec/Makefile.in (config-mips.m4): Don't define rule or predicate $(LOADOBJS) on it elsewhere than on MIPS. * exec/README: Direct developers to GDB. * exec/trace.c (finish_exec): Resume the tracee after reporting an error in `exec'. (after_fork): If seccomp is enabled on Android, and the kernel is 4.7 or earlier, detect whether revisions to the sequencing of seccomp events have been backported from 4.8. (exec_waitpid): Resume the process with PTRACE_CONT after receiving an unknown signal. (exec_init): Cease disabling seccomp on Android kernels earlier than 4.8.
2024-07-01* exec/exec.c (exec_0): Restore erroneously deleted statement.Po Lu1-0/+3
2024-07-01; * exec/trace.c (seccomp_system_call): Typo in commentary.Po Lu1-2/+2
2024-07-01Optimize process execution on AndroidPo Lu6-219/+666
* exec/configure.ac (REENTRANT): Remove option for reentrancy. (PROGRAM_COUNTER, HAVE_SECCOMP): Define register providing the program counter and enable seccomp if its headers are available. * exec/exec.c (write_load_command): Avoid defining unused variable. (exec_0): Remove code specific to REENTRANT configurations. * exec/exec.h (struct exec_tracee) <exec_data, data_size>: New fields for loader instructions and their size. * exec/exec1.c (main): Call exec_init before forking. * exec/mipsel-user.h (ELF_NGREG): Delete definition. (struct mipsel_regs): Reduce number of gregs to 32, but introduce separate fields for special registers. * exec/trace.c (use_seccomp_p): New variable; defile to false if !HAVE_SECCOMP. (remove_tracee): Cease providing for non-reentrant configurations. Release executable data if present. (handle_clone_prepare): Likewise. Resume process with PTRACE_CONT if seccomp-based interception is enabled. (handle_clone, check_signal): Resume processes as above. (handle_exec): Divide into two functions, with only rewriting the system call and generating instructions for the loader remaining in the first, and copying such instructions into the loader's stack removed into a new function, `finish_exec'. (finish_exec): New function. (handle_readlinkat, handle_openat): Abolish non-REENTRANT configurations. (process_system_call): Divide exec system calls into two phases, disambiguated by the value of tracee->waiting_for_syscall. Typo fixes. Accommodate syscall-exit-stops where the signal was initially intercepted by `seccomp_system_call'. (interesting_syscalls): New array. (ARRAYELTS): New macro. (seccomp_system_call, establish_seccomp_filter): New function. (tracing_execve) [HAVE_SECCOMP]: Establish a seccomp filter if this is to be enabled. (after_fork): Provide PTRACE_O_TRACESECCOMP. Resume process with PTRACE_CONT if seccomp-based interception is enabled. (exec_waitpid): Resume process with PTRACE_CONT if seccomp-based interception is enabled. Dispatch stops identifying as PTRACE_EVENT_SECCOMP to `seccomp_system_call'. (exec_init): Establish whether it is possible to enable seccomp.
2024-06-27Disable preprocessing of assembler files with m4 on non-MIPS systemsPo Lu4-205/+211
* exec/Makefile.in (is_mips): New substitution. (.s.o): Avoid calling m4 unless it be set. * exec/configure.ac: Substitute is_mips, and don't generate config-mips.m4 otherwise. * exec/loader-x86.s: * exec/loader-x86_64.s: Use assembler rather than m4-defined comment syntax.
2024-03-14* exec/trace.c (rpl_stpcpy): Replace stpcpy if absent.Po Lu1-0/+30
2024-03-14Improve /proc/self/exe substitution on AndroidPo Lu4-11/+121
* exec/configure.ac (USER_SWORD): New macro. * exec/exec.c (format_pid): Export this function. * exec/exec.h: * exec/trace.c (canon_path): New function. (handle_readlinkat, handle_openat): Test complete file name against /proc/self/exe, and further check for /proc/pid/exe.
2024-01-29* exec/configure.ac (OPENAT_SYSCALL): Define on MIPS.Po Lu1-0/+4
2024-01-27Intercept calls to `openat' under AndroidPo Lu3-2/+150
* exec/configure.ac (OPEN_SYSCALL, OPENAT_SYSCALL): Define new macros. * exec/exec.h (struct exec_tracee): New field `sp'. * exec/trace.c (handle_openat): New function. (process_system_call): If handle_openat executes successfully, save the unmodified stack pointer within the tracee structure to be restored once the system call completes.
2024-01-21; * exec/Makefile.in: Correct typo.Po Lu1-1/+1
2024-01-21; * exec/Makefile.in (extraclean): Remove standard files.Po Lu1-2/+5
2024-01-20Fix autogen.sh’s spurious ‘git diff’ outputPaul Eggert3-4222/+0
Problem reported by Gerd Möllmann (Bug#68464). * .gitignore: Ignore files in exec that are now copied from build-aux. * admin/merge-gnulib (avoided_flags): Instead of clearing autom4te.cache here ... * autogen.sh (do_git): ... clear it here. Use config.guess, config.sub and install-sh from the Emacs repository, as they are more likely to be up to date. This avoids unnecessary differences among different builders, and avoids unnecessary ‘git diff’ output after autogen.sh. Also, copy these files from build-aux to exec since there should be no difference between the two copies. * exec/config.guess, exec/config.sub, exec/install-sh: Remove from repository, as autogen.sh now copies them from build-aux.
2024-01-02; Update copyright years in more filesPo Lu1-1/+1
2024-01-02; Add 2024 to copyright yearsPo Lu20-20/+20
2023-12-10; Use ?c instead of integer in local variablesStefan Kangas3-3/+3
* exec/loader-armeabi.s (timespec): * exec/loader-mips64el.s (__start): * exec/loader-mipsel.s (__start): Use ?c instead of integer in local variables.
2023-12-10; Fix typosStefan Kangas2-2/+2
2023-11-26; Update Autoconf auxiliaries in execPo Lu2-27/+50
* exec/config.guess: * exec/config.sub: Update configury files.
2023-09-18Correct build on systems without PAGE_MASKPo Lu1-1/+1
* exec/exec.c (write_load_command) <PAGE_MASK, PAGE_SIZE>: Uniformly define even if !HAVE_GETPAGESIZE.
2023-09-18Correct crash in child processes under armeabi AndroidPo Lu1-8/+14
* exec/trace.c (process_system_call) <READLINKAT_SYSCALL>: Examine tracee->waiting_for_syscall and avoid rewriting user arguments if a system call is presently being executed by the kernel. Reported by Romário Rios <romariorios@protonmail.com>.
2023-08-12Avoid stpncpyPaul Eggert2-74/+7
It’s not worth the porting hassle, and as the glibc manual says, “this function is generally a poor choice for processing strings”. * admin/merge-gnulib (GNULIB_MODULES): Remove stpncpy. * exec/configure.ac: Do not check for stpncpy. * exec/exec.c (rpl_stpncpy, stpncpy): Remove this replacement. (exec_0): Properly clear buffer1. Use memcpy instead of stpncpy to add the trailing name. This code is clearly still suboptimal but efficiency is not that important here and I tried to minimize the change. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2023-08-07Stop tracking exec/config.h.inPo Lu1-358/+0
* .gitignore: Add exec/config.h.in. * exec/config.h.in: Remove from Git.