Improve general flags for userspace_fexec.

First, auxiliary vectors are no longer left here in syscall, but remain
in relibc. The rationale behind removing them was that they are no
longer used by the kernel in any way, as exec is moved to userspace.

Second, a ptrace event for address space switches was added. This is to
allow tracers to reopen their mem file when that mem file points to
different memory (otherwise mem can be decoupled from address spaces and
simply use the one that the context uses at the time).
This commit is contained in:
4lDO2
2022-07-21 11:14:14 +02:00
parent ab5c685978
commit c7b84541dc

View File

@@ -201,8 +201,10 @@ bitflags! {
/// If you don't catch this, the child is started as normal.
const PTRACE_EVENT_CLONE = 0x0000_0000_0000_0100;
const PTRACE_EVENT_MASK = 0x0000_0000_0000_0F00;
/// Sent when current-addrspace is changed, allowing the tracer to reopen the memory file.
const PTRACE_EVENT_ADDRSPACE_SWITCH = 0x0000_0000_0000_0200;
const PTRACE_EVENT_MASK = 0x0000_0000_0000_0F00;
/// Special meaning, depending on the event. Usually, when fired before
/// an action, it will skip performing that action.
@@ -280,13 +282,6 @@ bitflags! {
}
}
// Auxiliery vector types
pub const AT_NULL: usize = 0;
pub const AT_PHDR: usize = 3;
pub const AT_PHENT: usize = 4;
pub const AT_PHNUM: usize = 5;
pub const AT_ENTRY: usize = 9;
bitflags! {
pub struct WaitFlags: usize {
const WNOHANG = 0x01;