Message type for PM_EXEC
Change-Id: I6738716ba835d6196519056bb77afa8ec99f122a
This commit is contained in:
parent
e1986cd160
commit
048d0f0d62
4 changed files with 22 additions and 17 deletions
|
@ -64,13 +64,6 @@
|
||||||
/* Field names for the exit(2) call. */
|
/* Field names for the exit(2) call. */
|
||||||
#define PM_EXIT_STATUS m1_i1 /* int */
|
#define PM_EXIT_STATUS m1_i1 /* int */
|
||||||
|
|
||||||
/* Field names for the execve(2) call. */
|
|
||||||
#define PM_EXEC_NAME m1_p1 /* const char * */
|
|
||||||
#define PM_EXEC_NAMELEN m1_i1 /* size_t */
|
|
||||||
#define PM_EXEC_FRAME m1_p2 /* char * */
|
|
||||||
#define PM_EXEC_FRAMELEN m1_i2 /* size_t */
|
|
||||||
#define PM_EXEC_PS_STR m1_p3 /* char * */
|
|
||||||
|
|
||||||
/* Field names for the kill(2), srv_kill(2), and sigaction(2) calls. */
|
/* Field names for the kill(2), srv_kill(2), and sigaction(2) calls. */
|
||||||
#define PM_SIG_PID m1_i1 /* pid_t */
|
#define PM_SIG_PID m1_i1 /* pid_t */
|
||||||
#define PM_SIG_NR m1_i2 /* int */
|
#define PM_SIG_NR m1_i2 /* int */
|
||||||
|
|
|
@ -145,6 +145,17 @@ typedef struct {
|
||||||
} mess_sigcalls;
|
} mess_sigcalls;
|
||||||
_ASSERT_MSG_SIZE(mess_sigcalls);
|
_ASSERT_MSG_SIZE(mess_sigcalls);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
vir_bytes name;
|
||||||
|
size_t namelen;
|
||||||
|
vir_bytes frame;
|
||||||
|
size_t framelen;
|
||||||
|
vir_bytes ps_str;
|
||||||
|
|
||||||
|
uint8_t padding[36];
|
||||||
|
} mess_lc_pm_exec;
|
||||||
|
_ASSERT_MSG_SIZE(mess_lc_pm_exec);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
|
@ -1064,6 +1075,7 @@ typedef struct {
|
||||||
mess_fs_vfs_readsuper m_fs_vfs_readsuper;
|
mess_fs_vfs_readsuper m_fs_vfs_readsuper;
|
||||||
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
|
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
|
||||||
|
|
||||||
|
mess_lc_pm_exec m_lc_pm_exec;
|
||||||
mess_lc_pm_getsid m_lc_pm_getsid;
|
mess_lc_pm_getsid m_lc_pm_getsid;
|
||||||
mess_lc_pm_groups m_lc_pm_groups;
|
mess_lc_pm_groups m_lc_pm_groups;
|
||||||
mess_lc_pm_itimer m_lc_pm_itimer;
|
mess_lc_pm_itimer m_lc_pm_itimer;
|
||||||
|
|
|
@ -44,11 +44,11 @@ int execve(const char *path, char * const *argv, char * const *envp)
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
|
|
||||||
/* We can finally make the system call. */
|
/* We can finally make the system call. */
|
||||||
m.PM_EXEC_NAME = (char *) __UNCONST(path);
|
m.m_lc_pm_exec.name = (vir_bytes)path;
|
||||||
m.PM_EXEC_NAMELEN = strlen(path) + 1;
|
m.m_lc_pm_exec.namelen = strlen(path) + 1;
|
||||||
m.PM_EXEC_FRAME = frame;
|
m.m_lc_pm_exec.frame = (vir_bytes)frame;
|
||||||
m.PM_EXEC_FRAMELEN = frame_size;
|
m.m_lc_pm_exec.framelen = frame_size;
|
||||||
m.PM_EXEC_PS_STR = (char *)(vsp + ((char *)psp - frame));
|
m.m_lc_pm_exec.ps_str = (vir_bytes)(vsp + ((char *)psp - frame));
|
||||||
|
|
||||||
(void) _syscall(PM_PROC_NR, PM_EXEC, &m);
|
(void) _syscall(PM_PROC_NR, PM_EXEC, &m);
|
||||||
|
|
||||||
|
|
|
@ -42,11 +42,11 @@ int do_exec()
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
m.m_type = VFS_PM_EXEC;
|
m.m_type = VFS_PM_EXEC;
|
||||||
m.VFS_PM_ENDPT = mp->mp_endpoint;
|
m.VFS_PM_ENDPT = mp->mp_endpoint;
|
||||||
m.VFS_PM_PATH = m_in.PM_EXEC_NAME;
|
m.VFS_PM_PATH = (void *)m_in.m_lc_pm_exec.name;
|
||||||
m.VFS_PM_PATH_LEN = m_in.PM_EXEC_NAMELEN;
|
m.VFS_PM_PATH_LEN = m_in.m_lc_pm_exec.namelen;
|
||||||
m.VFS_PM_FRAME = m_in.PM_EXEC_FRAME;
|
m.VFS_PM_FRAME = (void *)m_in.m_lc_pm_exec.frame;
|
||||||
m.VFS_PM_FRAME_LEN = m_in.PM_EXEC_FRAMELEN;
|
m.VFS_PM_FRAME_LEN = m_in.m_lc_pm_exec.framelen;
|
||||||
m.VFS_PM_PS_STR = (vir_bytes) m_in.PM_EXEC_PS_STR;
|
m.VFS_PM_PS_STR = m_in.m_lc_pm_exec.ps_str;
|
||||||
|
|
||||||
tell_vfs(mp, &m);
|
tell_vfs(mp, &m);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue