<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/exec, branch scratch/comp-branch-optim</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Port seccomp acceleration to Linux 3.5.0</title>
<updated>2024-07-02T04:12:14+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-07-02T04:10:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6b5accdc05d007ab4d1804865c1b043260006673'/>
<id>6b5accdc05d007ab4d1804865c1b043260006673</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>* exec/exec.c (exec_0): Restore erroneously deleted statement.</title>
<updated>2024-07-01T14:55:03+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-07-01T14:55:03+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e087d3009bf564446367a1465957d9ea7b699f01'/>
<id>e087d3009bf564446367a1465957d9ea7b699f01</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>; * exec/trace.c (seccomp_system_call): Typo in commentary.</title>
<updated>2024-07-01T10:22:01+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-07-01T10:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5965614d3ecb6b09277ea857212467b2f3f9c8bc'/>
<id>5965614d3ecb6b09277ea857212467b2f3f9c8bc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize process execution on Android</title>
<updated>2024-07-01T10:11:58+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-07-01T10:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ebf5bcb9f0b6adeb97a3918b8f3845844c9091b0'/>
<id>ebf5bcb9f0b6adeb97a3918b8f3845844c9091b0</id>
<content type='text'>
* 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) &lt;exec_data, data_size&gt;: 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-&gt;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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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) &lt;exec_data, data_size&gt;: 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-&gt;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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable preprocessing of assembler files with m4 on non-MIPS systems</title>
<updated>2024-06-27T02:15:13+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-06-27T02:15:13+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=fa322155ad51e3628256232bc113ad7499ab76e7'/>
<id>fa322155ad51e3628256232bc113ad7499ab76e7</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>* exec/trace.c (rpl_stpcpy): Replace stpcpy if absent.</title>
<updated>2024-03-14T06:21:49+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-03-14T06:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=1b94f800ae34de5f4e72682a81de1d42bdda9276'/>
<id>1b94f800ae34de5f4e72682a81de1d42bdda9276</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve /proc/self/exe substitution on Android</title>
<updated>2024-03-14T05:45:48+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-03-14T05:45:48+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=30bc867aecc59265b6e315acf459f8d79c423bca'/>
<id>30bc867aecc59265b6e315acf459f8d79c423bca</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>* exec/configure.ac (OPENAT_SYSCALL): Define on MIPS.</title>
<updated>2024-01-29T03:54:46+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-01-29T03:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b9f348ce1e2f56fcf8ed5e42adc4027026cde347'/>
<id>b9f348ce1e2f56fcf8ed5e42adc4027026cde347</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Intercept calls to `openat' under Android</title>
<updated>2024-01-27T02:36:30+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-01-27T02:36:30+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c37b50ad417c6cb340f54ffe218f5d889345451a'/>
<id>c37b50ad417c6cb340f54ffe218f5d889345451a</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>; * exec/Makefile.in: Correct typo.</title>
<updated>2024-01-21T01:59:47+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-01-21T01:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=8da6c8c7c1e25d2d1d511b50c0ff94097e512470'/>
<id>8da6c8c7c1e25d2d1d511b50c0ff94097e512470</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
