summaryrefslogtreecommitdiff
path: root/exec
AgeCommit message (Collapse)Author
2026-05-28Fix the Android build againPo Lu
* exec/trace.c (ARRAYELTS, establish_seccomp_filter): Restore ARRAYELTS, since Gnulib is not available in the exec library.
2026-05-26ARRAYELTS → countofPaul Eggert
C2y will standardize countof as the macro that Emacs uses the name ARRAYELTS for. Switch to the standard name, which is supported by GCC 16+, by Clang 21, and by the Gnulib stdcountof-h module already in use for compilers that do not support countof. Also, use countof in a few places where we missed using ARRAYELTS. * admin/coccinelle/arrayelts.cocci: Suggest countof, not ARRAYELTS. * admin/merge-gnulib (GNULIB_MODULES): Add stdcountof-h, as it is now a direct rather than an indirect dependency. * exec/trace.c, src/lisp.h, src/sfnt.c: Include <stdcountof.h>. (ARRAYELTS): Remove. All uses replaced by countof. * lib-src/ebrowse.c, lib-src/etags.c, lib-src/make-docfile.c: * lib-src/seccomp-filter.c, lwlib/lwlib-Xaw.c: Prefer <stdcountof.h> and countof to doing things by hand.
2026-05-25Revert "Don’t silently truncate file names in exec.c"Po Lu
This reverts commit 3461b450c5eae3ed53192aa9514e0b1ac1b1c8f2. Gnulib and intprops.h are not available from within the exec helper.
2026-05-23Don’t silently truncate file names in exec.cPaul Eggert
* exec/exec.c (format_pid): Simplify. No need for a local array. (exec_0): Shrink local buffer. If names are too long, fail instead of silently truncating them. Be cautious in case symlink is zero length (shouldn’t be possible in Android, but it’s easy to be safe).
2026-05-07Bump master Emacs version to 32.0.50Sean Whitton
* README: * configure.ac: * etc/refcards/ru-refcard.tex: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * msdos/sed2v2.inp: * nt/README.W32: Bump Emacs version to 32.0.50. * etc/NEWS: Empty for Emacs 32. * lisp/cus-edit.el (customize-changed-options-previous-release): Set last version to 31.1. * src/emacs-module.in.h (struct emacs_env_32): Add. * src/module-env-31.h: Remove header comment. * src/module-env-32.h: New file.
2026-01-01; Add 2026 to copyright years.Sean Whitton
2025-04-15; * exec/loader-mips64el.s (skip_environ): Eliminate one more `daddi'.Po Lu
2025-04-15Unconditionally define MIPS_NABI on mips64elPo Lu
* 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 Lu
2025-04-15* exec/configure.ac (exec_CHECK_MIPS_NABI): Test __LP64__ also.Po Lu
2025-04-15Port recent Android changes to mips64elPo Lu
* 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 Lu
* 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 Lu
* 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 Lu
* exec/loader-aarch64.s (skip_environ, cleanup): Minor thinkos. * exec/loader-x86_64.s (skip_environ): Insert missing label.
2025-04-13Replace AT_EXECFN in auxiliary vectors of programs executed on AndroidPo Lu
* 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-09Merge from savannah/emacs-30Po Lu
563efd6838c Fix program execution on Android 15 QPR2 Beta
2025-02-09Fix program execution on Android 15 QPR2 BetaPo Lu
* 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 Lu
2025-01-02Fix copyright years by handStefan Kangas
These are dates that admin/update-copyright did not update.
2025-01-02Update copyright year to 2025Stefan Kangas
Run "TZ=UTC0 admin/update-copyright".
2025-01-02Fix volatile Android buildPo Lu
* exec/Makefile.in (config-mips.m4): Call config.status in builddir.
2025-01-01Fix copyright years by handPaul Eggert
These are dates that admin/update-copyright did not update.
2025-01-01Update copyright year to 2025Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2024-12-19* Bump Emacs version to 30.0.93Andrea Corallo
* nt/README.W32: Update Emacs version. * msdos/sed2v2.inp: Likewise. * exec/configure.ac: Likewise. * configure.ac: Likewise. * README: Likewise.
2024-11-21; Fix typosStefan Kangas
2024-10-26Bump Emacs version to 30.0.92Andrea Corallo
* 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 Eggert
* 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.91Andrea Corallo
* 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 Lu
2024-09-11Merge from savannah/emacs-30Po Lu
ee3e3a63111 ; Update version number of exec/configure.ac c5925b6ba5f Fix heex-ts-mode indentation following previews elixir-mo... c3383be5f04 ; * admin/make-tarball.txt: Improve last change. 8ddb54117f1 ; * admin/make-tarball.txt: Remove now unnecessary config... 7e194d33f90 * lisp/ldefs-boot.el: Update. 9019536ea66 Fix use of Uniscribe font driver in MinGW build 5c55c860db7 Avoid crashes in redisplay in batch-mode testing ba2190e1ae7 ; * etc/NEWS: Fix indentation. 818c0cc9a51 eglot-test-rust-completion-exit-function: Fix failure in ... f47297782bd ; * doc/lispref/searching.texi (Rx Notation): Simplify rx... 03e56981675 Clarify the semantics of 'string-pixel-width' 9f0603207b1 ; * src/treesit.c: Minor cleanups of recent changes. e0d3f743957 * src/treesit.c (treesit_debug_print_parser_list): Fix fo... bed38ded730 ; * src/treesit.c (treesit_debug_print_parser_list): Fix ... 18c6487dbd0 ; * src/treesit.c: Add a prototype so there's no warning ... bf23382f1f2 Read more on each call to treesit's buffer reader 3435464452b Fix the range handling in treesit.c 3fcec09f754 Add debugging function for treesit.c 0fd259d166c Fix elixir-ts-mode's range query 2329b36b1fb ; project-files-relative-names: Update docstring (bug#72701) e55e2e1c6ba Make json-serialize always return a unibyte string (bug#7... 89c99891b2b ; * doc/lispref/os.texi (Suspending Emacs): Fix last change. 4f044d0d3df ; Improve documentation of 'suspend-emacs'
2024-09-11; Update version number of exec/configure.acPo Lu
* 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 Lu
* 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 Lu
2024-07-01; * exec/trace.c (seccomp_system_call): Typo in commentary.Po Lu
2024-07-01Optimize process execution on AndroidPo Lu
* 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 Lu
* 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 Lu
2024-03-14Improve /proc/self/exe substitution on AndroidPo Lu
* 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 Lu
2024-01-27Intercept calls to `openat' under AndroidPo Lu
* 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 Lu
2024-01-21; * exec/Makefile.in (extraclean): Remove standard files.Po Lu
2024-01-20Fix autogen.sh’s spurious ‘git diff’ outputPaul Eggert
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 Lu
2024-01-02; Add 2024 to copyright yearsPo Lu
2023-12-10; Use ?c instead of integer in local variablesStefan Kangas
* 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 Kangas
2023-11-26; Update Autoconf auxiliaries in execPo Lu
* exec/config.guess: * exec/config.sub: Update configury files.
2023-09-18Correct build on systems without PAGE_MASKPo Lu
* 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 Lu
* 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>.